filipebean has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I'm a bit lost in this topic, can someone advice please.
I want to read some lines from a file that have a specific value in field number 3:
my @rows = `cat file.csv | awk -F';' '{if ($3==1) print $0}'`; my $lines= join("\n",@rows ); printlog("string: $lines");
instead of having the lines filtered, $lines is empty. when I execute the command on solaris it work...
any idea??
thank you in advance.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: get value from a awk system command
by hippo (Bishop) on Apr 10, 2013 at 15:23 UTC | |
by filipebean (Novice) on Apr 10, 2013 at 16:24 UTC | |
by Anonymous Monk on Apr 10, 2013 at 17:49 UTC | |
by hippo (Bishop) on Apr 12, 2013 at 11:05 UTC | |
Re: get value from a awk system command
by LanX (Saint) on Apr 10, 2013 at 13:57 UTC | |
Re: get value from a awk system command
by hdb (Monsignor) on Apr 10, 2013 at 14:34 UTC | |
Re: get value from a awk system command
by hdb (Monsignor) on Apr 10, 2013 at 14:45 UTC |
Back to
Seekers of Perl Wisdom