J
jthrumston
Hi, I am not a strong awk user and have little to no experience with
perl.
I was reading a thread about how to use awk in a perl script (cause I
haven't figured out how to do the same in perl)
Here is my awk command
awk '$1 ~ /^F/ {print $0 }' /tmp/frhtest/ADDC.bak >
/tmp/frhtest/ADDC.$date
this works fine at the command line. I tried to do this to run inside
my perl script.
$call = `awk '$1 ~ /^F/ {print $0 }' /tmp/frhtest/ADDC.bak >
/tmp/frhtest/ADDC.$date`;
system("$call");
and I get this result
syntax error The source line is 1.
The error context isawk: Quitting
The source line is 1.
it generates a zero record file.
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.
any suggestions would be greatfully taken.
Thanks
perl.
I was reading a thread about how to use awk in a perl script (cause I
haven't figured out how to do the same in perl)
Here is my awk command
awk '$1 ~ /^F/ {print $0 }' /tmp/frhtest/ADDC.bak >
/tmp/frhtest/ADDC.$date
this works fine at the command line. I tried to do this to run inside
my perl script.
$call = `awk '$1 ~ /^F/ {print $0 }' /tmp/frhtest/ADDC.bak >
/tmp/frhtest/ADDC.$date`;
system("$call");
and I get this result
syntax error The source line is 1.
The error context isawk: Quitting
The source line is 1.
it generates a zero record file.
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.
any suggestions would be greatfully taken.
Thanks