JP Vossen on 9 Sep 2008 14:11:03 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Ubuntu mawk instead of gawk

In addition to the /bin/sh dash vs. bash thing 
which came up again at PLUG North last night, mawk vs. gawk came up.

Bottom line: Ubuntu comes with mawk instead of gawk.  So when your 
scripts that use 'awk' break on Ubuntu, that's why.

Why is this bad?  Aside from stuff unexpectedly breaking, according to 
the man page the mawk is "Version 1.2 Dec 22 1994" which is just a tad 
old.  I say according to the man page because mawk doesn't even support 
such trivial things as -h, --help, -V, --version, etc...  While gawk is 
arguably "non-standard" (in the same way that all the GNU tools are 
non-standard but usually just better), it *is* the "standard" on Linux. 
  Except for Ubuntu.  mawk is much smaller than gawk, which is probably 
why they picked it, but the savings is so minimal and the implications 
such a pain that I can only call this a very bone-headed decision.

Perhaps there is a better reason for it, but if so I can't find it. 
Anyone else know?

JP Vossen, CISSP            |:::======|        jp{at}jpsdomain{dot}org
My Account, My Opinions     |=========|
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --