reading from standard input using [ng]awk

Alan Thew qq11 at uxb.liverpool.ac.uk
Wed May 1 12:38:43 AEST 1991


According to the Nutshell Book, "Sed and Awk", I can use the following
construct:

getline line <"-"

to read standard input into variable line. I have tried this using 
SunOS 4.1 nawk, HP-UX 7.0 nawk and gawk 2.11 and all fail (gawk
is OK using its "/dev/stdin" but the SVR4 nawk does not have this in).

Does this work anybody?

Please reply by mail if possible since I'm a little desperate for
a reply. I do read news but a minimum 24 hour delay is not acceptable.
I'll sumarise for the USENET readers.

Thanks.

btw yes I know PERL does this very well, please don't just mail me to let
me know this :-)

-- 
 
      Alan Thew : University of Liverpool Computer Laboratory
Internet/Bitnet : qq11 at uxb.liv.ac.uk
         UUCP   :           ....!mcsun!ukc!liv-uxb!qq11
        Voice   :  +44 51 794 3735        FAX : +44 51 794 3759



More information about the Comp.unix.questions mailing list