Hello there,
I've just found a rather weird problem on my opensuse10.1 box.
I've produced a simple awk script and a sample input file which makes
gawk crash on my 10.1, while it works as expected on my gentoo. I got
also what I would expect on non-gnu awk running under Mac OS X.
I would really appreciate if someone ran my script under 10.1 and tried
to reproduce the error. It's a one minute task: I've arranged everything
below so you can run it on your ~/tmp with a single copy/paste, if you
feel like giving it a try.
Maybe I'm not seeing the obvious, I would expect a broken awk build to
cause lots of trouble on my system, but this sample script is quite
tricky.
So I would appreciate if someone confirms the odd behaviour or has
any clue before I go on with further testing.
$ uname -a
Linux 2.6.16.13-4-smp #1 SMP Wed May 3 04:53:23 UTC 2006 i686 i686
i386 GNU/Linux
$ rpm -qa | grep awk
gawk-3.1.5-18
$ gawk --version | head -n 1
GNU Awk 3.1.5
Thank you for getting so far, and thank you very much if you choose
to go on ;)
Kind regards.
Pablo
-8<-------------cut here---------------------
#skip this if your CWD is a better place for two temp files ;)
cd ~/tmp
# the script; PLEASE take care if you copy on your own file
# to remove the BACKSLASH just before the DOLLAR; It's
# there to prevent the shell from evaluating $i when copy/pasting.
cat > problem.awk <<-EOF
{
print "RECORD " NR;
for ( i = 0; length( \$i ) > 0; i++ ) print " FIELD " i " of " NF;
}
EOF
# It doesn't seem to really matter what kind of input you
# give to the script. Also it doesn't matter if it's given
# on a file via gawk command line invocation or if it's fed
# via stdin through a pipe.
cat > awk_example <