Gossamer Forum
Quote Reply
awk
Why does the following work:

bash$ ps aux | awk '{ print $1 }'

...but the following not:

Code:
open FH, "ps aux | awk '{ print $1 }' |" or die $!;
print while (<FH>);
close FH;

Frown

All the perl example does is print the entire output from ps aux.
Quote Reply
Re: [Paul] awk In reply to
paul,

\$1
Quote Reply
Re: [adrockjames] awk In reply to
Blush

Thanks.

Last edited by:

Paul: Apr 11, 2003, 2:07 AM