Passing variables in gawk.

Passing variables in gawk.

Post by Srihari Kotcherlako » Wed, 22 Apr 1992 14:41:53



Script gawk.bug:

#!/bin/csh
nawk \
'\
END { print "var1 = ", var1 }' \
/dev/null var1="nawk works"
awk \
'\
END { print "var1 = ", var1 }' \
/dev/null var1="awk works"
gawk \
'\
END { print "var1 = ", var1 }' \
/dev/null var1="gawk works"

What happens when I run the above test:

gawk.bug
var1 =  nawk works
var1 =  awk works  # I had to hit Ctrl-D to force this message
gawk: var1=gawk works: No such file or directory

Question: Is this a known bug in gawk?