Next: , Previous: , Up: Gawk Distribution   [Contents][Index]


B.1.2 Extracting the Distribution

gawk is distributed as several tar files compressed with different compression programs: gzip, bzip2, and xz. For simplicity, the rest of these instructions assume you are using the one compressed with the GNU Zip program, gzip.

Once you have the distribution (for example, gawk-4.1.1.tar.gz), use gzip to expand the file and then use tar to extract it. You can use the following pipeline to produce the gawk distribution:

# Under System V, add 'o' to the tar options
gzip -d -c gawk-4.1.1.tar.gz | tar -xvpf -

On a system with GNU tar, you can let tar do the decompression for you:

tar -xvpzf gawk-4.1.1.tar.gz

Extracting the archive creates a directory named gawk-4.1.1 in the current directory.

The distribution file name is of the form gawk-V.R.P.tar.gz. The V represents the major version of gawk, the R represents the current release of version V, and the P represents a patch level, meaning that minor bugs have been fixed in the release. The current patch level is 1, but when retrieving distributions, you should get the version with the highest version, release, and patch level. (Note, however, that patch levels greater than or equal to 70 denote “beta” or nonproduction software; you might not want to retrieve such a version unless you don’t mind experimenting.) If you are not on a Unix or GNU/Linux system, you need to make other arrangements for getting and extracting the gawk distribution. You should consult a local expert.