Re: ** OT : awk works only for first line
Date: Wed, 28 Jan 2009 09:44:42 -0800
I think what you may be missing is that awk is a processing language that is designed to handle whatever it gets from STDIN.
There's no need really to use it in a loop as you have done.
Mark has already shown how to do use awk.
Another tool you may be interested in is cut.
while read emp
echo $emp | cut -f1 -d:
done < emplis.txt
For some humorous surfing, google for 'useless use of cat'. :)
JaredReceived on Wed Jan 28 2009 - 11:44:42 CST