awk

Brian Fitzgerald fitz at mml0.meche.rpi.edu
Wed Oct 3 03:43:57 AEST 1990


In article <8678 at mirsa.inria.fr> mmartin at orphee.inria.fr (Michel MARTIN) writes:
>When I type
>
>	awk ' { while (getline <"lettre" > 0 ) } '
>
If you are using GNU awk, eliminate the error by specifying a body for
the while loop. If you want no action, use ";", as in

gawk ' { while (getline <"lettre" > 0 ) ; } '

Additionally, if you are using Sun awk, I don't think you can use input
redirection with getline. The following runs without error in Sun awk.

awk ' { while (getline > 0 ) ; } '

Gawk is available by anonymous ftp from prep.ai.mit.edu (and many sites in
Europe as well.) I believe that to compile gawk, it is helpful to get "bison"
and "gcc", which are available from the same place. 



More information about the Comp.unix.shell mailing list