Re: ** OT : awk works only for first line
Date: Sat, 7 Feb 2009 12:27:47 -0800 (PST)
Thanks Jared, Mark. Who needs awk when cut works.
- On Wed, 1/28/09, Jared Still <jkstill_at_gmail.com> wrote:
From: Jared Still <jkstill_at_gmail.com> Subject: Re: ** OT : awk works only for first line To: ajoshi977_at_yahoo.com, "oracle-l_at_freelists.org" <oracle-l_at_freelists.org>, Mark.Bobak_at_proquest.com Date: Wednesday, January 28, 2009, 2:30 PM
What was I thinking?
Brain was in loop mode.
cut -f1 -d: < emplis.txt
On 1/28/09, Jared Still <jkstill_at_gmail.com> wrote:
> 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'. :)
-- Sent from Gmail for mobile | mobile.google.com Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist -- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-lReceived on Sat Feb 07 2009 - 14:27:47 CST