21.07.2015 Views

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

350 <strong>G<strong>AWK</strong></strong>: <strong>Effective</strong> <strong>AWK</strong> <strong>Programming</strong>Robbins, Jean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Robbins, Miriam . . . . . . . . . . . . . . . . . . . . . . . 9, 55, 207Robinson, Will . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287robot, the . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287Rommel, Kai Uwe . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264round user-defined function . . . . . . . . . . . . . . . . . . . 192rounding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192rounding numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192RS variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 112RS variable, multiline records and . . . . . . . . . . . . . . 50rshift function (gawk) . . . . . . . . . . . . . . . . . . . . . . . 151RSTART variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115RSTART variable, match function and . . . . . . . . . . 134RT variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38, 51, 116Rubin, Paul. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4, 263rule, definition of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11rvalues/lvalues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Sscalar values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301Schorr, Andrew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Schreiber, Bert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Schreiber, Rita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9search paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273, 277search paths, for source files . . . . . . . . . 183, 255, 277searching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133searching, files for regular expressions . . . . . . . . . 220searching, for words . . . . . . . . . . . . . . . . . . . . . . . . . . 235sed utility . . . . . . . . . . . . . . . . . . . . . . . . . . . 47, 248, 306semicolon (;) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22semicolon (;), <strong>AWK</strong>PATH variable and. . . . . . . . . . . 273semicolon (;), separating statements in actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101, 102separators, field. . . . . . . . . . . . . . . . . . . . . . . . . . 111, 112separators, field, FIELDWIDTHS variable and. . . . 111separators, field, POSIX and . . . . . . . . . . . . . . . . . . . 39separators, for records. . . . . . . . . . . . . . . . . . . . . . 36, 37separators, for records, regular expressions as . . 38separators, for statements in actions . . . . . . . . . . 101separators, record . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112separators, subscript. . . . . . . . . . . . . . . . . . . . . . . . . . 113set_value internal function . . . . . . . . . . . . . . . . . . 290shells, piping commands into. . . . . . . . . . . . . . . . . . . 68shells, quoting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100shells, quoting, rules for . . . . . . . . . . . . . . . . . . . . . . . 15shells, scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11shells, variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100shift, bitwise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151short-circuit operators . . . . . . . . . . . . . . . . . . . . . . . . . 91side effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83, 86, 87side effects, array indexing . . . . . . . . . . . . . . . . . . . . 121side effects, asort function . . . . . . . . . . . . . . . . . . . 127side effects, assignment expressions. . . . . . . . . . . . . 84side effects, Boolean operators . . . . . . . . . . . . . . . . . 91side effects, conditional expressions . . . . . . . . . . . . 92side effects, decrement/increment operators . . . . 86side effects, FILENAME variable . . . . . . . . . . . . . . . . . 56side effects, function calls . . . . . . . . . . . . . . . . . . . . . . 93side effects, statements . . . . . . . . . . . . . . . . . . . . . . . 102signals, HUP/SIGHUP. . . . . . . . . . . . . . . . . . . . . . . . . . . 176signals, INT/SIGINT (MS-DOS) . . . . . . . . . . . . . . . 176signals, QUIT/SIGQUIT (MS-DOS) . . . . . . . . . . . . . 176signals, USR1/SIGUSR1 . . . . . . . . . . . . . . . . . . . . . . . . 176sin function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131single quote (’) . . . . . . . . . . . . . . . . . . . . . . . . 11, 13, 15single quote (’), vs. apostrophe . . . . . . . . . . . . . . . . 14single quote (’), with double quotes. . . . . . . . . . . . 15single-character fields . . . . . . . . . . . . . . . . . . . . . . . . . . 45single-precision floating-point . . . . . . . . . . . . . . . . . 301Skywalker, Luke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184sleep utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238sockets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172Solaris, POSIX compliant awk . . . . . . . . . . . . . . . . 283sort function, arrays, sorting . . . . . . . . . . . . . . . . . . 127sort utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243sort utility, coprocesses and . . . . . . . . . . . . . . . . . . 171sorting characters in different languages. . . . . . . 161source code, awka. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282source code, Bell Laboratories awk . . . . . . . . . . . . 281source code, gawk. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265source code, mawk. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282source code, mixing. . . . . . . . . . . . . . . . . . . . . . . . . . . 181source files, search path for . . . . . . . . . . . . . . . . . . . 255sparse arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120Spencer, Henry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306split function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135split function, array elements, deleting. . . . . . . 124split utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226split.awk program. . . . . . . . . . . . . . . . . . . . . . . . . . . 226sprintf function . . . . . . . . . . . . . . . . . . . . . . . . . 60, 136sprintf function, OFMT variable and . . . . . . . . . . 112sprintf function, print/printf statements and. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192sqrt function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131square brackets ([]) . . . . . . . . . . . . . . . . . . . . . . . . . . . 27srand function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Stallman, Richard . . . . . . . . . . . . . . . . . . 7, 9, 263, 310standard input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 69standard output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69stat function, implementing in gawk . . . . . . . . . . 292statements, compound, control statements and. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102statements, control, in actions . . . . . . . . . . . . . . . . 102statements, multiple . . . . . . . . . . . . . . . . . . . . . . . . . . . 22stlen internal variable . . . . . . . . . . . . . . . . . . . . . . . 288stptr internal variable . . . . . . . . . . . . . . . . . . . . . . . 288stream editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47, 248strftime function (gawk) . . . . . . . . . . . . . . . . . . . . . 147string constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75string constants, vs. regexp constants . . . . . . . . . . 34string extraction (internationalization) . . . . . . . . 164string operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82string-matching operators. . . . . . . . . . . . . . . . . . . . . . 24strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288strings, converting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

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

Saved successfully!

Ooh no, something went wrong!