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.

346 <strong>G<strong>AWK</strong></strong>: <strong>Effective</strong> <strong>AWK</strong> <strong>Programming</strong>line breaks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21line continuations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91line continuations, gawk . . . . . . . . . . . . . . . . . . . . . . . . 92line continuations, in print statement . . . . . . . . . 59line continuations, with C shell . . . . . . . . . . . . . . . . 20lines, blank, printing. . . . . . . . . . . . . . . . . . . . . . . . . . . 58lines, counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233lines, duplicate, removing . . . . . . . . . . . . . . . . . . . . . 244lines, matching ranges of. . . . . . . . . . . . . . . . . . . . . . . 98lines, skipping between markers . . . . . . . . . . . . . . . . 98lint checking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112lint checking, array elements . . . . . . . . . . . . . . . . . . 123lint checking, array subscripts . . . . . . . . . . . . . . . . 125lint checking, empty programs . . . . . . . . . . . . . . . . 177lint checking, issuing warnings . . . . . . . . . . . . . . . . 180lint checking, POSIXLY_CORRECT environmentvariable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182lint checking, undefined functions . . . . . . . . . . . . . 157LINT variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 167, 278, 314locale categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161locale decimal point character . . . . . . . . . . . . . . . . 180locale, definition of . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35localization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160localization, See internationalization, localization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160log files, timestamps in . . . . . . . . . . . . . . . . . . . . . . . 146log function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131logical false/true. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87logical operators, See Boolean expressions . . . . . . 91login information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206long options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103loops, continue statements and. . . . . . . . . . . . . . . 105loops, count for header . . . . . . . . . . . . . . . . . . . . . . . 175loops, exiting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106loops, See Also while statement . . . . . . . . . . . . . . 103Lost In Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287ls utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20lshift function (gawk) . . . . . . . . . . . . . . . . . . . . . . . 151lvalues/rvalues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Mmailing labels, printing . . . . . . . . . . . . . . . . . . . . . . . 240mailing list, GNITS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9make_builtin internal function . . . . . . . . . . . . . . . 289make_number internal function . . . . . . . . . . . . . . . . 289make_string internal function . . . . . . . . . . . . . . . . 288mark parity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194marked string extraction (internationalization). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164marked strings, extracting . . . . . . . . . . . . . . . . . . . . 164Marx, Groucho . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87match function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134match function, RSTART/RLENGTH variables. . . . . 134matching, expressions, See comparison expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87matching, leftmost longest . . . . . . . . . . . . . . . . . . . . . 50matching, null strings. . . . . . . . . . . . . . . . . . . . . . . . . 143mawk program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282McPhee, Patrick. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264memory, releasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289memory, setting limits . . . . . . . . . . . . . . . . . . . . . . . . 178message object files . . . . . . . . . . . . . . . . . . . . . . . . . . . 161message object files, converting from portableobject files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167message object files, specifying directory of . . . 161,162metacharacters, escape sequences for . . . . . . . . . . . 27mktime function (gawk) . . . . . . . . . . . . . . . . . . . . . . . 146modifiers, in format specifiers . . . . . . . . . . . . . . . . . . 63monetary information, localization . . . . . . . . . . . . 161msgfmt utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Nnames, arrays/variables . . . . . . . . . . . . . . . . . . 119, 186names, functions . . . . . . . . . . . . . . . . . . . . . . . . . 153, 186namespace issues . . . . . . . . . . . . . . . . . . . . . . . . 119, 186namespace issues, functions . . . . . . . . . . . . . . . . . . . 153nawk utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4negative zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304NetBSD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314networks, programming . . . . . . . . . . . . . . . . . . . . . . . 172networks, support for . . . . . . . . . . . . . . . . . . . . . . . . . . 71newlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21, 92, 180newlines, as field separators . . . . . . . . . . . . . . . . . . . . 43newlines, as record separators . . . . . . . . . . . . . . . . . . 36newlines, in dynamic regexps . . . . . . . . . . . . . . . . . . 34newlines, in regexp constants . . . . . . . . . . . . . . . . . . 34newlines, printing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58newlines, separating statements in actions . . . . 101,102next file statement. . . . . . . . . . . . . . . . . . . . . . . . . . 262next file statement, deprecated. . . . . . . . . . . . . . 184next file statement, in gawk . . . . . . . . . . . . . . . . . 109next statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 92, 108next statement, BEGIN/END patterns and . . . . . . 100next statement, user-defined functions and. . . . 108nextfile statement . . . . . . . . . . . . . . . . . . . . . . . . . . 109nextfile statement, BEGIN/END patterns and . . 100nextfile statement, implementing. . . . . . . . . . . . 188nextfile statement, in gawk . . . . . . . . . . . . . . . . . . 109nextfile statement, next file statement and. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184nextfile statement, user-defined functions and. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109nextfile user-defined function . . . . . . . . . . . . . . . 188NF variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 114NF variable, decrementing . . . . . . . . . . . . . . . . . . . . . . 42noassign.awk program . . . . . . . . . . . . . . . . . . . . . . . 200NODE internal type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288nodes, duplicating . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289not Boolean-logic operator . . . . . . . . . . . . . . . . . . . . . 91NR variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 115

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

Saved successfully!

Ooh no, something went wrong!