Foreword |
|
xiii | |
Preface |
|
xv | |
I. The awk Language and gawk |
|
1 | (204) |
|
|
3 | (16) |
|
|
4 | (6) |
|
Datafiles for the Examples |
|
|
10 | (1) |
|
|
11 | (2) |
|
An Example with Two Rules |
|
|
13 | (1) |
|
|
14 | (1) |
|
awk Statements Versus Lines |
|
|
15 | (2) |
|
|
17 | (1) |
|
|
17 | (2) |
|
|
19 | (14) |
|
How to Use Regular Expressions |
|
|
19 | (2) |
|
|
21 | (2) |
|
Regular Expression Operators |
|
|
23 | (3) |
|
|
26 | (2) |
|
gawk-Specific Regexp Operators |
|
|
28 | (1) |
|
Case Sensitivity in Matching |
|
|
29 | (2) |
|
|
31 | (1) |
|
|
31 | (2) |
|
|
33 | (25) |
|
How Input Is Split into Records |
|
|
33 | (3) |
|
|
36 | (2) |
|
Non-constant Field Numbers |
|
|
38 | (1) |
|
Changing the Contents of a Field |
|
|
39 | (2) |
|
Specifying How Fields Are Separated |
|
|
41 | (5) |
|
|
46 | (2) |
|
|
48 | (3) |
|
Explicit Input with getline |
|
|
51 | (7) |
|
|
58 | (20) |
|
|
58 | (1) |
|
Examples of print Statements |
|
|
59 | (1) |
|
|
60 | (1) |
|
Controlling Numeric Output with print |
|
|
61 | (1) |
|
Using printf Statements for Fancier Printing |
|
|
62 | (6) |
|
Redirecting Output of print and printf |
|
|
68 | (2) |
|
Special Filenames in gawk |
|
|
70 | (4) |
|
Closing Input and Output Redirections |
|
|
74 | (4) |
|
|
78 | (25) |
|
|
79 | (2) |
|
Using Regular Expression Constants |
|
|
81 | (1) |
|
|
82 | (2) |
|
Conversion of Strings and Numbers |
|
|
84 | (1) |
|
|
85 | (2) |
|
|
87 | (1) |
|
|
88 | (4) |
|
Increment and Decrement Operators |
|
|
92 | (1) |
|
|
93 | (1) |
|
Variable Typing and Comparison Expressions |
|
|
94 | (3) |
|
|
97 | (2) |
|
|
99 | (1) |
|
|
99 | (2) |
|
Operator Precedence (How Operators Nest) |
|
|
101 | (2) |
|
Patterns, Actions, and Variables |
|
|
103 | (26) |
|
|
103 | (6) |
|
Using Shell Variables in Programs |
|
|
109 | (1) |
|
|
110 | (1) |
|
Control Statements in Actions |
|
|
111 | (9) |
|
|
120 | (9) |
|
|
129 | (13) |
|
|
130 | (2) |
|
Referring to an Array Element |
|
|
132 | (1) |
|
|
133 | (1) |
|
|
133 | (1) |
|
Scanning All Elements of an Array |
|
|
134 | (1) |
|
|
135 | (1) |
|
Using Numbers to Subscript Arrays |
|
|
136 | (1) |
|
Using Uninitialized Variables as Subscripts |
|
|
137 | (1) |
|
|
138 | (1) |
|
Scanning Multidimensional Arrays |
|
|
139 | (1) |
|
Sorting Array Values and Indices with gawk |
|
|
140 | (2) |
|
|
142 | (32) |
|
|
142 | (24) |
|
|
166 | (8) |
|
Internationalization with gawk |
|
|
174 | (11) |
|
Internationalization and Localization |
|
|
174 | (1) |
|
|
175 | (2) |
|
Internationalizing awk Programs |
|
|
177 | (2) |
|
|
179 | (3) |
|
A Simple Internationalization Example |
|
|
182 | (1) |
|
gawk Can Speak Your Language |
|
|
183 | (2) |
|
Advanced Features of gawk |
|
|
185 | (9) |
|
Allowing Nondecimal Input Data |
|
|
185 | (1) |
|
Two-Way Communications with Another Process |
|
|
186 | (2) |
|
Using gawk for Network Programming |
|
|
188 | (1) |
|
Using gawk with BSD Portals |
|
|
189 | (1) |
|
Profiling Your awk Programs |
|
|
190 | (4) |
|
|
194 | (11) |
|
|
194 | (1) |
|
|
195 | (5) |
|
Other Command-Line Arguments |
|
|
200 | (1) |
|
The AWKPATH Environment Variable |
|
|
201 | (1) |
|
Obsolete Options and/or Features |
|
|
202 | (1) |
|
|
203 | (2) |
II. Using awk and gawk |
|
205 | (120) |
|
A Library of awk Functions |
|
|
207 | (30) |
|
Naming Library Function Global Variables |
|
|
208 | (2) |
|
|
210 | (8) |
|
|
218 | (4) |
|
Processing Command-Line Options |
|
|
222 | (6) |
|
Reading the User Database |
|
|
228 | (4) |
|
Reading the Group Database |
|
|
232 | (5) |
|
|
237 | (44) |
|
Running the Example Programs |
|
|
237 | (1) |
|
Reinventing Wheels for Fun and Profit |
|
|
238 | (21) |
|
A Grab Bag of awk Programs |
|
|
259 | (22) |
|
Internetworking with gawk |
|
|
281 | (44) |
|
|
281 | (24) |
|
Some Applications and Techniques |
|
|
305 | (18) |
|
|
323 | (2) |
III. Appendixes |
|
325 | (66) |
|
A. The Evolution of the awk Language |
|
|
327 | (10) |
|
|
337 | (13) |
|
|
350 | (17) |
|
D. Basic Programming Concepts |
|
|
367 | (7) |
|
E. GNU General Public License |
|
|
374 | (8) |
|
F. GNU Free Documentation License |
|
|
382 | (9) |
Glossary |
|
391 | (12) |
Index |
|
403 | |