Hi All
I'm trying to run the following awk script on Solaris 8. I've used the same code successfully many times on AIX but here it's just erroring with...
awk: syntax error near line 8
awk: illegal statement near line 8
...where line 8 is the while statement.
BEGIN {
INFILE="swift.txt"
{
while (( getline < INFILE ) > 0)
if (length ($0) > 0)
MERVREC[++NOMERV] = $0
close (INFILE)
}
# end of begin
}
Does anybody have any ideas as to why this won't work?
Many thanks
Luke
I'm trying to run the following awk script on Solaris 8. I've used the same code successfully many times on AIX but here it's just erroring with...
awk: syntax error near line 8
awk: illegal statement near line 8
...where line 8 is the while statement.
BEGIN {
INFILE="swift.txt"
{
while (( getline < INFILE ) > 0)
if (length ($0) > 0)
MERVREC[++NOMERV] = $0
close (INFILE)
}
# end of begin
}
Does anybody have any ideas as to why this won't work?
Many thanks
Luke