I've just started learning awk and I'm a little confused about all those versions around. Is there any "version" which is found on all Unix-like systems? Like, you know, plain vi? Does the standard awk support the -F option?
Awk, mawk, nawk, gawk… WHAT
awkunix
Related Solutions
There isn't an official package manager for OS X.
Fink, MacPorts, and Homebrew provide their own differing features and functionality to fill this void.
As pointed out by many users:
- avoid using /usr
- until you configure your PATH, packages from different directories won't be found.
First of all, if you are on a unix host with a package manager: Use that and skip the rest.
Read on if you do need to build it manually:
Download the most recent distribution tarball from: http://subversion.apache.org/download/
Go to that webpage and download the tarball. You can open that webpage in a graphical browser such as firefox to get a nice display, or you can use a text based browser such as lynx
, links
or w3m
to see the page.
On that page is a link to subversion-1.7.9.tar.gz. Download that file and save it somewhere. How you do this depends on the browser used. Usually it is just hoovering your mosye pointer over it and clicking on that link (graphical) or using the cursor keys to navigate to it and press Enter and 'save as' (most text browsers).
Once you know the URL you can also download it with
wget http://apache.mirror.1000mbps.com/subversion/subversion-1.7.9.tar.gz
Unpack it, and use the standard GNU procedure to compile:
Unpacking the downloaded file is easy. If it was a zip then you would use unzip subversion-1.7.9.zip. In this case it is a .tar.gz and you use tar xzf subversion-1.7.9.tar.gz
. (Tar, eXtract, gZipcompressed File).
That will leave you with a directory with all the files you need.
In this directory type
./configure
This will start the command configure
in the current directory, which will configure things for you.
Then type make
. This will compile the program using the recipe found in a file called Makefile.
Finally, switch to a user with sufficient rights to install package (e.g. root, the unix version of admin) and make install
. This will install the software.
Best Answer
awk - the most common and will be found on most Unix-like systems, oldest version and inferior to newer ones.
mawk - fast AWK implementation which it's code base is based on a byte-code interpreter.
nawk - while the AWK language was being developed the authors released a new version (hence the n - new awk) to avoid confusion. Think of it like the Python 3.0 of AWK.
gawk - abbreviated from GNU awk. The only version in which the developers attempted to add i18n support. Allowed users to write their own C shared libraries to extend it with their own "plug-ins". This version is the standard implementation for Linux, original AWK was written for Unix v7.
There are other versions like jawk (java implementation), bwk (Brian W. Kernighan's implementation) and so on.