J
Josef Moellers
jthrumston said:I got the point already.
No, you haven't.
jthrumston said:I got the point already.
Xicheng:(e-mail address removed):Basically all I am doing is pulling all records out of a file that
start with "F" and creating a new file of just those records.
you dont need to separate line into columns except that you need to
check contents in a specific column, like:
perl -anle 'print if $F[2] =~ /^F/' infile > outfile
this check if column-3 begins with 'F'...
This did exactly what I need (by changing the column to 0) from the
command line [...]
how do I incorporate that line inside a perl script? I have
11 files to do this exact operation on (though the column is not
always the same from report to report).
At 2006-01-09 10:47AM said:Xicheng said:If this is what you want, just forget about using awk within perlBasically all I am doing is pulling all records out of a file that
start with "F" and creating a new file of just those records.
scripts, the perl onelier is easy as awk:
perl -nle 'print if /^F/' infile > outfile
you dont need to separate line into columns except that you need to
check contents in a specific column, like:
perl -anle 'print if $F[2] =~ /^F/' infile > outfile
this check if column-3 begins with 'F'...
This did exactly what I need (by changing the column to 0) from the
command line. I thank you Xicheng for suggesting that. My question now
would be, how do I incorporate that line inside a perl script? I have
11 files to do this exact operation on (though the column is not always
the same from report to report).