Where is the 'nawk' command on my AIX system? From: Jeff Wang


The /bin/nawk that exists on many UNIX flavors is a superset of the
'awk' command, revised by the same original authors to include added
functionality. All the extra options normally associated with 'nawk'
on other UNIXes have been incorporated into the AIX version of 'awk';
the AIX 'awk' InfoExplorer or man pages include nawk-specific features
such as the "-v" command line option and atan2(), rand(), srand(),
match(), sub(), gsub(), system(), close(), getline functions.

If your AIX version is missing /bin/nawk (as are most AIX 3.x
versions), the simplest way to get around this and maintain script
portability between UNIX platforms is to make a /bin/nawk link to
/bin/awk (as root, of course). If you do not have root privilege or
do not want to create a /bin/nawk link, to make the script work on
different UNIXes, you may have to test `uname` first and set all
'nawk' references on AIX runs to /bin/awk. If your script is to only
run on AIX systems, you can just change all references of 'nawk' to
'awk' and everything should still work okay...but check the AIX awk
script on test data prior to making actual runs.

[Editor's note: AIX 4.x already contains a link from /usr/bin/nawk
to /usr/bin/awk.]



UNIXguide.net
English to Visayan Cebuano Dictionary

Find: Display: hits per page

Suggest a Site
Visayan Cebuano to English Dictionary