Hi!
I have the following script
BEGIN {
print " "
}
.... lots of functions here
{
#bypass In fact there is no input file
}
END {
lots of calls to the above functions here
}
I run the script like this:
nawk -f script.awk var1 var2
Within the script I get var1 and var2 from ARGV[1] and ARGV[2] without any problems.
I then get an error nawk: can't open file var2, why ?
The script runs fine if I put all the statements frm END{ } into BEGIN { } but I still get the error at the end.
I have the following script
BEGIN {
print " "
}
.... lots of functions here
{
#bypass In fact there is no input file
}
END {
lots of calls to the above functions here
}
I run the script like this:
nawk -f script.awk var1 var2
Within the script I get var1 and var2 from ARGV[1] and ARGV[2] without any problems.
I then get an error nawk: can't open file var2, why ?
The script runs fine if I put all the statements frm END{ } into BEGIN { } but I still get the error at the end.