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 351strings, converting, numbers to . . . . . . 111, 112, 152strings, empty, See null strings . . . . . . . . . . . . . . . . . 37strings, extracting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164strings, for localization . . . . . . . . . . . . . . . . . . . . . . . 162strings, length of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75strings, merging arrays into . . . . . . . . . . . . . . . . . . . 195strings, NODE internal type . . . . . . . . . . . . . . . . . . . . 288strings, null . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44strings, numeric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88strings, splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136strtonum function (gawk) . . . . . . . . . . . . . . . . . . . . . 136strtonum function (gawk), --non-decimal-dataoption and . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169sub function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77, 137sub function, arguments of. . . . . . . . . . . . . . . . . . . . 138sub function, escape processing . . . . . . . . . . . . . . . 140subscript separators . . . . . . . . . . . . . . . . . . . . . . . . . . 113subscripts in arrays, multidimensional. . . . . . . . . 125subscripts in arrays, multidimensional, scanning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127subscripts in arrays, numbers as . . . . . . . . . . . . . . 124subscripts in arrays, uninitialized variables as. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125SUBSEP variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113SUBSEP variable, multidimensional arrays. . . . . . 125substr function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139Sumner, Andrew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282switch statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105syntactic ambiguity: /= operator vs. /=.../ regexpconstant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86system function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144systime function (gawk) . . . . . . . . . . . . . . . . . . . . . . 146Ttandem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279Tcl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172TCP/IP, support for. . . . . . . . . . . . . . . . . . . . . . . . . . . 71tee utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228tee.awk program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228terminating records . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38testbits.awk program . . . . . . . . . . . . . . . . . . . . . . . 151Texinfo . . . . . . . . . . . . . . . . . 6, 186, 235, 245, 266, 285Texinfo, chapter beginnings in files . . . . . . . . . . . . . 27Texinfo, extracting programs from source files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245text, printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58text, printing, unduplicated lines of . . . . . . . . . . . 229textdomain function (C library) . . . . . . . . . . . . . . 160TEXTDOMAIN variable . . . . . . . . . . . . . . . . . . . . . 113, 162TEXTDOMAIN variable, BEGIN pattern and . . . . . . 163TEXTDOMAIN variable, portability and . . . . . . . . . . 165tilde (~), ~ operator . . 24, 32, 34, 76, 89, 90, 95, 97time, alarm clock example program . . . . . . . . . . . 236time, localization and. . . . . . . . . . . . . . . . . . . . . . . . . 162time, managing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195time, retrieving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146timestamps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146timestamps, converting dates to . . . . . . . . . . . . . . 147timestamps, formatted. . . . . . . . . . . . . . . . . . . . . . . . 195tmp_number internal function . . . . . . . . . . . . . . . . . 289tmp_string internal function . . . . . . . . . . . . . . . . . 289tolower function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140toupper function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140tr utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238translate.awk program . . . . . . . . . . . . . . . . . . . . . . 239troubleshooting, --non-decimal-data option . . 180troubleshooting, -F option . . . . . . . . . . . . . . . . . . . . 185troubleshooting, == operator . . . . . . . . . . . . . . . . . . . 89troubleshooting, awk uses FS not IFS . . . . . . . . . . . 43troubleshooting, backslash before nonspecialcharacter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26troubleshooting, division . . . . . . . . . . . . . . . . . . . . . . . 81troubleshooting, fatal errors, field widths,specifying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48troubleshooting, fatal errors, printf format strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65troubleshooting, fflush function. . . . . . . . . . . . . . 144troubleshooting, function call syntax . . . . . . . . . . . 93troubleshooting, gawk . . . . . . . . . . . . . . . . . . . . 185, 284troubleshooting, gawk, bug reports . . . . . . . . . . . . 280troubleshooting, gawk, fatal errors, functionarguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130troubleshooting, getline function . . . . . . . . . . . . 199troubleshooting, gsub/sub functions . . . . . . . . . . 138troubleshooting, match function. . . . . . . . . . . . . . . 135troubleshooting, print statement, omittingcommas. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59troubleshooting, printing. . . . . . . . . . . . . . . . . . . . . . . 68troubleshooting, quotes with file names . . . . . . . . 70troubleshooting, readable data files . . . . . . . . . . . 199troubleshooting, regexp constants vs. stringconstants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34troubleshooting, string concatenation . . . . . . . . . . 82troubleshooting, substr function. . . . . . . . . . . . . . 139troubleshooting, system function. . . . . . . . . . . . . . 144troubleshooting, typographical errors, globalvariables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179true, logical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Trueman, David . . . . . . . . . . . . . . . . . . . . . . . . . 4, 9, 263trunc-mod operation. . . . . . . . . . . . . . . . . . . . . . . . . . . 82truth values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87type conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79type internal variable. . . . . . . . . . . . . . . . . . . . . . . . . 288Uundefined functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 157underscore (_), _ C macro . . . . . . . . . . . . . . . . . . . . 161underscore (_), in names of private variables . . 187underscore (_), translatable string . . . . . . . . . . . . 163undocumented features . . . . . . . . . . . . . . . . . . . . . . . 184uninitialized variables, as array subscripts. . . . . 125uniq utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229uniq.awk program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

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

Saved successfully!

Ooh no, something went wrong!