AWK, while (getline ) question
John F. Ormonde
jfo at tove.cs.umd.edu
Thu Apr 25 05:22:27 AEST 1991
I am having trouble with what should be a simple AWK program. Does anyone
see anything wrong with this:
{ while (getline <"test" >0)
{ rot[$1] = $4
printf "%s \n", rot[$1] }
}
is in file zzz. On a Sparc 1 running SunOS 4.1.1
% awk -f zzz
awk: syntax error near line 1
awk: illegal statement near line 1
test is a text file containing
frank 1 A A A
brett 4 A C A
tom 2 B O W
This is reasonably similar to the example on pg 101 of the AWK Programmin
Language book by Aho, Kernigan, and Weinberger. SO how dense am I ?
--
Go Tribe! (SOMEbody has to root for them :-)
John Ormonde INTERNET: jfo at cs.umd.edu UUCP: uunet!mimsy!jfo
VAX/SUN SysAdmin by necessity NOT choice
More information about the Comp.unix.wizards
mailing list