21.07.2015 Views

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Index 347NR variable, changing . . . . . . . . . . . . . . . . . . . . . . . . . 116null strings . . . . . . . . . . . . . . . . . . . . . . . . 37, 44, 87, 302null strings, array elements and . . . . . . . . . . . . . . . 123null strings, as array subscripts . . . . . . . . . . . . . . . 125null strings, converting numbers to strings . . . . . 79null strings, matching. . . . . . . . . . . . . . . . . . . . . . . . . 143null strings, quoting and . . . . . . . . . . . . . . . . . . . . . . . 15number sign (#), #! (executable scripts). . . . . . . . 13number sign (#), #! (executable scripts),portability issues with . . . . . . . . . . . . . . . . . . . . . 13number sign (#), commenting . . . . . . . . . . . . . . . . . . 14numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289numbers, as array subscripts . . . . . . . . . . . . . . . . . . 124numbers, as values of characters . . . . . . . . . . . . . . 193numbers, Cliff random . . . . . . . . . . . . . . . . . . . . . . . . 193numbers, converting . . . . . . . . . . . . . . . . . . . . . . . . . . . 79numbers, converting, to strings . . . . . . 111, 112, 152numbers, floating-point . . . . . . . . . . . . . . . . . . . . . . . 301numbers, floating-point, <strong>AWK</strong>NUM internal type . . 288numbers, hexadecimal . . . . . . . . . . . . . . . . . . . . . . . . . 75numbers, NODE internal type . . . . . . . . . . . . . . . . . . 288numbers, octal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75numbers, random . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131numbers, rounding . . . . . . . . . . . . . . . . . . . . . . . . . . . 192numeric, constants. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75numeric, output format . . . . . . . . . . . . . . . . . . . . . . . . 60numeric, strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88numeric, values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288Ooawk utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4obsolete features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184octal numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75octal values, enabling interpretation of . . . . . . . . 180OFMT variable. . . . . . . . . . . . . . . . . . . . . . . . . . 60, 80, 112OFMT variable, POSIX awk and . . . . . . . . . . . . . . . . . 61OFS variable . . . . . . . . . . . . . . . . . . . . . . . . . . . 41, 60, 112OpenBSD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314OpenSolaris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283operating systems, BSD-based. . . . . . . . . . . . . . 7, 173operating systems, PC, gawk on. . . . . . . . . . . . . . . 273operating systems, PC, gawk on, installing . . . . 270operating systems, porting gawk to. . . . . . . . . . . . 286operating systems, See Also GNU/Linux, PCoperating systems, Unix. . . . . . . . . . . . . . . . . . 265operations, bitwise. . . . . . . . . . . . . . . . . . . . . . . . . . . . 150operators, arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . 81operators, assignment . . . . . . . . . . . . . . . . . . . . . . 83, 84operators, assignment, evaluation order . . . . . . . . 85operators, Boolean, See Boolean expressions. . . . 91operators, decrement/increment. . . . . . . . . . . . . . . . 86operators, GNU-specific . . . . . . . . . . . . . . . . . . . . . . . 31operators, input/output . . . . . 53, 54, 56, 66, 68, 95operators, logical, See Boolean expressions . . . . . 91operators, precedence . . . . . . . . . . . . . . . . . . . . . . 87, 94operators, relational, See operators, comparison. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87operators, short-circuit . . . . . . . . . . . . . . . . . . . . . . . . 91operators, string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82operators, string-matching . . . . . . . . . . . . . . . . . . . . . 24operators, string-matching, for buffers. . . . . . . . . . 31operators, word-boundary (gawk) . . . . . . . . . . . . . . 31options, command-line . . . . . . . . . . . . . . . . 12, 45, 177options, command-line, end of . . . . . . . . . . . . . . . . 178options, command-line, invoking awk . . . . . . . . . . 177options, command-line, processing . . . . . . . . . . . . 201options, deprecated . . . . . . . . . . . . . . . . . . . . . . . . . . . 184options, long . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177options, printing list of . . . . . . . . . . . . . . . . . . . . . . . 179OR bitwise operation . . . . . . . . . . . . . . . . . . . . . . . . . 150or Boolean-logic operator . . . . . . . . . . . . . . . . . . . . . . 91or function (gawk) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151ord user-defined function . . . . . . . . . . . . . . . . . . . . . 193order of evaluation, concatenation. . . . . . . . . . . . . . 83ORS variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60, 112output field separator, See OFS variable . . . . . . . . 41output record separator, See ORS variable . . . . . . 60output redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66output, buffering . . . . . . . . . . . . . . . . . . . . . . . . 143, 145output, duplicating into files . . . . . . . . . . . . . . . . . . 228output, files, closing . . . . . . . . . . . . . . . . . . . . . . . . . . . 71output, format specifier, OFMT . . . . . . . . . . . . . . . . . . 60output, formatted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61output, pipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67output, printing, See printing . . . . . . . . . . . . . . . . . . 58output, records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60output, standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69PP1003.2 POSIX standard . . . . . . . . . . . . . . . . . . . . . 312param_cnt internal variable . . . . . . . . . . . . . . . . . . . 288parameters, number of. . . . . . . . . . . . . . . . . . . . . . . . 288parentheses (). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28parentheses (), pgawk program . . . . . . . . . . . . . . . 175password file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96patterns, comparison expressions as . . . . . . . . . . . . 96patterns, counts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175patterns, default . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18patterns, empty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100patterns, expressions as . . . . . . . . . . . . . . . . . . . . . . . . 96patterns, ranges in. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98patterns, regexp constants as . . . . . . . . . . . . . . . . . . 97patterns, types of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96pawk profiling Bell Labs awk . . . . . . . . . . . . . . . . . . 283PC operating systems, gawk on . . . . . . . . . . . . . . . 273PC operating systems, gawk on, installing . . . . . 270percent sign (%), % operator . . . . . . . . . . . . . . . . . . . . 95percent sign (%), %= operator . . . . . . . . . . . . . . . 85, 95period (.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27PERL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297Peters, Arno . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264Peterson, Hal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264pgawk program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!