[UFO Chicago] silly bash/awk problem -- fatal: cannot open file
Brian Sobolak
brian at planetshwoop.com
Thu Jun 21 21:09:48 PDT 2012
Hi --
I'm trying to run an awk script on a large CSV file. The script works on
a column of data, so I want to execute it 78 times, one for each column.
If I run from the command line, all is well. If I string them all into a
script to run one after the other, it fails with the error:
awk: colWalk.awk:6: fatal: cannot open file
`/home/bs100/src/awk/fileWalk/Result
' for reading (No such file or directory)
The actual command looks like this:
awk -f colWalk.awk -v colNum=1 \
~/src/awk/fileWalk/Results_June21_Instr_ids_DB2AREAD.csv
(It all fits on one line obviously.)
I had changed the file permissions and Results... file is readable by all
and my script is set to execute. I don't think that's it. I am guessing
that bash is not handling the '-v colNum=1' part correctly which is
causing it to misinterpret the file name awk needs as an input file.
Shortening the name made no difference.
Any ideas?
brian
--
More information about the ufo
mailing list