Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!ucsd!rutgers!cbmvax!grr From: grr@cbmvax.commodore.com (George Robbins) Newsgroups: comp.unix.ultrix Subject: Re: awk -f - in Ultrix 4.0 Message-ID: <20082@cbmvax.commodore.com> Date: 25 Mar 91 14:10:07 GMT References: <1991Mar20.171431.13307@math.ucla.edu> <4678@osc.COM> Reply-To: grr@cbmvax.commodore.com (George Robbins) Organization: Commodore, West Chester, PA Lines: 32 In article <4678@osc.COM> chang@osc.UUCP (Lai-Chang Woo) writes: > In article <1991Mar20.171431.13307@math.ucla.edu> abby@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@cbmvax.commodore.com Commodore, Engineering Department phone: 215-431-9349 (only by moonlite)