Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!rpi!fitz From: fitz@mml0.meche.rpi.edu (Brian Fitzgerald) Newsgroups: comp.unix.shell Subject: Re: awk Summary: while needs a body Keywords: getline Message-ID: <=FQ%!2@rpi.edu> Date: 2 Oct 90 17:43:57 GMT References: <8678@mirsa.inria.fr> Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 18 In article <8678@mirsa.inria.fr> mmartin@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.