
769
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Chapter 11
11
The gawk Programming
Language
gawk is the GNU version of awk, a powerful utility often used for text and string
manipulation within shell scripts, particularly when input data can be viewed as
records and fields. awk is also an elegant and capable programming language that
allows you to accomplish a lot with very little work.
This chapter presents the following topics:
• Conceptual overview
• Command-line syntax
• Patterns and procedures
• Built-in variables
• Operators
• Variables and array assignment
• User-defined functions
• gawk-specific facilities
• Implementation limits
• Group listing of awk functions and commands
• Alphabetical summary of awk functions and commands
• Source code
For more information, see sed & awk and the Free Software Foundation book
Effective awk Programming, both published by O’Reilly.
Conceptual Overview
awk is a pattern-matching program for processing files, especially when each line
has a simple field-oriented layout. Linux provides the GNU version of awk, called