-bash: gawk: command not found

I'm getting an error:
-bash: gawk: command not found
in Terminal in OS X Leopard.

Do I need to install something?

Macbook Pro, Mac OS X (10.5.1)

Posted on Dec 30, 2007 9:19 PM

Reply
3 replies

Dec 31, 2007 2:47 AM in response to g-pod

You might be able to get away with just 'awk'. This AWK installed by Apple is presumably a Berkeley Unix version derived from the original Bell Labs AWK, installed under its original command name of awk(1) - gawk(1) was a name used to prevent a GNU Awk from clashing with an installation of the original.

I can't remember just how compatible the original awk(1) is with gawk(1). If you really do want features added by the latter, you will have to install it from http://gawk.darwinports.com/

AWK is a nice little report generation language and interpreter. Many prefer the more-general programming language Perl these days (it was partially inspired by Awk) which has a far more comprehensive library, but I still use Awk (often in a pipeline with sort(1) etc) from force of habit when I need to perform a small data-processing task.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

-bash: gawk: command not found

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.