awk -f - in Ultrix 4.0

George Robbins grr at cbmvax.commodore.com
Tue Mar 26 00:10:07 AEST 1991


In article <4678 at osc.COM> chang at osc.UUCP (Lai-Chang Woo) writes:
> In article <1991Mar20.171431.13307 at math.ucla.edu> abby at luna.math.ucla.edu (Abby Hossein) writes:
> >Does anyone know why, in 4.0 on DEC5000, "awk -f - filename" produces 
> >"Can't open -"!? The man page says it supports the "-" option but then 
> >again, this is not the first time I see a man page lie!
> 
> This is not the only thing that breaks in awk either.  Dump awk and just use
> nawk instead.  Your life will be much easier.

That's great, but the last time I tried nawk on a MIPS based system,
it blew off with some kind of fatal alignment errors.  However, the
current version of GNU awk (gawk 2.11) seems to work well enough for
most purposes and also emits usable error messages.

It is also mildly amusing to note that nawk doesn't support "-f -"
either, although gawk tries to, but seems to fail if both "program"
and input are read from stdin...

Note: while the man text suggests that '-' refers to stding, the usage
line does not show it as an agrument to the "-f" option.

     awk [-Fc] [-f prog] [-] [file...]

Normally, I just use the standard bourne shell continuation of quoted
strings when I want the script in-line, but I can see where that might
not serve if you want to pipe a generated script into awk - temp files,
yeech!

-- 
George Robbins - now working for,     uucp:   {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing:   domain: grr at cbmvax.commodore.com
Commodore, Engineering Department     phone:  215-431-9349 (only by moonlite)



More information about the Comp.unix.ultrix mailing list