21.07.2015 Views

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix B: Installing gawk 265Appendix B Installing gawkThis appendix provides instructions for installing gawk on the various platforms that aresupported by the developers. The primary developer supports GNU/Linux (and Unix),whereas the other ports are contributed. See Section B.5 [Reporting Problems and Bugs],page 280, for the electronic mail addresses of the people who did the respective ports.B.1 The gawk DistributionThis section describes how to get the gawk distribution, how to extract it, and then whatis in the various files and subdirectories.B.1.1 Getting the gawk DistributionThere are three ways to get GNU software:• Copy it from someone else who already has it.• Retrieve gawk from the Internet host ftp.gnu.org, in the directory ‘/gnu/gawk’. Bothanonymous ftp and http access are supported. If you have the wget program, you canuse a command like the following:wget http://ftp.gnu.org/gnu/gawk/gawk-3.1.8.tar.gzThe GNU software archive is mirrored around the world. The up-to-date list of mirrorsites is available from the main FSF web site. Try to use one of the mirrors; they will beless busy, and you can usually find one closer to your site.B.1.2 Extracting the Distributiongawk is distributed as a tar file compressed with the GNU Zip program, gzip.Once you have the distribution (for example, ‘gawk-3.1.8.tar.gz’), use gzip to expandthe file and then use tar to extract it. You can use the following pipeline to produce thegawk distribution:# Under System V, add ’o’ to the tar optionsgzip -d -c gawk-3.1.8.tar.gz | tar -xvpf -This creates a directory named ‘gawk-3.1.8’ in the current directory.The distribution file name is of the form ‘gawk-V.R.P.tar.gz’. The V represents themajor version of gawk, the R represents the current release of version V, and the P representsa patch level, meaning that minor bugs have been fixed in the release. The current patchlevel is 8, but when retrieving distributions, you should get the version with the highestversion, release, and patch level. (Note, however, that patch levels greater than or equal to80 denote “beta” or nonproduction software; you might not want to retrieve such a versionunless you don’t mind experimenting.) If you are not on a Unix system, you need to makeother arrangements for getting and extracting the gawk distribution. You should consult alocal expert.B.1.3 Contents of the gawk DistributionThe gawk distribution has a number of C source files, documentation files, subdirectories,and files related to the configuration process (see Section B.2 [Compiling and Installinggawk on Unix], page 268), as well as several subdirectories related to different non-Unixoperating systems:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!