21.07.2015 Views

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8 <strong>G<strong>AWK</strong></strong>: <strong>Effective</strong> <strong>AWK</strong> <strong>Programming</strong>GNU/Linux distributions are often available in computer stores or bundled on CD-ROMswith books about Linux. (There are three other freely available, Unix-like operating systemsfor 80386 and other systems: NetBSD, FreeBSD, and OpenBSD. All are based on the 4.4-Lite Berkeley Software Distribution, and they use recent versions of gawk for their versionsof awk.)The book you are reading is actually free—at least, the information in it is free toanyone. The machine-readable source code for the book comes with gawk; anyone may takethis book to a copying machine and make as many copies as they like. (Take a moment tocheck the Free Documentation License in [GNU Free Documentation License], page 327.)Although you could just print it out yourself, bound books are much easier to read anduse. Furthermore, the proceeds from sales of this book go back to the FSF to help funddevelopment of more free software.The book itself has gone through a number of previous editions. Paul Rubin wrote thevery first draft of The <strong>G<strong>AWK</strong></strong> Manual; it was around 40 pages in size. Diane Close andRichard Stallman improved it, yielding a version that was around 90 pages long and barelydescribed the original, “old” version of awk.I started working with that version in the fall of 1988. As work on it progressed, the FSFpublished several preliminary versions (numbered 0.x). In 1996, Edition 1.0 was releasedwith gawk 3.0.0. The FSF published the first two editions under the title The GNU AwkUser’s Guide.This edition maintains the basic structure of Edition 1.0, but with significant additionalmaterial, reflecting the host of new features in gawk version 3.1. Of particular note isSection 7.11 [Sorting Array Values and Indices with gawk], page 127, as well as Section 8.1.6[Bit-Manipulation Functions of gawk], page 150, Chapter 9 [Internationalization with gawk],page 160, and also Chapter 10 [Advanced Features of gawk], page 169, and Section C.3[Adding New Built-in Functions to gawk], page 287.<strong>G<strong>AWK</strong></strong>: <strong>Effective</strong> <strong>AWK</strong> <strong>Programming</strong> will undoubtedly continue to evolve. An electronicversion comes with the gawk distribution from the FSF. If you find an error in this book,please report it! See Section B.5 [Reporting Problems and Bugs], page 280, for informationon submitting problem reports electronically, or write to me in care of the publisher.How to ContributeAs the maintainer of GNU awk, I once thought that I would be able to manage a collection ofpublicly available awk programs and I even solicited contributions. Making things availableon the Internet helps keep the gawk distribution down to manageable size.The initial collection of material, such as it is, is still available atftp://ftp.freefriends.org/arnold/Awkstuff. In the hopes of doing somethingmore broad, I acquired the awk.info domain.However, I found that I could not dedicate enough time to managing contributed code:the archive did not grow and the domain went unused for several years.Fortunately, late in 2008, a volunteer took on the task of setting up an awk-related website—http://awk.info—and did a very nice job.If you have written an interesting awk program, or have written a gawk extension that youwould like to share with the rest of the world, please see http://awk.info/?contributefor how to contribute it to the web site.

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

Saved successfully!

Ooh no, something went wrong!