go ahead... be a heretic | |
PerlMonks |
Re: Grepping a Fileby mickeyn (Priest) |
on Apr 17, 2006 at 05:28 UTC ( [id://543763]=note: print w/replies, xml ) | Need Help?? |
Hi, Try this -
First, tie your file to an array and 'grep' the lines you wish into a new array.
Second, print the field you wish from each line.
BTW, your awk code can be written without the use of pipes, grep & cat (and will probably work faster this way):
Enjoy,
In Section
Seekers of Perl Wisdom
|
|