Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!hp4nl!telmail!neabbs!richard From: richard@neabbs.UUCP (RICHARD RONTELTAP) Newsgroups: comp.unix.xenix Subject: Re: awk Message-ID: <219915@neabbs.UUCP> Date: 1 Oct 89 20:04:04 GMT Organization: NEABBS multi-line BBS +31-20-717666 (13x), Amsterdam, Holland Lines: 27 > > awk 'BEGIN {print x}' x=foo ... > In your example, it probably would be as effective to do > something like: > > (echo $x; awk '{...command list .....}') This will work for the example, but that was only an example to show the bug. The real AWK program is used to purge dates from continuously incoming news... However, someone else sent me a workaround. Thank's! I can't find your name rigth now, because I'm at another location. From memory, the workaround was that variables are only initialised after the first line has been read. You also have to specify a minus sign on the command line to force reading stdin. (Which should be standard) I was also very 'charmed' by an offer from SCO. If I upgraded to XENIX 2.3 (currenly have 2.2.3) or SCO UNIX, AWK would work as documented. A bit expensive for a bug-fix. :-) (SCO UNIX is, of course, very attractive for other reasons.) Thanks again, unknown, Greetings, Richard (...!hp4nl!neabbs!richard)