Subject: Re: README: nawk vs. gawk
To: NetBSD-current Discussion List <>
From: Greg A. Woods <>
List: current-users
Date: 02/02/2001 19:31:32
[ On Friday, February 2, 2001 at 22:10:02 ( +0100), Jaromír Dolecek wrote: ]
> Subject: Re: README: nawk vs. gawk
> My stance is that since we shipped with gawk until now, we have to
> provide ~full featured replacement.

Well, there is already a full feature replacement for gawk.  It's called
GNU Awk.  It is available in pkgsrc/lang/gawk.

> This means the missing GNU awk
> features need to be added to our nawk - otherwise it can't be used
> as a replacement of gawk. Hopefully Kernigham would accept the
> changes and add them to official distribution - I'd hate having
> NetBSD-specific nawk.

Me too, but I would guess that in many cases, including especially the
"stupid" gawk command-line syntax, that's about as likely as getting the
GNU Awk developers to do the converse -- i.e. never.

> There doesn't seem many GNU extensions nawk doesn't have; when
> I compared the manpages, nawk doesn't have gensub(), strftime(), systime().

None of those are in 'mawk' either, and the time functions can be
emulated with external commands using "system()|getline".

> Some special variables and special file names are not supported in nawk.

'mawk' also allows the RS variable to be an RE, and that might be an
extension bwk would take back for Awk, though he may have other reasons
for avoiding this enhancement....

That's about the single most important difference.....

> Not really big of difference.

Nope, not terribly different...   :-)

							Greg A. Woods

+1 416 218-0098      VE3TCP      <>      <robohack!woods>
Planix, Inc. <>; Secrets of the Weird <>