6 GAWK: Effective AWK Programming
Chapter 7 [Patterns, Actions, and Variables], page 111, describes how to write patterns
for matching records, actions for doing something when a record is matched, and the built-in
variables awk and gawk use.
Chapter 8 [Arrays in awk], page 135, covers awk’s one-and-only data structure: associa-
tive arrays. Deleting array elements and whole arrays is also described, as well as sorting
arrays in gawk. It also describes how gawk provides arrays of arrays.
Chapter 9 [Functions], page 147, describes the built-in functions awk and gawk provide,
as well as how to define your own functions.
Chapter 10 [Internationalization with gawk], page 185, describes special features in gawk
for translating program messages into different languages at runtime.
Chapter 11 [Advanced Features of gawk], page 195, describes a number of gawk-specific
advanced features. Of particular note are the abilities to have two-way communications
with another process, perform TCP/IP networking, and profile your awk programs.
Chapter 12 [A Library of awk Functions], page 211, and Chapter 13 [Practical awk
Programs], page 241, provide many sample awk programs. Reading them allows you to see
awk solving real problems.
Chapter 14 [dgawk: The awk Debugger], page 285, describes the awk debugger, dgawk.
Appendix A [The Evolution of the awk Language], page 301, describes how the awk
language has evolved since its first release to present. It also describes how gawk has
acquired features over time.
Appendix B [Installing gawk], page 309, describes how to get gawk, how to compile it on
POSIX-compatible systems, and how to compile and use it on different non-POSIX systems.
It also describes how to report bugs in gawk and where to get other freely available awk
implementations.
Appendix C [Implementation Notes], page 325, describes how to disable gawk’s exten-
sions, as well as how to contribute new code to gawk, how to write extension libraries, and
some possible future directions for gawk development.
Appendix D [Basic Programming Concepts], page 341, provides some very cursory back-
ground material for those who are completely unfamiliar with computer programming. Also
centralized there is a discussion of some of the issues surrounding floating-point numbers.
The [Glossary], page 347, defines most, if not all, the significant terms used throughout
the book. If you find terms that you aren’t familiar with, try looking them up here.
[GNU General Public License], page 357, and [GNU Free Documentation License],
page 369, present the licenses that cover the gawk source code and this book, respectively.
Typographical Conventions
This book is written in Texinfo, the GNU documentation formatting language. A single
Texinfo source file is used to produce both the printed and online versions of the documen-
tation. Because of this, the typographical conventions are slightly different than in other
books you may have read.
Examples you would type at the command-line are preceded by the common shell pri-
mary and secondary prompts, ‘$’ and ‘>’. Input that you type is shown like this. Output
from the command is preceded by the glyph “
a
”. This typically represents the command’s