[ale] wierd scripting problem
Geoffrey Myers
geof at denali.abraxis.com
Tue Nov 19 10:59:34 EST 1996
I've got an unusual scripting problem that happens under Linux but not
on an HP or Sun box. I have a shell script that creates 5 files with
some initial information. I then call an awk script that will append
to these files. Basically, it looks like this:
prefix=$(date "+%d%m%y")
for fn in foo bar foobar barfoo foofoo; do
print "string of stuff" > ${prefix}${fn}.html
done
awk -f foo.awk foo=foo bar=bar .....
I get the following error:
awk: foo.awk:1: fatal: cannot open file `foofoo' for reading
(No such file or directory)
Now the error is always references the last file in the for() loop.
Wierd thing is, I'm not tring to read the file, but write to it.
I assume it's a buffering issue, and I've been able to rid myself of
the problem by enclosing the for loop in parens, but this, to me is a
hack. Any suggestions?
--
Until later:
Geoffrey Myers geof at abraxis.com
Opinions expressed by me are mine, all mine, only mine.....
More information about the Ale
mailing list