Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!cmcl2!adm!news From: qq11@uxb.liverpool.ac.uk (Alan Thew) Newsgroups: comp.unix.questions Subject: reading from standard input using [ng]awk Message-ID: <26718@adm.brl.mil> Date: 1 May 91 02:38:43 GMT Sender: news@adm.brl.mil Lines: 26 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@uxb.liv.ac.uk UUCP : ....!mcsun!ukc!liv-uxb!qq11 Voice : +44 51 794 3735 FAX : +44 51 794 3759