awk

RICHARD RONTELTAP richard at neabbs.UUCP
Mon Oct 2 06:04:04 AEST 1989


> > 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)



More information about the Comp.unix.xenix mailing list