[X-Unix] awk

William H. Magill magill at mcgillsociety.org
Wed Jan 7 09:22:23 PST 2004


On 07 Jan, 2004, at 11:42, Robert Frank wrote:
> On 07/01/2004, at 15:16, Mac OS X Unix wrote:
>
>> At 12:41 -0600 2004/01/06, mac2 mail wrote:
>>> On this note, does OS X ship with an actual copy of awk, or is it
>>> gawk or nawk??
>>
>> I'm pretty sure all the unix utilities on OS X are GNU, so that would 
>> be gawk.
>>
> string on /usr/bin/awk shows a netBSD ident ...

Virtually none of the "standard Unix utilities" are GNU as such... not 
where there are other options. That is the definition of GNU, remember.

The "Unix user experience" part of OS X is based on FreeBSD.
FreeBSD itself is an amalgamation of "Open Source stuff" -- most of it  
is not GNU.

There are annoying differences between "standard Unix" versions of the 
utilities and their GNU counterparts. Usually they Unix versions are 
compatible with the GNU versions, but the GNU versions are not 
compatible with the Unix versions.   ... Just as scripts written for 
/bin/sh will work in /bin/ksh or /bin/bash ... scripts written for 
either ksh or zsh will not run in sh.

In normal best practices, neither gawk or nawk should ever be installed 
as awk for this reason. They are normally installed as themselves so 
that you wind up with three versions and can pick the appropriate one.

I believe both DarwinPorts and Fink have versions of gawk and nawk, but 
I haven't looked.


T.T.F.N.
William H. Magill
# Beige G3 - Rev A motherboard - 768 Meg
# Flat-panel iMac (2.1) 800MHz - Super Drive - 768 Meg
# PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg]- Tru64 5.1a
# XP1000 - [Alpha EV6]
magill at mcgillsociety.org
magill at acm.org
magill at mac.com



More information about the X-Unix mailing list