Hi,
I want to run this gawk command from a script file:
gawk '{total += $3}; END {print "column total is", total}'
If I run this from the command prompt as:
gawk '{total += $3}; END {print "column total is", total}' <filename>
then it works fine. Is it possible to make a script file to run this
gawk command without having to type 'gawk' in the command line? I know
about 'gawk -f <scriptfile>'. But I tried making the file
/bin/backuptally which is exactly:
gawk '{total += $3}; END {print "column total is", total}'
and running '/bin/backuptally <filename>'. This didn't work. Any
suggestions? Thanks,
Hidong