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.

Index 349PROCINFO variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290profiling awk programs . . . . . . . . . . . . . . . . . . . . . . . . 173profiling awk programs, dynamically . . . . . . . . . . 176profiling gawk, See pgawk program . . . . . . . . . . . . 173program, definition of. . . . . . . . . . . . . . . . . . . . . . . . . . 11programmers, attractiveness of. . . . . . . . . . . . . . . . 170programming conventions, --non-decimal-dataoption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169programming conventions, ARGC/ARGV variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113programming conventions, exit statement . . . . 110programming conventions, function parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158programming conventions, functions, calling. . . 130programming conventions, functions, writing . . 154programming conventions, gawk internals . . . . . 294,296programming conventions, nextfile statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188programming conventions, private variable names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187programming language, recipe for . . . . . . . . . . . . . . . 3programming languages, data-driven vs. procedural. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11programming, basic steps . . . . . . . . . . . . . . . . . . . . . 300programming, concepts . . . . . . . . . . . . . . . . . . . . . . . 300pwcat program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206QQSE Awk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283question mark (?) . . . . . . . . . . . . . . . . . . . . . . . . . . 28, 31question mark (?), ?: operator. . . . . . . . . . . . . . . . . 95QuikTrim Awk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283QUIT signal (MS-DOS). . . . . . . . . . . . . . . . . . . . . . . . 176quoting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 13, 14quoting, rules for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14quoting, tricks for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15RRakitzis, Byron. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244rand function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131random numbers, Cliff . . . . . . . . . . . . . . . . . . . . . . . . 193random numbers, rand/srand functions . . . . . . . 131random numbers, seed of . . . . . . . . . . . . . . . . . . . . . 131range expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29range patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Rankin, Pat . . . . . . . . . . . . . . . . . . . . . . . 9, 85, 263, 281raw sockets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172readable data files, checking . . . . . . . . . . . . . . . . . . 199readable.awk program . . . . . . . . . . . . . . . . . . . . . . . 199recipe for a programming language . . . . . . . . . . . . . . 3record separators . . . . . . . . . . . . . . . . . . . . . . . . . 36, 112record separators, changing . . . . . . . . . . . . . . . . . . . . 37record separators, regular expressions as . . . . . . . 38record separators, with multiline records . . . . . . . 49records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 301records, multiline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49records, printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58records, splitting input into . . . . . . . . . . . . . . . . . . . . 36records, terminating . . . . . . . . . . . . . . . . . . . . . . . . . . . 38records, treating files as. . . . . . . . . . . . . . . . . . . . . . . . 39recursive functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . 154redirection of input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53redirection of output. . . . . . . . . . . . . . . . . . . . . . . . . . . 66reference counting, sorting arrays . . . . . . . . . . . . . 128regexp constants . . . . . . . . . . . . . . . . . . . . . . . 25, 76, 90regexp constants, /=.../, /= operator and . . . . . 86regexp constants, as patterns . . . . . . . . . . . . . . . . . . 97regexp constants, in gawk . . . . . . . . . . . . . . . . . . . . . . 77regexp constants, slashes vs. quotes . . . . . . . . . . . . 34regexp constants, vs. string constants . . . . . . . . . . 34regexp, See regular expressions. . . . . . . . . . . . . . . . . 24register_deferred_variable internal function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290register_open_hook internal function . . . . . . . . 290regular expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24regular expressions as field separators . . . . . . . . . . 43regular expressions, anchors in . . . . . . . . . . . . . . . . . 27regular expressions, as field separators . . . . . . . . . 44regular expressions, as patterns. . . . . . . . . . . . . 24, 96regular expressions, as record separators . . . . . . . 38regular expressions, case sensitivity. . . . . . . . 32, 111regular expressions, computed . . . . . . . . . . . . . . . . . 34regular expressions, constants, See regexpconstants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25regular expressions, dynamic . . . . . . . . . . . . . . . . . . . 34regular expressions, dynamic, with embeddednewlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34regular expressions, gawk, command-line options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32regular expressions, interval expressions and . . 181regular expressions, leftmost longest match. . . . . 33regular expressions, operators . . . . . . . . . . . . . . 24, 27regular expressions, operators, for buffers . . . . . . 31regular expressions, operators, for words . . . . . . . 31regular expressions, operators, gawk . . . . . . . . . . . . 31regular expressions, operators, precedence of . . . 29regular expressions, searching for . . . . . . . . . . . . . 220relational operators, See comparison operators . . 87return statement, user-defined functions . . . . . . 157return values, close function . . . . . . . . . . . . . . . . . . 73rev user-defined function . . . . . . . . . . . . . . . . . . . . . 155rewind user-defined function . . . . . . . . . . . . . . . . . . 198right angle bracket (>), > operator. . . . . . . . . . 89, 95right angle bracket (>), > operator (I/O) . . . . . . . 66right angle bracket (>), >= operator. . . . . . . . . 89, 95right angle bracket (>), >> operator (I/O) . . 67, 95right shift, bitwise . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151Ritchie, Dennis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302RLENGTH variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115RLENGTH variable, match function and . . . . . . . . . 134Robbins, Arnold . . . 46, 55, 207, 236, 264, 280, 297Robbins, Bill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Robbins, Harry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

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

Saved successfully!

Ooh no, something went wrong!