You're viewing a comment by Person and its responses.

Person Permalink
June 01, 2012, 17:09

""If you don't like the to put < file at the end, you can also pipe the contents of the file to the while loop:""
or just stick at the front
%< while IFS= read -r line; do
echo $line;

$ packets=$(echo $info | awk '{ print $1 }')
$ time=$(echo $info | awk '{ print $4 }')

awk is bogus, use cut instead

Comment Responses

June 01, 2012, 17:38

You can't put it in the front because you must put redirections at the end of a compound command. You can put them anywhere in a simple command. Also it should always be echo "$line" not echo $line because of word splitting happening if you don't quote it. I don't get your comment about awk being bogus.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "cloud_325": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.