This page has been proofread, but needs to be validated.
i

Short Contents

Preface
....................................................................................................................................................................................................................................................
1
1
Introduction
....................................................................................................................................................................................................................................................
5
2
Getting Started with awk
....................................................................................................................................................................................................................................................
9
3
Useful One Line Programs
....................................................................................................................................................................................................................................................
21
4
Regular Expressions
....................................................................................................................................................................................................................................................
23
5
Reading Input Files
....................................................................................................................................................................................................................................................
37
6
Printing Output
....................................................................................................................................................................................................................................................
61
7
Expressions
....................................................................................................................................................................................................................................................
77
8
Patterns and Actions
....................................................................................................................................................................................................................................................
97
9
Control Statements in Actions
....................................................................................................................................................................................................................................................
105
10
Built-in Variables
....................................................................................................................................................................................................................................................
115
11
Arrays in awk
....................................................................................................................................................................................................................................................
123
12
Built-in Functions
....................................................................................................................................................................................................................................................
135
13
User-defined Functions
....................................................................................................................................................................................................................................................
153
14
Running awk
....................................................................................................................................................................................................................................................
161
15
A Library of awk Functions
....................................................................................................................................................................................................................................................
169
16
Practical awk Programs
....................................................................................................................................................................................................................................................
203
17
The Evolution of the awk Language
....................................................................................................................................................................................................................................................
251
Appendix A gawk Summary
....................................................................................................................................................................................................................................................
257
Appendix B Installing gawk
....................................................................................................................................................................................................................................................
277
Appendix C Implementation Notes
....................................................................................................................................................................................................................................................
293
Appendix D Glossary
....................................................................................................................................................................................................................................................
299
GNU GENERAL PUBLIC LICENSE
....................................................................................................................................................................................................................................................
307
Index
....................................................................................................................................................................................................................................................
315