script help
ann kok
annkok2001 at yahoo.com
Tue Sep 5 11:16:28 PDT 2006
Hi all
I would like to ask script question
1/ if i use the script to run within 1 minute, I can't
run it in the cronjob. how can I run this script
automatically?
2/ I have file "file.txt" as below, there are two
fields.
4 999
10 200
15 400
60 900
I write "awk script" to exact field 2 if the field 1
less than 10 and put it in the file "result.txt". but
i am not successful!
awk '{
if ($1 > 10)
$2="this is result $2 when the feild 1 less than 10"
}' < file.txt > result.txt
result.txt
this is result $2 when the feild 1 less than 10
this is result $2 when the feild 1 less than 10
but i would like the result as
this is result 999 when the feild 1 less than 10
this is result 200 when the feild 1 less than 10
Thank you for your help
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the freebsd-questions
mailing list