Foreword to the Third Edition
Foreword to the Fourth Edition
Preface
Part Ⅰ. The awk Language
1. Getting Started with awk
How to Run awk Programs
One-Shot Throwaway awk Programs
Running awk Without Input Files
Running Long Programs
Executable awk Programs
Comments in awk Programs
Shell Quoting Issues
Datafiles for the Examples
Some Simple Examples
An Example with Two Rules
A More Complex Example
awk Statements Versus Lines
Other Features of awk
When to Use awk
Summary
2. Running awk and gawk
Invoking awk
Command-Line Options
Other Command-Line Arguments
Naming Standard Input
The Environment Variables gawk Uses
The AWKPATH Environment Variable
The AWKLIBPATH Environment Variable
Other Environment Variables
gawks Exit Status
Including Other Files into Your Program
Loading Dynamic Extensions into Your Program
Obsolete Options and/or Features
Undocumented Options and Features
Summary
3. Regular Expressions
How to Use Regular Expressions
Escape Sequences
Regular Expression Operators
Using Bracket Expressions
How Much Text Matches?
Using Dynamic Regexps
gawk-Specific Regexp Operators
Case Sensitivity in Matching
Summary
4. Reading Input Files
How Input Is Split into Records
Record Splitting with Standard awk
Record Splitting with gawk
Examining Fields
Nonconstant Field Numbers
Changing the Contents of a Field
Specifying How Fields Are Separated
Whitespace Normally Separates Fields
Using Regular Expressions to Separate Fields
Making Each Character a Separate Field
Setting FS from the Command Line
Making the Full Line Be a Single Field
Field-Splitting Summary
Reading Fixed-Width Data
Defining Fields by Content
Multiple-Line Records
Explicit Input with getline
Using getline with No Arguments
Using getline into a Variable
Using getline from a File
5. Printing Output
6. Expressions
7. Patterns, Actions, and Variables
8. Arrays in awk
9. Functions
Part Ⅱ. Problem Solving with awk
1O. A Library of awk Functions
11. Practical awk Programs
Part Ⅲ. Moving Beyond Standard awkwith gawk
12. Advanced Features of gawk
13. Internationalization with gawk
14. Debugging awk Programs
15. Arithmetic and Arbitrary-Precision Arithmetic with gawk
16. Writing Extensions for gawk
Part Ⅳ. Appendices
A. The Evolution of the awk Language
B. Installing gawk
C. GNU General Public License
Index