From 1059680510215830da7e2eb91e72e4623d460d19 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 13 Aug 2014 06:30:39 +0300 Subject: Doc updates. Start on reviewer comments. --- doc/gawk.info | 1160 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 577 insertions(+), 583 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 5a07d84d..8035803b 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -1159,13 +1159,6 @@ system for Intel(R), Power Architecture, Sun SPARC, IBM S/390, and other systems.(2) Many GNU/Linux distributions are available for download from the Internet. - (There are numerous other freely available, Unix-like operating -systems based on the Berkeley Software Distribution, and some of them -use recent versions of `gawk' for their versions of `awk'. NetBSD -(http://www.netbsd.org), FreeBSD (http://www.freebsd.org), and OpenBSD -(http://www.openbsd.org) are three of the most popular ones, but there -are others.) - The Info file itself has gone through a number of previous editions. Paul Rubin wrote the very first draft of `The GAWK Manual'; it was around 40 pages in size. Diane Close and Richard Stallman improved it, @@ -1300,16 +1293,26 @@ be a pleasure working with this team of fine people. Notable code and documentation contributions were made by a number of people. *Note Contributors::, for the full list. - Thanks to Patrice Dumas for the new `makeinfo' program. Thanks to + Thanks to Patrice Dumas for the new `makeinfo' program. Thanks to Karl Berry who continues to work to keep the Texinfo markup language sane. + Robert P.J. Day, Michael Brennan and Brian Kernighan kindly acted as +reviewers for the 2015 edition of this Info file. Their feedback helped +improve the final work. + I would like to thank Brian Kernighan for invaluable assistance during the testing and debugging of `gawk', and for ongoing help and advice in clarifying numerous points about the language. We could not have done nearly as good a job on either `gawk' or its documentation without his help. + Brian is in a class by himself as a programmer and technical author. +I have to thank him (yet again) for his ongoing friendship and the +role-model he has been for me for close to 30 years! Having him as a +reviewer is an exciting privilege. It has also been extremely +humbling... + I must thank my wonderful wife, Miriam, for her patience through the many versions of this project, for her proofreading, and for sharing me with the computer. I would like to thank my parents for their love, @@ -1927,12 +1930,13 @@ different ways to do the same things shown here: * Print the length of the longest line in `data': - expand data | awk '{ if (x < length()) x = length() } + expand data | awk '{ if (x < length($0)) x = length($0) } END { print "maximum line length is " x }' + This example differs slightly from the first example in this list: The input is processed by the `expand' utility to change TABs into spaces, so the widths compared are actually the right-margin - columns. + columns, as opposed to the number of input characters on each line. * Print every line that has at least one field: @@ -6786,9 +6790,9 @@ message to standard error in an `awk' program is as follows: This works by opening a pipeline to a shell command that can access the standard error stream that it inherits from the `awk' process. This is -far from elegant, and it is also inefficient, because it requires a -separate process. So people writing `awk' programs often don't do -this. Instead, they send the error messages to the screen, like this: +far from elegant, and it also requires a separate process. So people +writing `awk' programs often don't do this. Instead, they send the +error messages to the screen, like this: print "Serious error detected!" > "/dev/tty" @@ -7803,8 +7807,9 @@ Otherwise, it's parsed as follows: => -12 (-24) => -12-24 - As mentioned earlier, when doing concatenation, _parenthesize_. -Otherwise, you're never quite sure what you'll get. + As mentioned earlier, when mixing concatenation with other +operators, _parenthesize_. Otherwise, you're never quite sure what +you'll get. ---------- Footnotes ---------- @@ -8138,16 +8143,11 @@ File: gawk.info, Node: Variable Typing, Next: Comparison Operators, Up: Typin 6.3.2.1 String Type Versus Numeric Type ....................................... -The 1992 POSIX standard introduced the concept of a "numeric string", -which is simply a string that looks like a number--for example, -`" +2"'. This concept is used for determining the type of a variable. -The type of the variable is important because the types of two variables -determine how they are compared. - - The various versions of the POSIX standard did not get the rules -quite right for several editions. Fortunately, as of at least the 2008 -standard (and possibly earlier), the standard has been fixed, and -variable typing follows these rules:(1) +The POSIX standard introduced the concept of a "numeric string", which +is simply a string that looks like a number--for example, `" +2"'. +This concept is used for determining the type of a variable. The type +of the variable is important because the types of two variables +determine how they are compared. Variable typing follows these rules: * A numeric constant or the result of a numeric operation has the NUMERIC attribute. @@ -8225,11 +8225,6 @@ comparison between the two different constants is true, `0' otherwise: $ echo ' +3.14' | gawk '{ print $1 == 3.14 }' True -| 1 - ---------- Footnotes ---------- - - (1) `gawk' has followed these rules for many years, and it is -gratifying that the POSIX standard is also now correct. -  File: gawk.info, Node: Comparison Operators, Next: POSIX String Comparison, Prev: Variable Typing, Up: Typing and Comparison @@ -11695,7 +11690,8 @@ brackets ([ ]): `log(X)' Return the natural logarithm of X, if X is positive; otherwise, - report an error. + return `NaN' ("not a number") on IEEE 754 systems. Additionally, + `gawk' prints a warning message when `x' is negative. `rand()' Return a random number. The values of `rand()' are uniformly @@ -31198,7 +31194,6 @@ Index * algorithms: Basic High Level. (line 68) * allocating memory for extensions: Memory Allocation Functions. (line 6) -* Alpha (DEC): Manual History. (line 28) * amazing awk assembler (aaa): Glossary. (line 11) * amazingly workable formatter (awf): Glossary. (line 24) * ambiguity, syntactic: /= operator vs. /=.../ regexp constant: Assignment Ops. @@ -31614,7 +31609,7 @@ Index (line 131) * close() function, two-way pipes and: Two-way I/O. (line 77) * Close, Diane <1>: Contributors. (line 20) -* Close, Diane: Manual History. (line 41) +* Close, Diane: Manual History. (line 34) * Collado, Manuel: Acknowledgments. (line 60) * collating elements: Bracket Expressions. (line 77) * collating symbols: Bracket Expressions. (line 84) @@ -32399,7 +32394,7 @@ Index (line 47) * functions, user-defined, next/nextfile statements and: Next Statement. (line 45) -* G-d: Acknowledgments. (line 82) +* G-d: Acknowledgments. (line 92) * Garfinkle, Scott: Contributors. (line 34) * gawk program, dynamic profiling: Profiling. (line 179) * gawk version: Auto-set. (line 199) @@ -32725,7 +32720,7 @@ Index * Kernighan, Brian <6>: Library Functions. (line 12) * Kernighan, Brian <7>: Concatenation. (line 6) * Kernighan, Brian <8>: Getline/Pipe. (line 6) -* Kernighan, Brian <9>: Acknowledgments. (line 76) +* Kernighan, Brian <9>: Acknowledgments. (line 80) * Kernighan, Brian <10>: Conventions. (line 34) * Kernighan, Brian: History. (line 17) * kill command, dynamic profiling: Profiling. (line 188) @@ -33279,12 +33274,12 @@ Index * Rakitzis, Byron: History Sorting. (line 25) * Ramey, Chet <1>: General Data Types. (line 6) * Ramey, Chet: Acknowledgments. (line 60) -* rand: Numeric Functions. (line 34) +* rand: Numeric Functions. (line 35) * random numbers, Cliff: Cliff Random Function. (line 6) * random numbers, rand()/srand() functions: Numeric Functions. - (line 34) -* random numbers, seed of: Numeric Functions. (line 64) + (line 35) +* random numbers, seed of: Numeric Functions. (line 65) * range expressions (regexps): Bracket Expressions. (line 6) * range patterns: Ranges. (line 6) * range patterns, line continuation and: Ranges. (line 65) @@ -33406,11 +33401,11 @@ Index * Robbins, Arnold: Command Line Field Separator. (line 73) * Robbins, Bill: Getline/Pipe. (line 39) -* Robbins, Harry: Acknowledgments. (line 82) -* Robbins, Jean: Acknowledgments. (line 82) +* Robbins, Harry: Acknowledgments. (line 92) +* Robbins, Jean: Acknowledgments. (line 92) * Robbins, Miriam <1>: Passwd Functions. (line 90) * Robbins, Miriam <2>: Getline/Pipe. (line 39) -* Robbins, Miriam: Acknowledgments. (line 82) +* Robbins, Miriam: Acknowledgments. (line 92) * Rommel, Kai Uwe: Contributors. (line 42) * round to nearest integer: Numeric Functions. (line 23) * round() user-defined function: Round Function. (line 16) @@ -33462,7 +33457,7 @@ Index * sed utility <2>: Simple Sed. (line 6) * sed utility: Field Splitting Summary. (line 46) -* seeding random number generator: Numeric Functions. (line 64) +* seeding random number generator: Numeric Functions. (line 65) * semicolon (;), AWKPATH variable and: PC Using. (line 10) * semicolon (;), separating statements in actions <1>: Statements. (line 10) @@ -33564,8 +33559,8 @@ Index * SIGUSR1 signal, for dynamic profiling: Profiling. (line 188) * silent debugger command: Debugger Execution Control. (line 10) -* sin: Numeric Functions. (line 75) -* sine: Numeric Functions. (line 75) +* sin: Numeric Functions. (line 76) +* sine: Numeric Functions. (line 76) * single quote ('): One-shot. (line 15) * single quote (') in gawk command lines: Long. (line 33) * single quote ('), in shell commands: Quoting. (line 48) @@ -33615,10 +33610,10 @@ Index * sprintf() function, OFMT variable and: User-modified. (line 114) * sprintf() function, print/printf statements and: Round Function. (line 6) -* sqrt: Numeric Functions. (line 78) +* sqrt: Numeric Functions. (line 79) * square brackets ([]), regexp operator: Regexp Operators. (line 56) -* square root: Numeric Functions. (line 78) -* srand: Numeric Functions. (line 82) +* square root: Numeric Functions. (line 79) +* srand: Numeric Functions. (line 83) * stack frame: Debugging Terms. (line 10) * Stallman, Richard <1>: Glossary. (line 296) * Stallman, Richard <2>: Contributors. (line 23) @@ -33971,541 +33966,540 @@ Node: This Manual53600 Ref: This Manual-Footnote-159379 Node: Conventions59479 Node: Manual History61635 -Ref: Manual History-Footnote-165074 -Ref: Manual History-Footnote-265115 -Node: How To Contribute65189 -Node: Acknowledgments66428 -Node: Getting Started70724 -Node: Running gawk73158 -Node: One-shot74348 -Node: Read Terminal75573 -Ref: Read Terminal-Footnote-177223 -Ref: Read Terminal-Footnote-277499 -Node: Long77670 -Node: Executable Scripts79046 -Ref: Executable Scripts-Footnote-180879 -Ref: Executable Scripts-Footnote-280981 -Node: Comments81528 -Node: Quoting84001 -Node: DOS Quoting89317 -Node: Sample Data Files89992 -Node: Very Simple92507 -Node: Two Rules97145 -Node: More Complex99039 -Ref: More Complex-Footnote-1101971 -Node: Statements/Lines102056 -Ref: Statements/Lines-Footnote-1106512 -Node: Other Features106777 -Node: When107705 -Node: Intro Summary109875 -Node: Invoking Gawk110641 -Node: Command Line112156 -Node: Options112947 -Ref: Options-Footnote-1128776 -Node: Other Arguments128801 -Node: Naming Standard Input131463 -Node: Environment Variables132557 -Node: AWKPATH Variable133115 -Ref: AWKPATH Variable-Footnote-1135987 -Ref: AWKPATH Variable-Footnote-2136032 -Node: AWKLIBPATH Variable136292 -Node: Other Environment Variables137051 -Node: Exit Status140706 -Node: Include Files141381 -Node: Loading Shared Libraries144959 -Node: Obsolete146343 -Node: Undocumented147040 -Node: Invoking Summary147307 -Node: Regexp148887 -Node: Regexp Usage150337 -Node: Escape Sequences152370 -Node: Regexp Operators158037 -Ref: Regexp Operators-Footnote-1165517 -Ref: Regexp Operators-Footnote-2165664 -Node: Bracket Expressions165762 -Ref: table-char-classes167652 -Node: GNU Regexp Operators170592 -Node: Case-sensitivity174315 -Ref: Case-sensitivity-Footnote-1177207 -Ref: Case-sensitivity-Footnote-2177442 -Node: Leftmost Longest177550 -Node: Computed Regexps178751 -Node: Regexp Summary182123 -Node: Reading Files183594 -Node: Records185686 -Node: awk split records186429 -Node: gawk split records191287 -Ref: gawk split records-Footnote-1195808 -Node: Fields195845 -Ref: Fields-Footnote-1198809 -Node: Nonconstant Fields198895 -Ref: Nonconstant Fields-Footnote-1201125 -Node: Changing Fields201327 -Node: Field Separators207281 -Node: Default Field Splitting209983 -Node: Regexp Field Splitting211100 -Node: Single Character Fields214441 -Node: Command Line Field Separator215500 -Node: Full Line Fields218842 -Ref: Full Line Fields-Footnote-1219350 -Node: Field Splitting Summary219396 -Ref: Field Splitting Summary-Footnote-1222495 -Node: Constant Size222596 -Node: Splitting By Content227203 -Ref: Splitting By Content-Footnote-1230953 -Node: Multiple Line230993 -Ref: Multiple Line-Footnote-1236849 -Node: Getline237028 -Node: Plain Getline239244 -Node: Getline/Variable241339 -Node: Getline/File242486 -Node: Getline/Variable/File243870 -Ref: Getline/Variable/File-Footnote-1245469 -Node: Getline/Pipe245556 -Node: Getline/Variable/Pipe248255 -Node: Getline/Coprocess249362 -Node: Getline/Variable/Coprocess250614 -Node: Getline Notes251351 -Node: Getline Summary254155 -Ref: table-getline-variants254563 -Node: Read Timeout255475 -Ref: Read Timeout-Footnote-1259302 -Node: Command line directories259360 -Node: Input Summary260264 -Node: Input Exercises263401 -Node: Printing264134 -Node: Print265856 -Node: Print Examples267197 -Node: Output Separators269976 -Node: OFMT271992 -Node: Printf273350 -Node: Basic Printf274256 -Node: Control Letters275795 -Node: Format Modifiers279786 -Node: Printf Examples285813 -Node: Redirection288277 -Node: Special Files295249 -Node: Special FD295780 -Ref: Special FD-Footnote-1299404 -Node: Special Network299478 -Node: Special Caveats300328 -Node: Close Files And Pipes301124 -Ref: Close Files And Pipes-Footnote-1308285 -Ref: Close Files And Pipes-Footnote-2308433 -Node: Output Summary308583 -Node: Output exercises309580 -Node: Expressions310260 -Node: Values311445 -Node: Constants312121 -Node: Scalar Constants312801 -Ref: Scalar Constants-Footnote-1313660 -Node: Nondecimal-numbers313910 -Node: Regexp Constants316910 -Node: Using Constant Regexps317385 -Node: Variables320455 -Node: Using Variables321110 -Node: Assignment Options322834 -Node: Conversion324709 -Node: Strings And Numbers325233 -Ref: Strings And Numbers-Footnote-1328295 -Node: Locale influences conversions328404 -Ref: table-locale-affects331121 -Node: All Operators331709 -Node: Arithmetic Ops332339 -Node: Concatenation334844 -Ref: Concatenation-Footnote-1337640 -Node: Assignment Ops337760 -Ref: table-assign-ops342743 -Node: Increment Ops344060 -Node: Truth Values and Conditions347498 -Node: Truth Values348581 -Node: Typing and Comparison349630 -Node: Variable Typing350423 -Ref: Variable Typing-Footnote-1354323 -Node: Comparison Operators354445 -Ref: table-relational-ops354855 -Node: POSIX String Comparison358405 -Ref: POSIX String Comparison-Footnote-1359489 -Node: Boolean Ops359627 -Ref: Boolean Ops-Footnote-1363697 -Node: Conditional Exp363788 -Node: Function Calls365515 -Node: Precedence369395 -Node: Locales373064 -Node: Expressions Summary374695 -Node: Patterns and Actions377236 -Node: Pattern Overview378352 -Node: Regexp Patterns380029 -Node: Expression Patterns380572 -Node: Ranges384353 -Node: BEGIN/END387459 -Node: Using BEGIN/END388221 -Ref: Using BEGIN/END-Footnote-1390957 -Node: I/O And BEGIN/END391063 -Node: BEGINFILE/ENDFILE393348 -Node: Empty396279 -Node: Using Shell Variables396596 -Node: Action Overview398879 -Node: Statements401206 -Node: If Statement403054 -Node: While Statement404552 -Node: Do Statement406596 -Node: For Statement407752 -Node: Switch Statement410904 -Node: Break Statement413007 -Node: Continue Statement415062 -Node: Next Statement416855 -Node: Nextfile Statement419245 -Node: Exit Statement421900 -Node: Built-in Variables424304 -Node: User-modified425431 -Ref: User-modified-Footnote-1433120 -Node: Auto-set433182 -Ref: Auto-set-Footnote-1445764 -Ref: Auto-set-Footnote-2445969 -Node: ARGC and ARGV446025 -Node: Pattern Action Summary449879 -Node: Arrays452102 -Node: Array Basics453651 -Node: Array Intro454477 -Ref: figure-array-elements456450 -Node: Reference to Elements458857 -Node: Assigning Elements461130 -Node: Array Example461621 -Node: Scanning an Array463353 -Node: Controlling Scanning466368 -Ref: Controlling Scanning-Footnote-1471541 -Node: Delete471857 -Ref: Delete-Footnote-1474622 -Node: Numeric Array Subscripts474679 -Node: Uninitialized Subscripts476862 -Node: Multidimensional478487 -Node: Multiscanning481580 -Node: Arrays of Arrays483169 -Node: Arrays Summary487832 -Node: Functions489937 -Node: Built-in490810 -Node: Calling Built-in491888 -Node: Numeric Functions493876 -Ref: Numeric Functions-Footnote-1497710 -Ref: Numeric Functions-Footnote-2498067 -Ref: Numeric Functions-Footnote-3498115 -Node: String Functions498384 -Ref: String Functions-Footnote-1521395 -Ref: String Functions-Footnote-2521524 -Ref: String Functions-Footnote-3521772 -Node: Gory Details521859 -Ref: table-sub-escapes523528 -Ref: table-sub-posix-92524882 -Ref: table-sub-proposed526233 -Ref: table-posix-sub527587 -Ref: table-gensub-escapes529132 -Ref: Gory Details-Footnote-1530308 -Ref: Gory Details-Footnote-2530359 -Node: I/O Functions530510 -Ref: I/O Functions-Footnote-1537633 -Node: Time Functions537780 -Ref: Time Functions-Footnote-1548244 -Ref: Time Functions-Footnote-2548312 -Ref: Time Functions-Footnote-3548470 -Ref: Time Functions-Footnote-4548581 -Ref: Time Functions-Footnote-5548693 -Ref: Time Functions-Footnote-6548920 -Node: Bitwise Functions549186 -Ref: table-bitwise-ops549748 -Ref: Bitwise Functions-Footnote-1553993 -Node: Type Functions554177 -Node: I18N Functions555319 -Node: User-defined556964 -Node: Definition Syntax557768 -Ref: Definition Syntax-Footnote-1562947 -Node: Function Example563016 -Ref: Function Example-Footnote-1565660 -Node: Function Caveats565682 -Node: Calling A Function566200 -Node: Variable Scope567155 -Node: Pass By Value/Reference570143 -Node: Return Statement573651 -Node: Dynamic Typing576635 -Node: Indirect Calls577564 -Node: Functions Summary587277 -Node: Library Functions589816 -Ref: Library Functions-Footnote-1593434 -Ref: Library Functions-Footnote-2593577 -Node: Library Names593748 -Ref: Library Names-Footnote-1597221 -Ref: Library Names-Footnote-2597441 -Node: General Functions597527 -Node: Strtonum Function598555 -Node: Assert Function601335 -Node: Round Function604661 -Node: Cliff Random Function606202 -Node: Ordinal Functions607218 -Ref: Ordinal Functions-Footnote-1610295 -Ref: Ordinal Functions-Footnote-2610547 -Node: Join Function610758 -Ref: Join Function-Footnote-1612529 -Node: Getlocaltime Function612729 -Node: Readfile Function616465 -Node: Data File Management618304 -Node: Filetrans Function618936 -Node: Rewind Function623005 -Node: File Checking624563 -Ref: File Checking-Footnote-1625695 -Node: Empty Files625896 -Node: Ignoring Assigns627875 -Node: Getopt Function629429 -Ref: Getopt Function-Footnote-1640732 -Node: Passwd Functions640935 -Ref: Passwd Functions-Footnote-1649914 -Node: Group Functions650002 -Ref: Group Functions-Footnote-1657943 -Node: Walking Arrays658156 -Node: Library Functions Summary659759 -Node: Library exercises661147 -Node: Sample Programs662427 -Node: Running Examples663197 -Node: Clones663925 -Node: Cut Program665149 -Node: Egrep Program675017 -Ref: Egrep Program-Footnote-1682988 -Node: Id Program683098 -Node: Split Program686762 -Ref: Split Program-Footnote-1690300 -Node: Tee Program690428 -Node: Uniq Program693235 -Node: Wc Program700665 -Ref: Wc Program-Footnote-1704930 -Node: Miscellaneous Programs705022 -Node: Dupword Program706235 -Node: Alarm Program708266 -Node: Translate Program713080 -Ref: Translate Program-Footnote-1717471 -Ref: Translate Program-Footnote-2717741 -Node: Labels Program717875 -Ref: Labels Program-Footnote-1721246 -Node: Word Sorting721330 -Node: History Sorting725373 -Node: Extract Program727209 -Node: Simple Sed734745 -Node: Igawk Program737807 -Ref: Igawk Program-Footnote-1752118 -Ref: Igawk Program-Footnote-2752319 -Node: Anagram Program752457 -Node: Signature Program755525 -Node: Programs Summary756772 -Node: Programs Exercises757987 -Node: Advanced Features761638 -Node: Nondecimal Data763586 -Node: Array Sorting765163 -Node: Controlling Array Traversal765860 -Node: Array Sorting Functions774140 -Ref: Array Sorting Functions-Footnote-1778047 -Node: Two-way I/O778241 -Ref: Two-way I/O-Footnote-1783757 -Node: TCP/IP Networking783839 -Node: Profiling786683 -Node: Advanced Features Summary794225 -Node: Internationalization796089 -Node: I18N and L10N797569 -Node: Explaining gettext798255 -Ref: Explaining gettext-Footnote-1803395 -Ref: Explaining gettext-Footnote-2803579 -Node: Programmer i18n803744 -Node: Translator i18n807969 -Node: String Extraction808763 -Ref: String Extraction-Footnote-1809724 -Node: Printf Ordering809810 -Ref: Printf Ordering-Footnote-1812592 -Node: I18N Portability812656 -Ref: I18N Portability-Footnote-1815105 -Node: I18N Example815168 -Ref: I18N Example-Footnote-1817890 -Node: Gawk I18N817962 -Node: I18N Summary818600 -Node: Debugger819939 -Node: Debugging820961 -Node: Debugging Concepts821402 -Node: Debugging Terms823258 -Node: Awk Debugging825855 -Node: Sample Debugging Session826747 -Node: Debugger Invocation827267 -Node: Finding The Bug828600 -Node: List of Debugger Commands835082 -Node: Breakpoint Control836414 -Node: Debugger Execution Control840078 -Node: Viewing And Changing Data843438 -Node: Execution Stack846796 -Node: Debugger Info848309 -Node: Miscellaneous Debugger Commands852303 -Node: Readline Support857487 -Node: Limitations858379 -Node: Debugging Summary860653 -Node: Arbitrary Precision Arithmetic861817 -Node: Computer Arithmetic863146 -Ref: Computer Arithmetic-Footnote-1867533 -Node: Math Definitions867590 -Ref: table-ieee-formats870474 -Node: MPFR features870978 -Node: FP Math Caution872620 -Ref: FP Math Caution-Footnote-1873661 -Node: Inexactness of computations874030 -Node: Inexact representation874978 -Node: Comparing FP Values876333 -Node: Errors accumulate877297 -Node: Getting Accuracy878730 -Node: Try To Round881389 -Node: Setting precision882288 -Ref: table-predefined-precision-strings882970 -Node: Setting the rounding mode884763 -Ref: table-gawk-rounding-modes885127 -Ref: Setting the rounding mode-Footnote-1888581 -Node: Arbitrary Precision Integers888760 -Ref: Arbitrary Precision Integers-Footnote-1891763 -Node: POSIX Floating Point Problems891912 -Ref: POSIX Floating Point Problems-Footnote-1895788 -Node: Floating point summary895826 -Node: Dynamic Extensions898043 -Node: Extension Intro899595 -Node: Plugin License900860 -Node: Extension Mechanism Outline901545 -Ref: figure-load-extension901969 -Ref: figure-load-new-function903454 -Ref: figure-call-new-function904456 -Node: Extension API Description906440 -Node: Extension API Functions Introduction907890 -Node: General Data Types912755 -Ref: General Data Types-Footnote-1918448 -Node: Requesting Values918747 -Ref: table-value-types-returned919484 -Node: Memory Allocation Functions920442 -Ref: Memory Allocation Functions-Footnote-1923189 -Node: Constructor Functions923285 -Node: Registration Functions925043 -Node: Extension Functions925728 -Node: Exit Callback Functions928030 -Node: Extension Version String929279 -Node: Input Parsers929929 -Node: Output Wrappers939743 -Node: Two-way processors944259 -Node: Printing Messages946463 -Ref: Printing Messages-Footnote-1947540 -Node: Updating `ERRNO'947692 -Node: Accessing Parameters948431 -Node: Symbol Table Access949661 -Node: Symbol table by name950175 -Node: Symbol table by cookie952151 -Ref: Symbol table by cookie-Footnote-1956284 -Node: Cached values956347 -Ref: Cached values-Footnote-1959851 -Node: Array Manipulation959942 -Ref: Array Manipulation-Footnote-1961040 -Node: Array Data Types961079 -Ref: Array Data Types-Footnote-1963782 -Node: Array Functions963874 -Node: Flattening Arrays967748 -Node: Creating Arrays974600 -Node: Extension API Variables979331 -Node: Extension Versioning979967 -Node: Extension API Informational Variables981868 -Node: Extension API Boilerplate982954 -Node: Finding Extensions986758 -Node: Extension Example987318 -Node: Internal File Description988048 -Node: Internal File Ops992139 -Ref: Internal File Ops-Footnote-11003571 -Node: Using Internal File Ops1003711 -Ref: Using Internal File Ops-Footnote-11006058 -Node: Extension Samples1006326 -Node: Extension Sample File Functions1007850 -Node: Extension Sample Fnmatch1015418 -Node: Extension Sample Fork1016900 -Node: Extension Sample Inplace1018113 -Node: Extension Sample Ord1019788 -Node: Extension Sample Readdir1020624 -Ref: table-readdir-file-types1021480 -Node: Extension Sample Revout1022279 -Node: Extension Sample Rev2way1022870 -Node: Extension Sample Read write array1023611 -Node: Extension Sample Readfile1025490 -Node: Extension Sample API Tests1026590 -Node: Extension Sample Time1027115 -Node: gawkextlib1028430 -Node: Extension summary1031243 -Node: Extension Exercises1034936 -Node: Language History1035658 -Node: V7/SVR3.11037301 -Node: SVR41039621 -Node: POSIX1041063 -Node: BTL1042449 -Node: POSIX/GNU1043183 -Node: Feature History1048926 -Node: Common Extensions1062056 -Node: Ranges and Locales1063368 -Ref: Ranges and Locales-Footnote-11067985 -Ref: Ranges and Locales-Footnote-21068012 -Ref: Ranges and Locales-Footnote-31068246 -Node: Contributors1068467 -Node: History summary1073892 -Node: Installation1075261 -Node: Gawk Distribution1076212 -Node: Getting1076696 -Node: Extracting1077520 -Node: Distribution contents1079162 -Node: Unix Installation1084879 -Node: Quick Installation1085496 -Node: Additional Configuration Options1087938 -Node: Configuration Philosophy1089676 -Node: Non-Unix Installation1092027 -Node: PC Installation1092485 -Node: PC Binary Installation1093796 -Node: PC Compiling1095644 -Ref: PC Compiling-Footnote-11098643 -Node: PC Testing1098748 -Node: PC Using1099924 -Node: Cygwin1104082 -Node: MSYS1104891 -Node: VMS Installation1105405 -Node: VMS Compilation1106201 -Ref: VMS Compilation-Footnote-11107423 -Node: VMS Dynamic Extensions1107481 -Node: VMS Installation Details1108854 -Node: VMS Running1111106 -Node: VMS GNV1113940 -Node: VMS Old Gawk1114663 -Node: Bugs1115133 -Node: Other Versions1119137 -Node: Installation summary1125392 -Node: Notes1126448 -Node: Compatibility Mode1127313 -Node: Additions1128095 -Node: Accessing The Source1129020 -Node: Adding Code1130456 -Node: New Ports1136634 -Node: Derived Files1141115 -Ref: Derived Files-Footnote-11146196 -Ref: Derived Files-Footnote-21146230 -Ref: Derived Files-Footnote-31146826 -Node: Future Extensions1146940 -Node: Implementation Limitations1147546 -Node: Extension Design1148794 -Node: Old Extension Problems1149948 -Ref: Old Extension Problems-Footnote-11151465 -Node: Extension New Mechanism Goals1151522 -Ref: Extension New Mechanism Goals-Footnote-11154882 -Node: Extension Other Design Decisions1155071 -Node: Extension Future Growth1157177 -Node: Old Extension Mechanism1158013 -Node: Notes summary1159775 -Node: Basic Concepts1160961 -Node: Basic High Level1161642 -Ref: figure-general-flow1161914 -Ref: figure-process-flow1162513 -Ref: Basic High Level-Footnote-11165742 -Node: Basic Data Typing1165927 -Node: Glossary1169255 -Node: Copying1194407 -Node: GNU Free Documentation License1231963 -Node: Index1257099 +Ref: Manual History-Footnote-164714 +Ref: Manual History-Footnote-264755 +Node: How To Contribute64829 +Node: Acknowledgments66068 +Node: Getting Started70816 +Node: Running gawk73250 +Node: One-shot74440 +Node: Read Terminal75665 +Ref: Read Terminal-Footnote-177315 +Ref: Read Terminal-Footnote-277591 +Node: Long77762 +Node: Executable Scripts79138 +Ref: Executable Scripts-Footnote-180971 +Ref: Executable Scripts-Footnote-281073 +Node: Comments81620 +Node: Quoting84093 +Node: DOS Quoting89409 +Node: Sample Data Files90084 +Node: Very Simple92599 +Node: Two Rules97372 +Node: More Complex99266 +Ref: More Complex-Footnote-1102198 +Node: Statements/Lines102283 +Ref: Statements/Lines-Footnote-1106739 +Node: Other Features107004 +Node: When107932 +Node: Intro Summary110102 +Node: Invoking Gawk110868 +Node: Command Line112383 +Node: Options113174 +Ref: Options-Footnote-1129003 +Node: Other Arguments129028 +Node: Naming Standard Input131690 +Node: Environment Variables132784 +Node: AWKPATH Variable133342 +Ref: AWKPATH Variable-Footnote-1136214 +Ref: AWKPATH Variable-Footnote-2136259 +Node: AWKLIBPATH Variable136519 +Node: Other Environment Variables137278 +Node: Exit Status140933 +Node: Include Files141608 +Node: Loading Shared Libraries145186 +Node: Obsolete146570 +Node: Undocumented147267 +Node: Invoking Summary147534 +Node: Regexp149114 +Node: Regexp Usage150564 +Node: Escape Sequences152597 +Node: Regexp Operators158264 +Ref: Regexp Operators-Footnote-1165744 +Ref: Regexp Operators-Footnote-2165891 +Node: Bracket Expressions165989 +Ref: table-char-classes167879 +Node: GNU Regexp Operators170819 +Node: Case-sensitivity174542 +Ref: Case-sensitivity-Footnote-1177434 +Ref: Case-sensitivity-Footnote-2177669 +Node: Leftmost Longest177777 +Node: Computed Regexps178978 +Node: Regexp Summary182350 +Node: Reading Files183821 +Node: Records185913 +Node: awk split records186656 +Node: gawk split records191514 +Ref: gawk split records-Footnote-1196035 +Node: Fields196072 +Ref: Fields-Footnote-1199036 +Node: Nonconstant Fields199122 +Ref: Nonconstant Fields-Footnote-1201352 +Node: Changing Fields201554 +Node: Field Separators207508 +Node: Default Field Splitting210210 +Node: Regexp Field Splitting211327 +Node: Single Character Fields214668 +Node: Command Line Field Separator215727 +Node: Full Line Fields219069 +Ref: Full Line Fields-Footnote-1219577 +Node: Field Splitting Summary219623 +Ref: Field Splitting Summary-Footnote-1222722 +Node: Constant Size222823 +Node: Splitting By Content227430 +Ref: Splitting By Content-Footnote-1231180 +Node: Multiple Line231220 +Ref: Multiple Line-Footnote-1237076 +Node: Getline237255 +Node: Plain Getline239471 +Node: Getline/Variable241566 +Node: Getline/File242713 +Node: Getline/Variable/File244097 +Ref: Getline/Variable/File-Footnote-1245696 +Node: Getline/Pipe245783 +Node: Getline/Variable/Pipe248482 +Node: Getline/Coprocess249589 +Node: Getline/Variable/Coprocess250841 +Node: Getline Notes251578 +Node: Getline Summary254382 +Ref: table-getline-variants254790 +Node: Read Timeout255702 +Ref: Read Timeout-Footnote-1259529 +Node: Command line directories259587 +Node: Input Summary260491 +Node: Input Exercises263628 +Node: Printing264361 +Node: Print266083 +Node: Print Examples267424 +Node: Output Separators270203 +Node: OFMT272219 +Node: Printf273577 +Node: Basic Printf274483 +Node: Control Letters276022 +Node: Format Modifiers280013 +Node: Printf Examples286040 +Node: Redirection288504 +Node: Special Files295476 +Node: Special FD296007 +Ref: Special FD-Footnote-1299604 +Node: Special Network299678 +Node: Special Caveats300528 +Node: Close Files And Pipes301324 +Ref: Close Files And Pipes-Footnote-1308485 +Ref: Close Files And Pipes-Footnote-2308633 +Node: Output Summary308783 +Node: Output exercises309780 +Node: Expressions310460 +Node: Values311645 +Node: Constants312321 +Node: Scalar Constants313001 +Ref: Scalar Constants-Footnote-1313860 +Node: Nondecimal-numbers314110 +Node: Regexp Constants317110 +Node: Using Constant Regexps317585 +Node: Variables320655 +Node: Using Variables321310 +Node: Assignment Options323034 +Node: Conversion324909 +Node: Strings And Numbers325433 +Ref: Strings And Numbers-Footnote-1328495 +Node: Locale influences conversions328604 +Ref: table-locale-affects331321 +Node: All Operators331909 +Node: Arithmetic Ops332539 +Node: Concatenation335044 +Ref: Concatenation-Footnote-1337863 +Node: Assignment Ops337983 +Ref: table-assign-ops342966 +Node: Increment Ops344283 +Node: Truth Values and Conditions347721 +Node: Truth Values348804 +Node: Typing and Comparison349853 +Node: Variable Typing350646 +Node: Comparison Operators354296 +Ref: table-relational-ops354706 +Node: POSIX String Comparison358256 +Ref: POSIX String Comparison-Footnote-1359340 +Node: Boolean Ops359478 +Ref: Boolean Ops-Footnote-1363548 +Node: Conditional Exp363639 +Node: Function Calls365366 +Node: Precedence369246 +Node: Locales372915 +Node: Expressions Summary374546 +Node: Patterns and Actions377087 +Node: Pattern Overview378203 +Node: Regexp Patterns379880 +Node: Expression Patterns380423 +Node: Ranges384204 +Node: BEGIN/END387310 +Node: Using BEGIN/END388072 +Ref: Using BEGIN/END-Footnote-1390808 +Node: I/O And BEGIN/END390914 +Node: BEGINFILE/ENDFILE393199 +Node: Empty396130 +Node: Using Shell Variables396447 +Node: Action Overview398730 +Node: Statements401057 +Node: If Statement402905 +Node: While Statement404403 +Node: Do Statement406447 +Node: For Statement407603 +Node: Switch Statement410755 +Node: Break Statement412858 +Node: Continue Statement414913 +Node: Next Statement416706 +Node: Nextfile Statement419096 +Node: Exit Statement421751 +Node: Built-in Variables424155 +Node: User-modified425282 +Ref: User-modified-Footnote-1432971 +Node: Auto-set433033 +Ref: Auto-set-Footnote-1445615 +Ref: Auto-set-Footnote-2445820 +Node: ARGC and ARGV445876 +Node: Pattern Action Summary449730 +Node: Arrays451953 +Node: Array Basics453502 +Node: Array Intro454328 +Ref: figure-array-elements456301 +Node: Reference to Elements458708 +Node: Assigning Elements460981 +Node: Array Example461472 +Node: Scanning an Array463204 +Node: Controlling Scanning466219 +Ref: Controlling Scanning-Footnote-1471392 +Node: Delete471708 +Ref: Delete-Footnote-1474473 +Node: Numeric Array Subscripts474530 +Node: Uninitialized Subscripts476713 +Node: Multidimensional478338 +Node: Multiscanning481431 +Node: Arrays of Arrays483020 +Node: Arrays Summary487683 +Node: Functions489788 +Node: Built-in490661 +Node: Calling Built-in491739 +Node: Numeric Functions493727 +Ref: Numeric Functions-Footnote-1497669 +Ref: Numeric Functions-Footnote-2498026 +Ref: Numeric Functions-Footnote-3498074 +Node: String Functions498343 +Ref: String Functions-Footnote-1521354 +Ref: String Functions-Footnote-2521483 +Ref: String Functions-Footnote-3521731 +Node: Gory Details521818 +Ref: table-sub-escapes523487 +Ref: table-sub-posix-92524841 +Ref: table-sub-proposed526192 +Ref: table-posix-sub527546 +Ref: table-gensub-escapes529091 +Ref: Gory Details-Footnote-1530267 +Ref: Gory Details-Footnote-2530318 +Node: I/O Functions530469 +Ref: I/O Functions-Footnote-1537592 +Node: Time Functions537739 +Ref: Time Functions-Footnote-1548203 +Ref: Time Functions-Footnote-2548271 +Ref: Time Functions-Footnote-3548429 +Ref: Time Functions-Footnote-4548540 +Ref: Time Functions-Footnote-5548652 +Ref: Time Functions-Footnote-6548879 +Node: Bitwise Functions549145 +Ref: table-bitwise-ops549707 +Ref: Bitwise Functions-Footnote-1553952 +Node: Type Functions554136 +Node: I18N Functions555278 +Node: User-defined556923 +Node: Definition Syntax557727 +Ref: Definition Syntax-Footnote-1562906 +Node: Function Example562975 +Ref: Function Example-Footnote-1565619 +Node: Function Caveats565641 +Node: Calling A Function566159 +Node: Variable Scope567114 +Node: Pass By Value/Reference570102 +Node: Return Statement573610 +Node: Dynamic Typing576594 +Node: Indirect Calls577523 +Node: Functions Summary587236 +Node: Library Functions589775 +Ref: Library Functions-Footnote-1593393 +Ref: Library Functions-Footnote-2593536 +Node: Library Names593707 +Ref: Library Names-Footnote-1597180 +Ref: Library Names-Footnote-2597400 +Node: General Functions597486 +Node: Strtonum Function598514 +Node: Assert Function601294 +Node: Round Function604620 +Node: Cliff Random Function606161 +Node: Ordinal Functions607177 +Ref: Ordinal Functions-Footnote-1610254 +Ref: Ordinal Functions-Footnote-2610506 +Node: Join Function610717 +Ref: Join Function-Footnote-1612488 +Node: Getlocaltime Function612688 +Node: Readfile Function616424 +Node: Data File Management618263 +Node: Filetrans Function618895 +Node: Rewind Function622964 +Node: File Checking624522 +Ref: File Checking-Footnote-1625654 +Node: Empty Files625855 +Node: Ignoring Assigns627834 +Node: Getopt Function629388 +Ref: Getopt Function-Footnote-1640691 +Node: Passwd Functions640894 +Ref: Passwd Functions-Footnote-1649873 +Node: Group Functions649961 +Ref: Group Functions-Footnote-1657902 +Node: Walking Arrays658115 +Node: Library Functions Summary659718 +Node: Library exercises661106 +Node: Sample Programs662386 +Node: Running Examples663156 +Node: Clones663884 +Node: Cut Program665108 +Node: Egrep Program674976 +Ref: Egrep Program-Footnote-1682947 +Node: Id Program683057 +Node: Split Program686721 +Ref: Split Program-Footnote-1690259 +Node: Tee Program690387 +Node: Uniq Program693194 +Node: Wc Program700624 +Ref: Wc Program-Footnote-1704889 +Node: Miscellaneous Programs704981 +Node: Dupword Program706194 +Node: Alarm Program708225 +Node: Translate Program713039 +Ref: Translate Program-Footnote-1717430 +Ref: Translate Program-Footnote-2717700 +Node: Labels Program717834 +Ref: Labels Program-Footnote-1721205 +Node: Word Sorting721289 +Node: History Sorting725332 +Node: Extract Program727168 +Node: Simple Sed734704 +Node: Igawk Program737766 +Ref: Igawk Program-Footnote-1752077 +Ref: Igawk Program-Footnote-2752278 +Node: Anagram Program752416 +Node: Signature Program755484 +Node: Programs Summary756731 +Node: Programs Exercises757946 +Node: Advanced Features761597 +Node: Nondecimal Data763545 +Node: Array Sorting765122 +Node: Controlling Array Traversal765819 +Node: Array Sorting Functions774099 +Ref: Array Sorting Functions-Footnote-1778006 +Node: Two-way I/O778200 +Ref: Two-way I/O-Footnote-1783716 +Node: TCP/IP Networking783798 +Node: Profiling786642 +Node: Advanced Features Summary794184 +Node: Internationalization796048 +Node: I18N and L10N797528 +Node: Explaining gettext798214 +Ref: Explaining gettext-Footnote-1803354 +Ref: Explaining gettext-Footnote-2803538 +Node: Programmer i18n803703 +Node: Translator i18n807928 +Node: String Extraction808722 +Ref: String Extraction-Footnote-1809683 +Node: Printf Ordering809769 +Ref: Printf Ordering-Footnote-1812551 +Node: I18N Portability812615 +Ref: I18N Portability-Footnote-1815064 +Node: I18N Example815127 +Ref: I18N Example-Footnote-1817849 +Node: Gawk I18N817921 +Node: I18N Summary818559 +Node: Debugger819898 +Node: Debugging820920 +Node: Debugging Concepts821361 +Node: Debugging Terms823217 +Node: Awk Debugging825814 +Node: Sample Debugging Session826706 +Node: Debugger Invocation827226 +Node: Finding The Bug828559 +Node: List of Debugger Commands835041 +Node: Breakpoint Control836373 +Node: Debugger Execution Control840037 +Node: Viewing And Changing Data843397 +Node: Execution Stack846755 +Node: Debugger Info848268 +Node: Miscellaneous Debugger Commands852262 +Node: Readline Support857446 +Node: Limitations858338 +Node: Debugging Summary860612 +Node: Arbitrary Precision Arithmetic861776 +Node: Computer Arithmetic863105 +Ref: Computer Arithmetic-Footnote-1867492 +Node: Math Definitions867549 +Ref: table-ieee-formats870433 +Node: MPFR features870937 +Node: FP Math Caution872579 +Ref: FP Math Caution-Footnote-1873620 +Node: Inexactness of computations873989 +Node: Inexact representation874937 +Node: Comparing FP Values876292 +Node: Errors accumulate877256 +Node: Getting Accuracy878689 +Node: Try To Round881348 +Node: Setting precision882247 +Ref: table-predefined-precision-strings882929 +Node: Setting the rounding mode884722 +Ref: table-gawk-rounding-modes885086 +Ref: Setting the rounding mode-Footnote-1888540 +Node: Arbitrary Precision Integers888719 +Ref: Arbitrary Precision Integers-Footnote-1891722 +Node: POSIX Floating Point Problems891871 +Ref: POSIX Floating Point Problems-Footnote-1895747 +Node: Floating point summary895785 +Node: Dynamic Extensions898002 +Node: Extension Intro899554 +Node: Plugin License900819 +Node: Extension Mechanism Outline901504 +Ref: figure-load-extension901928 +Ref: figure-load-new-function903413 +Ref: figure-call-new-function904415 +Node: Extension API Description906399 +Node: Extension API Functions Introduction907849 +Node: General Data Types912714 +Ref: General Data Types-Footnote-1918407 +Node: Requesting Values918706 +Ref: table-value-types-returned919443 +Node: Memory Allocation Functions920401 +Ref: Memory Allocation Functions-Footnote-1923148 +Node: Constructor Functions923244 +Node: Registration Functions925002 +Node: Extension Functions925687 +Node: Exit Callback Functions927989 +Node: Extension Version String929238 +Node: Input Parsers929888 +Node: Output Wrappers939702 +Node: Two-way processors944218 +Node: Printing Messages946422 +Ref: Printing Messages-Footnote-1947499 +Node: Updating `ERRNO'947651 +Node: Accessing Parameters948390 +Node: Symbol Table Access949620 +Node: Symbol table by name950134 +Node: Symbol table by cookie952110 +Ref: Symbol table by cookie-Footnote-1956243 +Node: Cached values956306 +Ref: Cached values-Footnote-1959810 +Node: Array Manipulation959901 +Ref: Array Manipulation-Footnote-1960999 +Node: Array Data Types961038 +Ref: Array Data Types-Footnote-1963741 +Node: Array Functions963833 +Node: Flattening Arrays967707 +Node: Creating Arrays974559 +Node: Extension API Variables979290 +Node: Extension Versioning979926 +Node: Extension API Informational Variables981827 +Node: Extension API Boilerplate982913 +Node: Finding Extensions986717 +Node: Extension Example987277 +Node: Internal File Description988007 +Node: Internal File Ops992098 +Ref: Internal File Ops-Footnote-11003530 +Node: Using Internal File Ops1003670 +Ref: Using Internal File Ops-Footnote-11006017 +Node: Extension Samples1006285 +Node: Extension Sample File Functions1007809 +Node: Extension Sample Fnmatch1015377 +Node: Extension Sample Fork1016859 +Node: Extension Sample Inplace1018072 +Node: Extension Sample Ord1019747 +Node: Extension Sample Readdir1020583 +Ref: table-readdir-file-types1021439 +Node: Extension Sample Revout1022238 +Node: Extension Sample Rev2way1022829 +Node: Extension Sample Read write array1023570 +Node: Extension Sample Readfile1025449 +Node: Extension Sample API Tests1026549 +Node: Extension Sample Time1027074 +Node: gawkextlib1028389 +Node: Extension summary1031202 +Node: Extension Exercises1034895 +Node: Language History1035617 +Node: V7/SVR3.11037260 +Node: SVR41039580 +Node: POSIX1041022 +Node: BTL1042408 +Node: POSIX/GNU1043142 +Node: Feature History1048885 +Node: Common Extensions1062015 +Node: Ranges and Locales1063327 +Ref: Ranges and Locales-Footnote-11067944 +Ref: Ranges and Locales-Footnote-21067971 +Ref: Ranges and Locales-Footnote-31068205 +Node: Contributors1068426 +Node: History summary1073851 +Node: Installation1075220 +Node: Gawk Distribution1076171 +Node: Getting1076655 +Node: Extracting1077479 +Node: Distribution contents1079121 +Node: Unix Installation1084838 +Node: Quick Installation1085455 +Node: Additional Configuration Options1087897 +Node: Configuration Philosophy1089635 +Node: Non-Unix Installation1091986 +Node: PC Installation1092444 +Node: PC Binary Installation1093755 +Node: PC Compiling1095603 +Ref: PC Compiling-Footnote-11098602 +Node: PC Testing1098707 +Node: PC Using1099883 +Node: Cygwin1104041 +Node: MSYS1104850 +Node: VMS Installation1105364 +Node: VMS Compilation1106160 +Ref: VMS Compilation-Footnote-11107382 +Node: VMS Dynamic Extensions1107440 +Node: VMS Installation Details1108813 +Node: VMS Running1111065 +Node: VMS GNV1113899 +Node: VMS Old Gawk1114622 +Node: Bugs1115092 +Node: Other Versions1119096 +Node: Installation summary1125351 +Node: Notes1126407 +Node: Compatibility Mode1127272 +Node: Additions1128054 +Node: Accessing The Source1128979 +Node: Adding Code1130415 +Node: New Ports1136593 +Node: Derived Files1141074 +Ref: Derived Files-Footnote-11146155 +Ref: Derived Files-Footnote-21146189 +Ref: Derived Files-Footnote-31146785 +Node: Future Extensions1146899 +Node: Implementation Limitations1147505 +Node: Extension Design1148753 +Node: Old Extension Problems1149907 +Ref: Old Extension Problems-Footnote-11151424 +Node: Extension New Mechanism Goals1151481 +Ref: Extension New Mechanism Goals-Footnote-11154841 +Node: Extension Other Design Decisions1155030 +Node: Extension Future Growth1157136 +Node: Old Extension Mechanism1157972 +Node: Notes summary1159734 +Node: Basic Concepts1160920 +Node: Basic High Level1161601 +Ref: figure-general-flow1161873 +Ref: figure-process-flow1162472 +Ref: Basic High Level-Footnote-11165701 +Node: Basic Data Typing1165886 +Node: Glossary1169214 +Node: Copying1194366 +Node: GNU Free Documentation License1231922 +Node: Index1257058  End Tag Table -- cgit v1.2.3 From c9b1f9189625a8dab6092cbd46f8496537af227c Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 15 Aug 2014 14:01:11 +0300 Subject: Continue on reviewer comments. --- doc/gawk.info | 1437 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 708 insertions(+), 729 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 8035803b..8f91f3c0 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -190,7 +190,7 @@ entitled "GNU Free Documentation License". * Single Character Fields:: Making each character a separate field. * Command Line Field Separator:: Setting `FS' from the - command-line. + command line. * Full Line Fields:: Making the full line be a single field. * Field Splitting Summary:: Some final points and a summary table. @@ -216,7 +216,7 @@ entitled "GNU Free Documentation License". `getline'. * Getline Summary:: Summary of `getline' Variants. * Read Timeout:: Reading input with a timeout. -* Command line directories:: What happens if you put a directory on +* Command-line directories:: What happens if you put a directory on the command line. * Input Summary:: Input summary. * Input Exercises:: Exercises. @@ -255,7 +255,7 @@ entitled "GNU Free Documentation License". * Variables:: Variables give names to values for later use. * Using Variables:: Using variables in your programs. -* Assignment Options:: Setting variables on the command-line +* Assignment Options:: Setting variables on the command line and a summary of command-line syntax. This is an advanced method of input. * Conversion:: The conversion of strings to numbers @@ -884,7 +884,7 @@ contributed parts of the code as well. In 1988 and 1989, David Trueman, with help from me, thoroughly reworked `gawk' for compatibility with the newer `awk'. Circa 1994, I became the primary maintainer. Current development focuses on bug fixes, performance improvements, -standards compliance, and occasionally, new features. +standards compliance and, occasionally, new features. In May of 1997, Ju"rgen Kahrs felt the need for network access from `awk', and with a little help from me, set about adding features to do @@ -1086,7 +1086,7 @@ formatting language. A single Texinfo source file is used to produce both the printed and online versions of the documentation. This minor node briefly documents the typographical conventions used in Texinfo. - Examples you would type at the command-line are preceded by the + Examples you would type at the command line are preceded by the common shell primary and secondary prompts, `$' and `>'. Input that you type is shown `like this'. Output from the command is preceded by the glyph "-|". This typically represents the command's standard @@ -1456,7 +1456,7 @@ end-of-file character may be different. For example, on OS/2, it is As an example, the following program prints a friendly piece of advice (from Douglas Adams's `The Hitchhiker's Guide to the Galaxy'), to keep you from worrying about the complexities of computer -programming(1) (`BEGIN' is a feature we haven't discussed yet): +programming (`BEGIN' is a feature we haven't discussed yet): $ awk "BEGIN { print \"Don't Panic!\" }" -| Don't Panic! @@ -1464,7 +1464,13 @@ programming(1) (`BEGIN' is a feature we haven't discussed yet): This program does not read any input. The `\' before each of the inner double quotes is necessary because of the shell's quoting rules--in particular because it mixes both single quotes and double -quotes.(2) +quotes.(1) + + NOTE: As a side note, if you use Bash as your shell, you should + execute the command `set +H' before running this program + interactively, to disable the C shell-style command history, which + treats `!' as a special character. We recommend putting this + command into your personal startup file. This next simple `awk' program emulates the `cat' utility; it copies whatever you type on the keyboard to its standard output (why this @@ -1483,12 +1489,7 @@ works is explained shortly). ---------- Footnotes ---------- - (1) If you use Bash as your shell, you should execute the command -`set +H' before running this program interactively, to disable the C -shell-style command history, which treats `!' as a special character. -We recommend putting this command into your personal startup file. - - (2) Although we generally recommend the use of single quotes around + (1) Although we generally recommend the use of single quotes around the program text, double quotes are needed here in order to put the single quote into the message. @@ -1719,9 +1720,9 @@ the quoting rules. Note that the single quote is not special within double quotes. * Null strings are removed when they occur as part of a non-null - command-line argument, while explicit non-null objects are kept. - For example, to specify that the field separator `FS' should be - set to the null string, use: + command-line argument, while explicit null objects are kept. For + example, to specify that the field separator `FS' should be set to + the null string, use: awk -F "" 'PROGRAM' FILES # correct @@ -1814,10 +1815,10 @@ one "record". In the data file `mail-list', each record contains the name of a person, his/her phone number, his/her email-address, and a code for -their relationship with the author of the list. An `A' in the last -column means that the person is an acquaintance. An `F' in the last -column means that the person is a friend. An `R' means that the person -is a relative: +their relationship with the author of the list. The columns are +aligned using spaces. An `A' in the last column means that the person +is an acquaintance. An `F' in the last column means that the person is +a friend. An `R' means that the person is a relative: Amelia 555-5553 amelia.zodiacusque@gmail.com F Anthony 555-3412 anthony.asserturo@hotmail.com A @@ -2505,8 +2506,8 @@ The following list describes options mandated by the POSIX standard: this option is intended to be used with code libraries, `gawk' does not recognize such files as constituting main program input. Thus, after processing an `-i' argument, `gawk' still expects to - find the main source code via the `-f' option or on the - command-line. + find the main source code via the `-f' option or on the command + line. `-l' EXT `--load' EXT @@ -2523,7 +2524,7 @@ The following list describes options mandated by the POSIX standard: `-L'[VALUE] `--lint'[`='VALUE] Warn about constructs that are dubious or nonportable to other - `awk' implementations. No space is allowed between the `-D' and + `awk' implementations. No space is allowed between the `-L' and VALUE, if VALUE is supplied. Some warnings are issued when `gawk' first reads your program. Others are issued at runtime, as your program executes. With an optional argument of `fatal', lint @@ -2603,7 +2604,7 @@ The following list describes options mandated by the POSIX standard: * Newlines are not allowed after `?' or `:' (*note Conditional Exp::). - * Specifying `-Ft' on the command-line does not set the value + * Specifying `-Ft' on the command line does not set the value of `FS' to be a single TAB character (*note Field Separators::). @@ -2785,7 +2786,7 @@ with `getline' (*note Getline/File::). In addition, `gawk' allows you to specify the special file name `/dev/stdin', both on the command line and with `getline'. Some other versions of `awk' also support this, but it is not standard. (Some -operating systems provide a `/dev/stdin' file in the file system; +operating systems provide a `/dev/stdin' file in the filesystem; however, `gawk' always processes this file name itself.)  @@ -2811,7 +2812,7 @@ File: gawk.info, Node: AWKPATH Variable, Next: AWKLIBPATH Variable, Up: Envir ---------------------------------------- The previous minor node described how `awk' program files can be named -on the command-line with the `-f' option. In most `awk' +on the command line with the `-f' option. In most `awk' implementations, you must supply a precise path name for each program file, unless the file is in the current directory. But in `gawk', if the file name supplied to the `-f' or `-i' options does not contain a @@ -2898,7 +2899,7 @@ they are more specialized. Those in the following list are meant to be used by regular users. `POSIXLY_CORRECT' - Causes `gawk' to switch POSIX compatibility mode, disabling all + Causes `gawk' to switch to POSIX compatibility mode, disabling all traditional and GNU extensions. *Note Options::. `GAWK_SOCK_RETRIES' @@ -2926,7 +2927,7 @@ change. The variables are: the value should be a number, and `gawk' uses that number as the size of the buffer to allocate. (When this variable is not set, `gawk' uses the smaller of the file's size and the "default" - blocksize, which is usually the file systems I/O blocksize.) + blocksize, which is usually the filesystems I/O blocksize.) `AWK_HASH' If this variable exists with a value of `gst', `gawk' switches to @@ -3160,9 +3161,9 @@ File: gawk.info, Node: Invoking Summary, Prev: Undocumented, Up: Invoking Gaw * Use either `awk 'PROGRAM' FILES' or `awk -f PROGRAM-FILE FILES' to run `awk'. - * The three standard `awk' options are `-f', `-F' and `-v'. `gawk' - supplies these and many others, as well as corresponding GNU-style - long options. + * The three standard options for all versions of `awk' are `-f', + `-F' and `-v'. `gawk' supplies these and many others, as well as + corresponding GNU-style long options. * Non-option command-line arguments are usually treated as file names, unless they have the form `VAR=VALUE', in which case they @@ -3998,7 +3999,7 @@ File: gawk.info, Node: Regexp Summary, Prev: Computed Regexps, Up: Regexp `awk', regular expression constants are written enclosed between slashes: `/'...`/'. - * Regexp constants may be used by standalone in patterns and in + * Regexp constants may be used standalone in patterns and in conditional expressions, or as part of matching expressions using the `~' and `!~' operators. @@ -4022,8 +4023,8 @@ File: gawk.info, Node: Regexp Summary, Prev: Computed Regexps, Up: Regexp extent of the match, such as for text substitution and when the record separator is a regexp. - * Matching expressions may use dynamic regexps; that is string values - treated as regular expressions. + * Matching expressions may use dynamic regexps; that is, string + values treated as regular expressions.  @@ -4064,7 +4065,7 @@ have to be named on the `awk' command line (*note Getline::). * Getline:: Reading files under explicit program control using the `getline' function. * Read Timeout:: Reading input with a timeout. -* Command line directories:: What happens if you put a directory on the +* Command-line directories:: What happens if you put a directory on the command line. * Input Summary:: Input summary. * Input Exercises:: Exercises. @@ -4246,16 +4247,16 @@ trailing whitespace: $ echo record 1 AAAA record 2 BBBB record 3 | > gawk 'BEGIN { RS = "\n|( *[[:upper:]]+ *)" } - > { print "Record =", $0, "and RT =", RT }' - -| Record = record 1 and RT = AAAA - -| Record = record 2 and RT = BBBB - -| Record = record 3 and RT = - -| + > { print "Record =", $0,"and RT = [" RT "]" }' + -| Record = record 1 and RT = [ AAAA ] + -| Record = record 2 and RT = [ BBBB ] + -| Record = record 3 and RT = [ + -| ] -The final line of output has an extra blank line. This is because the -value of `RT' is a newline, and the `print' statement supplies its own -terminating newline. *Note Simple Sed::, for a more useful example of -`RS' as a regexp and `RT'. +The square brackets delineate the contents of `RT', letting you see the +leading and trailing whitespace. The final value of `RT' `RT' is a +newline. *Note Simple Sed::, for a more useful example of `RS' as a +regexp and `RT'. If you set `RS' to a regular expression that allows optional trailing text, such as `RS = "abc(XYZ)?"' it is possible, due to @@ -4597,7 +4598,7 @@ File: gawk.info, Node: Field Separators, Next: Constant Size, Prev: Changing * Default Field Splitting:: How fields are normally separated. * Regexp Field Splitting:: Using regexps as the field separator. * Single Character Fields:: Making each character a separate field. -* Command Line Field Separator:: Setting `FS' from the command-line. +* Command Line Field Separator:: Setting `FS' from the command line. * Full Line Fields:: Making the full line be a single field. * Field Splitting Summary:: Some final points and a summary table. @@ -5761,7 +5762,7 @@ VAR Table 4.1: `getline' Variants and What They Set  -File: gawk.info, Node: Read Timeout, Next: Command line directories, Prev: Getline, Up: Reading Files +File: gawk.info, Node: Read Timeout, Next: Command-line directories, Prev: Getline, Up: Reading Files 4.10 Reading Input With A Timeout ================================= @@ -5855,7 +5856,7 @@ writing. (1) This assumes that standard input is the keyboard.  -File: gawk.info, Node: Command line directories, Next: Input Summary, Prev: Read Timeout, Up: Reading Files +File: gawk.info, Node: Command-line directories, Next: Input Summary, Prev: Read Timeout, Up: Reading Files 4.11 Directories On The Command Line ==================================== @@ -5878,7 +5879,7 @@ error. usable data from an `awk' program.  -File: gawk.info, Node: Input Summary, Next: Input Exercises, Prev: Command line directories, Up: Reading Files +File: gawk.info, Node: Input Summary, Next: Input Exercises, Prev: Command-line directories, Up: Reading Files 4.12 Summary ============ @@ -7362,12 +7363,12 @@ For example: } In this example, the programmer wants to pass a regexp constant to -the user-defined function `mysub', which in turn passes it on to either -`sub()' or `gsub()'. However, what really happens is that the `pat' -parameter is either one or zero, depending upon whether or not `$0' -matches `/hi/'. `gawk' issues a warning when it sees a regexp constant -used as a parameter to a user-defined function, since passing a truth -value in this way is probably not what was intended. +the user-defined function `mysub()', which in turn passes it on to +either `sub()' or `gsub()'. However, what really happens is that the +`pat' parameter is either one or zero, depending upon whether or not +`$0' matches `/hi/'. `gawk' issues a warning when it sees a regexp +constant used as a parameter to a user-defined function, since passing +a truth value in this way is probably not what was intended.  File: gawk.info, Node: Variables, Next: Conversion, Prev: Using Constant Regexps, Up: Values @@ -7383,7 +7384,7 @@ on the `awk' command line. * Menu: * Using Variables:: Using variables in your programs. -* Assignment Options:: Setting variables on the command-line and a +* Assignment Options:: Setting variables on the command line and a summary of command-line syntax. This is an advanced method of input. @@ -12329,9 +12330,13 @@ File: gawk.info, Node: Gory Details, Up: String Functions 9.1.3.1 More About `\' and `&' with `sub()', `gsub()', and `gensub()' ..................................................................... -When using `sub()', `gsub()', or `gensub()', and trying to get literal -backslashes and ampersands into the replacement text, you need to -remember that there are several levels of "escape processing" going on. + CAUTION: This section has been known to cause headaches. You + might want to skip it upon first reading. + + When using `sub()', `gsub()', or `gensub()', and trying to get +literal backslashes and ampersands into the replacement text, you need +to remember that there are several levels of "escape processing" going +on. First, there is the "lexical" level, which is when `awk' reads your program and builds an internal copy of it to execute. Then there is @@ -12357,13 +12362,13 @@ is illustrated in *note table-sub-escapes::. You type `sub()' sees `sub()' generates ------- --------- -------------- - `\&' `&' the matched text - `\\&' `\&' a literal `&' - `\\\&' `\&' a literal `&' - `\\\\&' `\\&' a literal `\&' - `\\\\\&' `\\&' a literal `\&' - `\\\\\\&' `\\\&' a literal `\\&' - `\\q' `\q' a literal `\q' + `\&' `&' The matched text + `\\&' `\&' A literal `&' + `\\\&' `\&' A literal `&' + `\\\\&' `\\&' A literal `\&' + `\\\\\&' `\\&' A literal `\&' + `\\\\\\&' `\\\&' A literal `\\&' + `\\q' `\q' A literal `\q' Table 9.1: Historical Escape Sequence Processing for `sub()' and `gsub()' @@ -12377,50 +12382,25 @@ backslashes entered at the lexical level.) The problem with the historical approach is that there is no way to get a literal `\' followed by the matched text. - The 1992 POSIX standard attempted to fix this problem. That standard -says that `sub()' and `gsub()' look for either a `\' or an `&' after -the `\'. If either one follows a `\', that character is output -literally. The interpretation of `\' and `&' then becomes as shown in -*note table-sub-posix-92::. + Several editions of the POSIX standard attempted to fix this problem +but weren't successful. The details are irrelevant at this point in +time. - You type `sub()' sees `sub()' generates - ------- --------- -------------- - `&' `&' the matched text - `\\&' `\&' a literal `&' - `\\\\&' `\\&' a literal `\', then the matched text - `\\\\\\&' `\\\&' a literal `\&' - -Table 9.2: 1992 POSIX Rules for `sub()' and `gsub()' Escape Sequence -Processing - -This appears to solve the problem. Unfortunately, the phrasing of the -standard is unusual. It says, in effect, that `\' turns off the special -meaning of any following character, but for anything other than `\' and -`&', such special meaning is undefined. This wording leads to two -problems: - - * Backslashes must now be doubled in the REPLACEMENT string, breaking - historical `awk' programs. - - * To make sure that an `awk' program is portable, _every_ character - in the REPLACEMENT string must be preceded with a backslash.(1) - - Because of the problems just listed, in 1996, the `gawk' maintainer -submitted proposed text for a revised standard that reverts to rules -that correspond more closely to the original existing practice. The -proposed rules have special cases that make it possible to produce a -`\' preceding the matched text. This is shown in *note -table-sub-proposed::. + At one point, the `gawk' maintainer submitted proposed text for a +revised standard that reverts to rules that correspond more closely to +the original existing practice. The proposed rules have special cases +that make it possible to produce a `\' preceding the matched text. +This is shown in *note table-sub-proposed::. You type `sub()' sees `sub()' generates ------- --------- -------------- - `\\\\\\&' `\\\&' a literal `\&' - `\\\\&' `\\&' a literal `\', followed by the matched text - `\\&' `\&' a literal `&' - `\\q' `\q' a literal `\q' + `\\\\\\&' `\\\&' A literal `\&' + `\\\\&' `\\&' A literal `\', followed by the matched text + `\\&' `\&' A literal `&' + `\\q' `\q' A literal `\q' `\\\\' `\\' `\\' -Table 9.3: Proposed Rules For `sub()' And Backslash +Table 9.2: GNU `awk' Rules For `sub()' And Backslash In a nutshell, at the runtime level, there are now three special sequences of characters (`\\\&', `\\&' and `\&') whereas historically @@ -12428,11 +12408,11 @@ there was only one. However, as in the historical case, any `\' that is not part of one of these three sequences is not special and appears in the output literally. - `gawk' 3.0 and 3.1 follow these proposed POSIX rules for `sub()' and -`gsub()'. The POSIX standard took much longer to be revised than was -expected in 1996. The 2001 standard does not follow the above rules. -Instead, the rules there are somewhat simpler. The results are similar -except for one case. + `gawk' 3.0 and 3.1 follow these rules for `sub()' and `gsub()'. The +POSIX standard took much longer to be revised than was expected. In +addition, the `gawk' maintainer's proposal was lost during the +standardization process. The final rules are somewhat simpler. The +results are similar except for one case. The POSIX rules state that `\&' in the replacement string produces a literal `&', `\\' produces a literal `\', and `\' followed by anything @@ -12441,25 +12421,25 @@ rules are presented in *note table-posix-sub::. You type `sub()' sees `sub()' generates ------- --------- -------------- - `\\\\\\&' `\\\&' a literal `\&' - `\\\\&' `\\&' a literal `\', followed by the matched text - `\\&' `\&' a literal `&' - `\\q' `\q' a literal `\q' + `\\\\\\&' `\\\&' A literal `\&' + `\\\\&' `\\&' A literal `\', followed by the matched text + `\\&' `\&' A literal `&' + `\\q' `\q' A literal `\q' `\\\\' `\\' `\' -Table 9.4: POSIX Rules For `sub()' And `gsub()' +Table 9.3: POSIX Rules For `sub()' And `gsub()' The only case where the difference is noticeable is the last one: `\\\\' is seen as `\\' and produces `\' instead of `\\'. Starting with version 3.1.4, `gawk' followed the POSIX rules when `--posix' is specified (*note Options::). Otherwise, it continued to -follow the 1996 proposed rules, since that had been its behavior for -many years. +follow the proposed rules, since that had been its behavior for many +years. When version 4.0.0 was released, the `gawk' maintainer made the POSIX rules the default, breaking well over a decade's worth of -backwards compatibility.(2) Needless to say, this was a bad idea, and +backwards compatibility.(1) Needless to say, this was a bad idea, and as of version 4.0.1, `gawk' resumed its historical behavior, and only follows the POSIX rules when `--posix' is given. @@ -12472,14 +12452,14 @@ the `\' does not, as shown in *note table-gensub-escapes::. You type `gensub()' sees `gensub()' generates ------- ------------ ----------------- - `&' `&' the matched text - `\\&' `\&' a literal `&' - `\\\\' `\\' a literal `\' - `\\\\&' `\\&' a literal `\', then the matched text - `\\\\\\&' `\\\&' a literal `\&' - `\\q' `\q' a literal `q' + `&' `&' The matched text + `\\&' `\&' A literal `&' + `\\\\' `\\' A literal `\' + `\\\\&' `\\&' A literal `\', then the matched text + `\\\\\\&' `\\\&' A literal `\&' + `\\q' `\q' A literal `q' -Table 9.5: Escape Sequence Processing For `gensub()' +Table 9.4: Escape Sequence Processing For `gensub()' Because of the complexity of the lexical and runtime level processing and the special cases for `sub()' and `gsub()', we recommend the use of @@ -12498,9 +12478,7 @@ Although this makes a certain amount of sense, it can be surprising. ---------- Footnotes ---------- - (1) This consequence was certainly unintended. - - (2) This was rather naive of him, despite there being a note in this + (1) This was rather naive of him, despite there being a note in this section indicating that the next major version would move to the POSIX rules. @@ -13031,7 +13009,7 @@ table-bitwise-ops::. 0 | 0 0 | 0 1 | 0 1 1 | 0 1 | 1 1 | 1 0 -Table 9.6: Bitwise Operations +Table 9.5: Bitwise Operations As you can see, the result of an AND operation is 1 only when _both_ bits are 1. The result of an OR operation is 1 if _either_ bit is 1. @@ -13385,22 +13363,22 @@ standard.) The following is an example of a recursive function. It takes a string as an input parameter and returns the string in backwards order. Recursive functions must always have a test that stops the recursion. -In this case, the recursion terminates when the starting position is -zero, i.e., when there are no more characters left in the string. +In this case, the recursion terminates when the input string is already +empty. - function rev(str, start) + function rev(str) { - if (start == 0) + if (str == "") return "" - return (substr(str, start, 1) rev(str, start - 1)) + return (rev(substr(str, 2)) substr(str, 1, 1)) } If this function is in a file named `rev.awk', it can be tested this way: $ echo "Don't Panic!" | - > gawk --source '{ print rev($0, length($0)) }' -f rev.awk + > gawk --source '{ print rev($0) }' -f rev.awk -| !cinaP t'noD The C `ctime()' function takes a timestamp and returns it in a @@ -13650,8 +13628,8 @@ function _are_ visible outside that function. a[1], a[2], a[3] } - prints `a[1] = 1, a[2] = two, a[3] = 3', because `changeit' stores - `"two"' in the second element of `a'. + prints `a[1] = 1, a[2] = two, a[3] = 3', because `changeit()' + stores `"two"' in the second element of `a'. Some `awk' implementations allow you to call a function that has not been defined. They only report a problem at runtime when the program @@ -19201,24 +19179,7 @@ File: gawk.info, Node: Two-way I/O, Next: TCP/IP Networking, Prev: Array Sort 12.3 Two-Way Communications with Another Process ================================================ - From: brennan@whidbey.com (Mike Brennan) - Newsgroups: comp.lang.awk - Subject: Re: Learn the SECRET to Attract Women Easily - Date: 4 Aug 1997 17:34:46 GMT - Message-ID: <5s53rm$eca@news.whidbey.com> - - On 3 Aug 1997 13:17:43 GMT, Want More Dates??? - wrote: - >Learn the SECRET to Attract Women Easily - > - >The SCENT(tm) Pheromone Sex Attractant For Men to Attract Women - - The scent of awk programmers is a lot more attractive to women than - the scent of perl programmers. - -- - Mike Brennan - - It is often useful to be able to send data to a separate program for +It is often useful to be able to send data to a separate program for processing and then read the result. This can always be done with temporary files: @@ -19237,12 +19198,11 @@ temporary files: This works, but not elegantly. Among other things, it requires that the program be run in a directory that cannot be shared among users; for example, `/tmp' will not do, as another user might happen to be -using a temporary file with the same name. - - However, with `gawk', it is possible to open a _two-way_ pipe to -another process. The second process is termed a "coprocess", since it -runs in parallel with `gawk'. The two-way connection is created using -the `|&' operator (borrowed from the Korn shell, `ksh'):(1) +using a temporary file with the same name.(1) However, with `gawk', it +is possible to open a _two-way_ pipe to another process. The second +process is termed a "coprocess", since it runs in parallel with `gawk'. +The two-way connection is created using the `|&' operator (borrowed +from the Korn shell, `ksh'):(2) do { print DATA |& "subprogram" @@ -19329,7 +19289,11 @@ using regular pipes. ---------- Footnotes ---------- - (1) This is very different from the same operator in the C shell and + (1) Michael Brennan suggests the use of `rand()' to generate unique +file names. This is a valid point; nevertheless, temporary files remain +more difficult than two-way pipes. + + (2) This is very different from the same operator in the C shell and in Bash.  @@ -19352,7 +19316,7 @@ network connection. You can think of this as just a _very long_ two-way pipeline to a coprocess. The way `gawk' decides that you want to use TCP/IP networking is by recognizing special file names that begin with one of -`/inet/', `/inet4/' or `/inet6'. +`/inet/', `/inet4/' or `/inet6/'. The full syntax of the special file name is `/NET-TYPE/PROTOCOL/LOCAL-PORT/REMOTE-HOST/REMOTE-PORT'. The @@ -21389,6 +21353,10 @@ in `gawk'. It continues on to present arbitrary precision integers, and concludes with a description of some points where `gawk' and the POSIX standard are not quite in agreement. + NOTE: Most users of `gawk' can safely skip this chapter. But if + you want to do scientific calculations with `gawk', this is the + place to be. + * Menu: * Computer Arithmetic:: A quick intro to computer math. @@ -21519,9 +21487,18 @@ material here. number and infinity produce infinity. "NaN" - "Not A Number." A special value indicating a result that can't - happen in real math, but that can happen in floating-point - computations. + "Not A Number."(1). A special value that results from attempting a + calculation that has no answer as a real number. In such a case, + programs can either receive a floating-point exception, or get + `NaN' back as the result. The IEEE 754 standard recommends that + systems return `NaN'. Some examples: + + `sqrt(-1)' + This makes sense in the range of complex numbers, but not in + the range of real numbers, so the result is `NaN'. + + `log(-8)' + -8 is out of the domain of `log()', so the result is `NaN'. "Normalized" How the significand (see later in this list) is usually stored. The @@ -21579,6 +21556,11 @@ Table 15.1: Basic IEEE Format Context Values NOTE: The precision numbers include the implied leading one that gives them one extra bit of significand. + ---------- Footnotes ---------- + + (1) Thanks to Michael Brennan for this description, which I have +paraphrased, and for the examples +  File: gawk.info, Node: MPFR features, Next: FP Math Caution, Prev: Math Definitions, Up: Arbitrary Precision Arithmetic @@ -21906,7 +21888,7 @@ on arithmetic operations: of a constant. If you need to represent a floating-point constant at a higher - precision than the default and cannot use a command line + precision than the default and cannot use a command-line assignment to `PREC', you should either specify the constant as a string, or as a rational number, whenever possible. The following example illustrates the differences among various ways to print a @@ -22401,7 +22383,7 @@ Example::) and also the `testext.c' code for testing the APIs. Some other bits and pieces: * The API provides access to `gawk''s `do_XXX' values, reflecting - command line options, like `do_lint', `do_profiling' and so on + command-line options, like `do_lint', `do_profiling' and so on (*note Extension API Variables::). These are informational: an extension cannot affect their values inside `gawk'. In addition, attempting to assign to them produces a compile-time error. @@ -25995,7 +25977,7 @@ the current version of `gawk'. - Indirect function calls (*note Indirect Calls::). - Directories on the command line produce a warning and are - skipped (*note Command line directories::). + skipped (*note Command-line directories::). * New keywords: @@ -26165,7 +26147,7 @@ in POSIX `awk', in the order they were added to `gawk'. * The ability to delete all of an array at once with `delete ARRAY' (*note Delete::). - * Command line option changes (*note Options::): + * Command-line option changes (*note Options::): - The ability to use GNU-style long-named options that start with `--'. @@ -26202,7 +26184,7 @@ in POSIX `awk', in the order they were added to `gawk'. * The `fflush()' function from Brian Kernighan's `awk' (then at Bell Laboratories; *note I/O Functions::). - * New command line options: + * New command-line options: - The `--lint-old' option to warn about constructs that are not available in the original Version 7 Unix version of `awk' @@ -26395,7 +26377,7 @@ in POSIX `awk', in the order they were added to `gawk'. * `switch' / `case' are enabled by default (*note Switch Statement::). - * Command line option changes (*note Options::): + * Command-line option changes (*note Options::): - The `-b' and `--characters-as-bytes' options which prevent `gawk' from treating input as a multibyte string. @@ -26413,7 +26395,7 @@ in POSIX `awk', in the order they were added to `gawk'. * Directories named on the command line now produce a warning, not a fatal error, unless `--posix' or `--traditional' are used (*note - Command line directories::). + Command-line directories::). * The `gawk' internals were rewritten, bringing the `dgawk' debugger and possibly improved performance (*note Debugger::). @@ -26462,10 +26444,10 @@ in POSIX `awk', in the order they were added to `gawk'. `PROCINFO["identifiers"]' (*note Auto-set::). * The three executables `gawk', `pgawk', and `dgawk', were merged - into one, named just `gawk'. As a result the command line options + into one, named just `gawk'. As a result the command-line options changed. - * Command line option changes (*note Options::): + * Command-line option changes (*note Options::): - The `-D' option invokes the debugger. @@ -30945,7 +30927,7 @@ Index * * (asterisk), * operator, as regexp operator: Regexp Operators. (line 88) * * (asterisk), * operator, null strings, matching: Gory Details. - (line 164) + (line 143) * * (asterisk), ** operator <1>: Precedence. (line 49) * * (asterisk), ** operator: Arithmetic Ops. (line 81) * * (asterisk), **= operator <1>: Precedence. (line 95) @@ -31026,7 +31008,7 @@ Index * -F option: Options. (line 21) * -f option: Long. (line 12) * -F option, -Ft sets FS to TAB: Options. (line 308) -* -F option, command line: Command Line Field Separator. +* -F option, command-line: Command Line Field Separator. (line 6) * -f option, multiple uses: Options. (line 313) * -g option: Options. (line 147) @@ -31184,7 +31166,7 @@ Index * advanced features, network programming: TCP/IP Networking. (line 6) * advanced features, nondecimal input data: Nondecimal Data. (line 6) * advanced features, processes, communicating with: Two-way I/O. - (line 23) + (line 6) * advanced features, specifying field content: Splitting By Content. (line 10) * Aho, Alfred <1>: Contributors. (line 11) @@ -31304,7 +31286,7 @@ Index * asterisk (*), * operator, as regexp operator: Regexp Operators. (line 88) * asterisk (*), * operator, null strings, matching: Gory Details. - (line 164) + (line 143) * asterisk (*), ** operator <1>: Precedence. (line 49) * asterisk (*), ** operator: Arithmetic Ops. (line 81) * asterisk (*), **= operator <1>: Precedence. (line 95) @@ -31507,12 +31489,11 @@ Index * breakpoint, how to disable or enable: Breakpoint Control. (line 69) * breakpoint, setting: Breakpoint Control. (line 11) * Brennan, Michael <1>: Other Versions. (line 6) -* Brennan, Michael <2>: Two-way I/O. (line 6) -* Brennan, Michael <3>: Simple Sed. (line 25) -* Brennan, Michael <4>: Delete. (line 56) +* Brennan, Michael <2>: Simple Sed. (line 25) +* Brennan, Michael <3>: Delete. (line 56) * Brennan, Michael: Foreword. (line 83) * Brian Kernighan's awk <1>: I/O Functions. (line 43) -* Brian Kernighan's awk <2>: Gory Details. (line 15) +* Brian Kernighan's awk <2>: Gory Details. (line 19) * Brian Kernighan's awk <3>: String Functions. (line 490) * Brian Kernighan's awk <4>: Delete. (line 48) * Brian Kernighan's awk <5>: Nextfile Statement. (line 47) @@ -31539,7 +31520,7 @@ Index * Buening, Andreas <1>: Bugs. (line 71) * Buening, Andreas <2>: Contributors. (line 92) * Buening, Andreas: Acknowledgments. (line 60) -* buffering, input/output <1>: Two-way I/O. (line 70) +* buffering, input/output <1>: Two-way I/O. (line 52) * buffering, input/output: I/O Functions. (line 140) * buffering, interactive vs. noninteractive: I/O Functions. (line 109) * buffers, flushing: I/O Functions. (line 32) @@ -31607,7 +31588,7 @@ Index (line 81) * close() function, return value: Close Files And Pipes. (line 131) -* close() function, two-way pipes and: Two-way I/O. (line 77) +* close() function, two-way pipes and: Two-way I/O. (line 59) * Close, Diane <1>: Contributors. (line 20) * Close, Diane: Manual History. (line 34) * Collado, Manuel: Acknowledgments. (line 60) @@ -31622,7 +31603,7 @@ Index * command line, arguments <1>: ARGC and ARGV. (line 6) * command line, arguments <2>: Auto-set. (line 15) * command line, arguments: Other Arguments. (line 6) -* command line, directories on: Command line directories. +* command line, directories on: Command-line directories. (line 6) * command line, formats: Running gawk. (line 12) * command line, FS on, setting: Command Line Field Separator. @@ -31714,7 +31695,7 @@ Index * CONVFMT variable, and array subscripts: Numeric Array Subscripts. (line 6) * cookie: Glossary. (line 149) -* coprocesses <1>: Two-way I/O. (line 44) +* coprocesses <1>: Two-way I/O. (line 25) * coprocesses: Redirection. (line 102) * coprocesses, closing: Close Files And Pipes. (line 6) @@ -31724,7 +31705,7 @@ Index * counting: Wc Program. (line 6) * csh utility: Statements/Lines. (line 44) * csh utility, POSIXLY_CORRECT environment variable: Options. (line 355) -* csh utility, |& operator, comparison with: Two-way I/O. (line 44) +* csh utility, |& operator, comparison with: Two-way I/O. (line 25) * ctime() user-defined function: Function Example. (line 73) * currency symbols, localization: Explaining gettext. (line 104) * current system time: Time Functions. (line 66) @@ -31800,7 +31781,7 @@ Index * dcngettext: I18N Functions. (line 28) * dcngettext() function (gawk), portability and: I18N Portability. (line 33) -* deadlocks: Two-way I/O. (line 70) +* deadlocks: Two-way I/O. (line 52) * debugger commands, b (break): Breakpoint Control. (line 11) * debugger commands, backtrace: Execution Stack. (line 13) * debugger commands, break: Breakpoint Control. (line 11) @@ -31943,7 +31924,7 @@ Index (line 15) * differences in awk and gawk, close() function: Close Files And Pipes. (line 81) -* differences in awk and gawk, command line directories: Command line directories. +* differences in awk and gawk, command-line directories: Command-line directories. (line 6) * differences in awk and gawk, ERRNO variable: Auto-set. (line 74) * differences in awk and gawk, error messages: Special FD. (line 16) @@ -31996,7 +31977,7 @@ Index (line 152) * differences in awk and gawk, trunc-mod operation: Arithmetic Ops. (line 66) -* directories, command line: Command line directories. +* directories, command-line: Command-line directories. (line 6) * directories, searching: Programs Exercises. (line 63) * directories, searching for loadable extensions: AWKLIBPATH Variable. @@ -32464,7 +32445,7 @@ Index * gawk, newlines in: Statements/Lines. (line 12) * gawk, octal numbers and: Nondecimal-numbers. (line 42) * gawk, OS/2 version of: PC Using. (line 16) -* gawk, PROCINFO array in <1>: Two-way I/O. (line 117) +* gawk, PROCINFO array in <1>: Two-way I/O. (line 99) * gawk, PROCINFO array in <2>: Time Functions. (line 47) * gawk, PROCINFO array in: Auto-set. (line 128) * gawk, regexp constants and: Using Constant Regexps. @@ -32515,7 +32496,7 @@ Index (line 6) * getline command, coprocesses, using from: Getline/Coprocess. (line 6) -* getline command, deadlock and: Two-way I/O. (line 70) +* getline command, deadlock and: Two-way I/O. (line 52) * getline command, explicit input with: Getline. (line 6) * getline command, FILENAME variable and: Getline Notes. (line 19) * getline command, return values: Getline. (line 19) @@ -32661,7 +32642,7 @@ Index * input/output functions: I/O Functions. (line 6) * input/output, binary: User-modified. (line 15) * input/output, from BEGIN and END: I/O And BEGIN/END. (line 6) -* input/output, two-way: Two-way I/O. (line 44) +* input/output, two-way: Two-way I/O. (line 25) * insomnia, cure for: Alarm Program. (line 6) * installation, VMS: VMS Installation. (line 6) * installing gawk: Installation. (line 6) @@ -32852,7 +32833,7 @@ Index * matching, expressions, See comparison expressions: Typing and Comparison. (line 9) * matching, leftmost longest: Multiple Line. (line 26) -* matching, null strings: Gory Details. (line 164) +* matching, null strings: Gory Details. (line 143) * mawk utility <1>: Other Versions. (line 44) * mawk utility <2>: Nextfile Statement. (line 47) * mawk utility <3>: Concatenation. (line 36) @@ -32946,7 +32927,7 @@ Index (line 43) * null strings, converting numbers to strings: Strings And Numbers. (line 21) -* null strings, matching: Gory Details. (line 164) +* null strings, matching: Gory Details. (line 143) * number as string of bits: Bitwise Functions. (line 109) * number of array elements: String Functions. (line 197) * number sign (#), #! (executable scripts): Executable Scripts. @@ -33152,7 +33133,7 @@ Index * POSIX awk, field separators and: Fields. (line 6) * POSIX awk, FS variable and: User-modified. (line 60) * POSIX awk, function keyword in: Definition Syntax. (line 89) -* POSIX awk, functions and, gsub()/sub(): Gory Details. (line 54) +* POSIX awk, functions and, gsub()/sub(): Gory Details. (line 90) * POSIX awk, functions and, length(): String Functions. (line 176) * POSIX awk, GNU long options and: Options. (line 15) * POSIX awk, interval expressions in: Regexp Operators. (line 136) @@ -33214,12 +33195,12 @@ Index * private variables: Library Names. (line 11) * process group idIDof gawk process: Auto-set. (line 175) * process ID of gawk process: Auto-set. (line 178) -* processes, two-way communications with: Two-way I/O. (line 23) +* processes, two-way communications with: Two-way I/O. (line 6) * processing data: Basic High Level. (line 6) * PROCINFO array <1>: Passwd Functions. (line 6) * PROCINFO array <2>: Time Functions. (line 47) * PROCINFO array: Auto-set. (line 128) -* PROCINFO array, and communications via ptys: Two-way I/O. (line 117) +* PROCINFO array, and communications via ptys: Two-way I/O. (line 99) * PROCINFO array, and group membership: Group Functions. (line 6) * PROCINFO array, and user and group ID numbers: Id Program. (line 15) * PROCINFO array, testing the field splitting: Passwd Functions. @@ -33231,7 +33212,6 @@ Index * profiling awk programs, dynamically: Profiling. (line 179) * program identifiers: Auto-set. (line 146) * program, definition of: Getting Started. (line 21) -* programmers, attractiveness of: Two-way I/O. (line 6) * programming conventions, --non-decimal-data option: Nondecimal Data. (line 36) * programming conventions, ARGC/ARGV variables: Auto-set. (line 35) @@ -33531,7 +33511,7 @@ Index (line 64) * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions. (line 107) -* sidebar, Matching the Null String: Gory Details. (line 162) +* sidebar, Matching the Null String: Gory Details. (line 141) * sidebar, Operator Evaluation Order: Increment Ops. (line 58) * sidebar, Piping into sh: Redirection. (line 140) * sidebar, Portability Issues with #!: Executable Scripts. (line 31) @@ -33580,7 +33560,7 @@ Index * sort function, arrays, sorting: Array Sorting Functions. (line 6) * sort utility: Word Sorting. (line 50) -* sort utility, coprocesses and: Two-way I/O. (line 83) +* sort utility, coprocesses and: Two-way I/O. (line 65) * sorting characters in different languages: Explaining gettext. (line 94) * source code, awka: Other Versions. (line 64) @@ -33872,7 +33852,7 @@ Index * vertical bar (|): Regexp Operators. (line 70) * vertical bar (|), | operator (I/O) <1>: Precedence. (line 65) * vertical bar (|), | operator (I/O): Getline/Pipe. (line 9) -* vertical bar (|), |& operator (I/O) <1>: Two-way I/O. (line 44) +* vertical bar (|), |& operator (I/O) <1>: Two-way I/O. (line 25) * vertical bar (|), |& operator (I/O) <2>: Precedence. (line 65) * vertical bar (|), |& operator (I/O): Getline/Coprocess. (line 6) * vertical bar (|), || operator <1>: Precedence. (line 89) @@ -33934,7 +33914,7 @@ Index * | (vertical bar), | operator (I/O) <1>: Precedence. (line 65) * | (vertical bar), | operator (I/O) <2>: Redirection. (line 57) * | (vertical bar), | operator (I/O): Getline/Pipe. (line 9) -* | (vertical bar), |& operator (I/O) <1>: Two-way I/O. (line 44) +* | (vertical bar), |& operator (I/O) <1>: Two-way I/O. (line 25) * | (vertical bar), |& operator (I/O) <2>: Precedence. (line 65) * | (vertical bar), |& operator (I/O) <3>: Redirection. (line 102) * | (vertical bar), |& operator (I/O): Getline/Coprocess. (line 6) @@ -33974,532 +33954,531 @@ Node: Getting Started70816 Node: Running gawk73250 Node: One-shot74440 Node: Read Terminal75665 -Ref: Read Terminal-Footnote-177315 -Ref: Read Terminal-Footnote-277591 -Node: Long77762 -Node: Executable Scripts79138 -Ref: Executable Scripts-Footnote-180971 -Ref: Executable Scripts-Footnote-281073 -Node: Comments81620 -Node: Quoting84093 -Node: DOS Quoting89409 -Node: Sample Data Files90084 -Node: Very Simple92599 -Node: Two Rules97372 -Node: More Complex99266 -Ref: More Complex-Footnote-1102198 -Node: Statements/Lines102283 -Ref: Statements/Lines-Footnote-1106739 -Node: Other Features107004 -Node: When107932 -Node: Intro Summary110102 -Node: Invoking Gawk110868 -Node: Command Line112383 -Node: Options113174 -Ref: Options-Footnote-1129003 -Node: Other Arguments129028 -Node: Naming Standard Input131690 -Node: Environment Variables132784 -Node: AWKPATH Variable133342 -Ref: AWKPATH Variable-Footnote-1136214 -Ref: AWKPATH Variable-Footnote-2136259 -Node: AWKLIBPATH Variable136519 -Node: Other Environment Variables137278 -Node: Exit Status140933 -Node: Include Files141608 -Node: Loading Shared Libraries145186 -Node: Obsolete146570 -Node: Undocumented147267 -Node: Invoking Summary147534 -Node: Regexp149114 -Node: Regexp Usage150564 -Node: Escape Sequences152597 -Node: Regexp Operators158264 -Ref: Regexp Operators-Footnote-1165744 -Ref: Regexp Operators-Footnote-2165891 -Node: Bracket Expressions165989 -Ref: table-char-classes167879 -Node: GNU Regexp Operators170819 -Node: Case-sensitivity174542 -Ref: Case-sensitivity-Footnote-1177434 -Ref: Case-sensitivity-Footnote-2177669 -Node: Leftmost Longest177777 -Node: Computed Regexps178978 -Node: Regexp Summary182350 -Node: Reading Files183821 -Node: Records185913 -Node: awk split records186656 -Node: gawk split records191514 -Ref: gawk split records-Footnote-1196035 -Node: Fields196072 -Ref: Fields-Footnote-1199036 -Node: Nonconstant Fields199122 -Ref: Nonconstant Fields-Footnote-1201352 -Node: Changing Fields201554 -Node: Field Separators207508 -Node: Default Field Splitting210210 -Node: Regexp Field Splitting211327 -Node: Single Character Fields214668 -Node: Command Line Field Separator215727 -Node: Full Line Fields219069 -Ref: Full Line Fields-Footnote-1219577 -Node: Field Splitting Summary219623 -Ref: Field Splitting Summary-Footnote-1222722 -Node: Constant Size222823 -Node: Splitting By Content227430 -Ref: Splitting By Content-Footnote-1231180 -Node: Multiple Line231220 -Ref: Multiple Line-Footnote-1237076 -Node: Getline237255 -Node: Plain Getline239471 -Node: Getline/Variable241566 -Node: Getline/File242713 -Node: Getline/Variable/File244097 -Ref: Getline/Variable/File-Footnote-1245696 -Node: Getline/Pipe245783 -Node: Getline/Variable/Pipe248482 -Node: Getline/Coprocess249589 -Node: Getline/Variable/Coprocess250841 -Node: Getline Notes251578 -Node: Getline Summary254382 -Ref: table-getline-variants254790 -Node: Read Timeout255702 -Ref: Read Timeout-Footnote-1259529 -Node: Command line directories259587 -Node: Input Summary260491 -Node: Input Exercises263628 -Node: Printing264361 -Node: Print266083 -Node: Print Examples267424 -Node: Output Separators270203 -Node: OFMT272219 -Node: Printf273577 -Node: Basic Printf274483 -Node: Control Letters276022 -Node: Format Modifiers280013 -Node: Printf Examples286040 -Node: Redirection288504 -Node: Special Files295476 -Node: Special FD296007 -Ref: Special FD-Footnote-1299604 -Node: Special Network299678 -Node: Special Caveats300528 -Node: Close Files And Pipes301324 -Ref: Close Files And Pipes-Footnote-1308485 -Ref: Close Files And Pipes-Footnote-2308633 -Node: Output Summary308783 -Node: Output exercises309780 -Node: Expressions310460 -Node: Values311645 -Node: Constants312321 -Node: Scalar Constants313001 -Ref: Scalar Constants-Footnote-1313860 -Node: Nondecimal-numbers314110 -Node: Regexp Constants317110 -Node: Using Constant Regexps317585 -Node: Variables320655 -Node: Using Variables321310 -Node: Assignment Options323034 -Node: Conversion324909 -Node: Strings And Numbers325433 -Ref: Strings And Numbers-Footnote-1328495 -Node: Locale influences conversions328604 -Ref: table-locale-affects331321 -Node: All Operators331909 -Node: Arithmetic Ops332539 -Node: Concatenation335044 -Ref: Concatenation-Footnote-1337863 -Node: Assignment Ops337983 -Ref: table-assign-ops342966 -Node: Increment Ops344283 -Node: Truth Values and Conditions347721 -Node: Truth Values348804 -Node: Typing and Comparison349853 -Node: Variable Typing350646 -Node: Comparison Operators354296 -Ref: table-relational-ops354706 -Node: POSIX String Comparison358256 -Ref: POSIX String Comparison-Footnote-1359340 -Node: Boolean Ops359478 -Ref: Boolean Ops-Footnote-1363548 -Node: Conditional Exp363639 -Node: Function Calls365366 -Node: Precedence369246 -Node: Locales372915 -Node: Expressions Summary374546 -Node: Patterns and Actions377087 -Node: Pattern Overview378203 -Node: Regexp Patterns379880 -Node: Expression Patterns380423 -Node: Ranges384204 -Node: BEGIN/END387310 -Node: Using BEGIN/END388072 -Ref: Using BEGIN/END-Footnote-1390808 -Node: I/O And BEGIN/END390914 -Node: BEGINFILE/ENDFILE393199 -Node: Empty396130 -Node: Using Shell Variables396447 -Node: Action Overview398730 -Node: Statements401057 -Node: If Statement402905 -Node: While Statement404403 -Node: Do Statement406447 -Node: For Statement407603 -Node: Switch Statement410755 -Node: Break Statement412858 -Node: Continue Statement414913 -Node: Next Statement416706 -Node: Nextfile Statement419096 -Node: Exit Statement421751 -Node: Built-in Variables424155 -Node: User-modified425282 -Ref: User-modified-Footnote-1432971 -Node: Auto-set433033 -Ref: Auto-set-Footnote-1445615 -Ref: Auto-set-Footnote-2445820 -Node: ARGC and ARGV445876 -Node: Pattern Action Summary449730 -Node: Arrays451953 -Node: Array Basics453502 -Node: Array Intro454328 -Ref: figure-array-elements456301 -Node: Reference to Elements458708 -Node: Assigning Elements460981 -Node: Array Example461472 -Node: Scanning an Array463204 -Node: Controlling Scanning466219 -Ref: Controlling Scanning-Footnote-1471392 -Node: Delete471708 -Ref: Delete-Footnote-1474473 -Node: Numeric Array Subscripts474530 -Node: Uninitialized Subscripts476713 -Node: Multidimensional478338 -Node: Multiscanning481431 -Node: Arrays of Arrays483020 -Node: Arrays Summary487683 -Node: Functions489788 -Node: Built-in490661 -Node: Calling Built-in491739 -Node: Numeric Functions493727 -Ref: Numeric Functions-Footnote-1497669 -Ref: Numeric Functions-Footnote-2498026 -Ref: Numeric Functions-Footnote-3498074 -Node: String Functions498343 -Ref: String Functions-Footnote-1521354 -Ref: String Functions-Footnote-2521483 -Ref: String Functions-Footnote-3521731 -Node: Gory Details521818 -Ref: table-sub-escapes523487 -Ref: table-sub-posix-92524841 -Ref: table-sub-proposed526192 -Ref: table-posix-sub527546 -Ref: table-gensub-escapes529091 -Ref: Gory Details-Footnote-1530267 -Ref: Gory Details-Footnote-2530318 -Node: I/O Functions530469 -Ref: I/O Functions-Footnote-1537592 -Node: Time Functions537739 -Ref: Time Functions-Footnote-1548203 -Ref: Time Functions-Footnote-2548271 -Ref: Time Functions-Footnote-3548429 -Ref: Time Functions-Footnote-4548540 -Ref: Time Functions-Footnote-5548652 -Ref: Time Functions-Footnote-6548879 -Node: Bitwise Functions549145 -Ref: table-bitwise-ops549707 -Ref: Bitwise Functions-Footnote-1553952 -Node: Type Functions554136 -Node: I18N Functions555278 -Node: User-defined556923 -Node: Definition Syntax557727 -Ref: Definition Syntax-Footnote-1562906 -Node: Function Example562975 -Ref: Function Example-Footnote-1565619 -Node: Function Caveats565641 -Node: Calling A Function566159 -Node: Variable Scope567114 -Node: Pass By Value/Reference570102 -Node: Return Statement573610 -Node: Dynamic Typing576594 -Node: Indirect Calls577523 -Node: Functions Summary587236 -Node: Library Functions589775 -Ref: Library Functions-Footnote-1593393 -Ref: Library Functions-Footnote-2593536 -Node: Library Names593707 -Ref: Library Names-Footnote-1597180 -Ref: Library Names-Footnote-2597400 -Node: General Functions597486 -Node: Strtonum Function598514 -Node: Assert Function601294 -Node: Round Function604620 -Node: Cliff Random Function606161 -Node: Ordinal Functions607177 -Ref: Ordinal Functions-Footnote-1610254 -Ref: Ordinal Functions-Footnote-2610506 -Node: Join Function610717 -Ref: Join Function-Footnote-1612488 -Node: Getlocaltime Function612688 -Node: Readfile Function616424 -Node: Data File Management618263 -Node: Filetrans Function618895 -Node: Rewind Function622964 -Node: File Checking624522 -Ref: File Checking-Footnote-1625654 -Node: Empty Files625855 -Node: Ignoring Assigns627834 -Node: Getopt Function629388 -Ref: Getopt Function-Footnote-1640691 -Node: Passwd Functions640894 -Ref: Passwd Functions-Footnote-1649873 -Node: Group Functions649961 -Ref: Group Functions-Footnote-1657902 -Node: Walking Arrays658115 -Node: Library Functions Summary659718 -Node: Library exercises661106 -Node: Sample Programs662386 -Node: Running Examples663156 -Node: Clones663884 -Node: Cut Program665108 -Node: Egrep Program674976 -Ref: Egrep Program-Footnote-1682947 -Node: Id Program683057 -Node: Split Program686721 -Ref: Split Program-Footnote-1690259 -Node: Tee Program690387 -Node: Uniq Program693194 -Node: Wc Program700624 -Ref: Wc Program-Footnote-1704889 -Node: Miscellaneous Programs704981 -Node: Dupword Program706194 -Node: Alarm Program708225 -Node: Translate Program713039 -Ref: Translate Program-Footnote-1717430 -Ref: Translate Program-Footnote-2717700 -Node: Labels Program717834 -Ref: Labels Program-Footnote-1721205 -Node: Word Sorting721289 -Node: History Sorting725332 -Node: Extract Program727168 -Node: Simple Sed734704 -Node: Igawk Program737766 -Ref: Igawk Program-Footnote-1752077 -Ref: Igawk Program-Footnote-2752278 -Node: Anagram Program752416 -Node: Signature Program755484 -Node: Programs Summary756731 -Node: Programs Exercises757946 -Node: Advanced Features761597 -Node: Nondecimal Data763545 -Node: Array Sorting765122 -Node: Controlling Array Traversal765819 -Node: Array Sorting Functions774099 -Ref: Array Sorting Functions-Footnote-1778006 -Node: Two-way I/O778200 -Ref: Two-way I/O-Footnote-1783716 -Node: TCP/IP Networking783798 -Node: Profiling786642 -Node: Advanced Features Summary794184 -Node: Internationalization796048 -Node: I18N and L10N797528 -Node: Explaining gettext798214 -Ref: Explaining gettext-Footnote-1803354 -Ref: Explaining gettext-Footnote-2803538 -Node: Programmer i18n803703 -Node: Translator i18n807928 -Node: String Extraction808722 -Ref: String Extraction-Footnote-1809683 -Node: Printf Ordering809769 -Ref: Printf Ordering-Footnote-1812551 -Node: I18N Portability812615 -Ref: I18N Portability-Footnote-1815064 -Node: I18N Example815127 -Ref: I18N Example-Footnote-1817849 -Node: Gawk I18N817921 -Node: I18N Summary818559 -Node: Debugger819898 -Node: Debugging820920 -Node: Debugging Concepts821361 -Node: Debugging Terms823217 -Node: Awk Debugging825814 -Node: Sample Debugging Session826706 -Node: Debugger Invocation827226 -Node: Finding The Bug828559 -Node: List of Debugger Commands835041 -Node: Breakpoint Control836373 -Node: Debugger Execution Control840037 -Node: Viewing And Changing Data843397 -Node: Execution Stack846755 -Node: Debugger Info848268 -Node: Miscellaneous Debugger Commands852262 -Node: Readline Support857446 -Node: Limitations858338 -Node: Debugging Summary860612 -Node: Arbitrary Precision Arithmetic861776 -Node: Computer Arithmetic863105 -Ref: Computer Arithmetic-Footnote-1867492 -Node: Math Definitions867549 -Ref: table-ieee-formats870433 -Node: MPFR features870937 -Node: FP Math Caution872579 -Ref: FP Math Caution-Footnote-1873620 -Node: Inexactness of computations873989 -Node: Inexact representation874937 -Node: Comparing FP Values876292 -Node: Errors accumulate877256 -Node: Getting Accuracy878689 -Node: Try To Round881348 -Node: Setting precision882247 -Ref: table-predefined-precision-strings882929 -Node: Setting the rounding mode884722 -Ref: table-gawk-rounding-modes885086 -Ref: Setting the rounding mode-Footnote-1888540 -Node: Arbitrary Precision Integers888719 -Ref: Arbitrary Precision Integers-Footnote-1891722 -Node: POSIX Floating Point Problems891871 -Ref: POSIX Floating Point Problems-Footnote-1895747 -Node: Floating point summary895785 -Node: Dynamic Extensions898002 -Node: Extension Intro899554 -Node: Plugin License900819 -Node: Extension Mechanism Outline901504 -Ref: figure-load-extension901928 -Ref: figure-load-new-function903413 -Ref: figure-call-new-function904415 -Node: Extension API Description906399 -Node: Extension API Functions Introduction907849 -Node: General Data Types912714 -Ref: General Data Types-Footnote-1918407 -Node: Requesting Values918706 -Ref: table-value-types-returned919443 -Node: Memory Allocation Functions920401 -Ref: Memory Allocation Functions-Footnote-1923148 -Node: Constructor Functions923244 -Node: Registration Functions925002 -Node: Extension Functions925687 -Node: Exit Callback Functions927989 -Node: Extension Version String929238 -Node: Input Parsers929888 -Node: Output Wrappers939702 -Node: Two-way processors944218 -Node: Printing Messages946422 -Ref: Printing Messages-Footnote-1947499 -Node: Updating `ERRNO'947651 -Node: Accessing Parameters948390 -Node: Symbol Table Access949620 -Node: Symbol table by name950134 -Node: Symbol table by cookie952110 -Ref: Symbol table by cookie-Footnote-1956243 -Node: Cached values956306 -Ref: Cached values-Footnote-1959810 -Node: Array Manipulation959901 -Ref: Array Manipulation-Footnote-1960999 -Node: Array Data Types961038 -Ref: Array Data Types-Footnote-1963741 -Node: Array Functions963833 -Node: Flattening Arrays967707 -Node: Creating Arrays974559 -Node: Extension API Variables979290 -Node: Extension Versioning979926 -Node: Extension API Informational Variables981827 -Node: Extension API Boilerplate982913 -Node: Finding Extensions986717 -Node: Extension Example987277 -Node: Internal File Description988007 -Node: Internal File Ops992098 -Ref: Internal File Ops-Footnote-11003530 -Node: Using Internal File Ops1003670 -Ref: Using Internal File Ops-Footnote-11006017 -Node: Extension Samples1006285 -Node: Extension Sample File Functions1007809 -Node: Extension Sample Fnmatch1015377 -Node: Extension Sample Fork1016859 -Node: Extension Sample Inplace1018072 -Node: Extension Sample Ord1019747 -Node: Extension Sample Readdir1020583 -Ref: table-readdir-file-types1021439 -Node: Extension Sample Revout1022238 -Node: Extension Sample Rev2way1022829 -Node: Extension Sample Read write array1023570 -Node: Extension Sample Readfile1025449 -Node: Extension Sample API Tests1026549 -Node: Extension Sample Time1027074 -Node: gawkextlib1028389 -Node: Extension summary1031202 -Node: Extension Exercises1034895 -Node: Language History1035617 -Node: V7/SVR3.11037260 -Node: SVR41039580 -Node: POSIX1041022 -Node: BTL1042408 -Node: POSIX/GNU1043142 -Node: Feature History1048885 -Node: Common Extensions1062015 -Node: Ranges and Locales1063327 -Ref: Ranges and Locales-Footnote-11067944 -Ref: Ranges and Locales-Footnote-21067971 -Ref: Ranges and Locales-Footnote-31068205 -Node: Contributors1068426 -Node: History summary1073851 -Node: Installation1075220 -Node: Gawk Distribution1076171 -Node: Getting1076655 -Node: Extracting1077479 -Node: Distribution contents1079121 -Node: Unix Installation1084838 -Node: Quick Installation1085455 -Node: Additional Configuration Options1087897 -Node: Configuration Philosophy1089635 -Node: Non-Unix Installation1091986 -Node: PC Installation1092444 -Node: PC Binary Installation1093755 -Node: PC Compiling1095603 -Ref: PC Compiling-Footnote-11098602 -Node: PC Testing1098707 -Node: PC Using1099883 -Node: Cygwin1104041 -Node: MSYS1104850 -Node: VMS Installation1105364 -Node: VMS Compilation1106160 -Ref: VMS Compilation-Footnote-11107382 -Node: VMS Dynamic Extensions1107440 -Node: VMS Installation Details1108813 -Node: VMS Running1111065 -Node: VMS GNV1113899 -Node: VMS Old Gawk1114622 -Node: Bugs1115092 -Node: Other Versions1119096 -Node: Installation summary1125351 -Node: Notes1126407 -Node: Compatibility Mode1127272 -Node: Additions1128054 -Node: Accessing The Source1128979 -Node: Adding Code1130415 -Node: New Ports1136593 -Node: Derived Files1141074 -Ref: Derived Files-Footnote-11146155 -Ref: Derived Files-Footnote-21146189 -Ref: Derived Files-Footnote-31146785 -Node: Future Extensions1146899 -Node: Implementation Limitations1147505 -Node: Extension Design1148753 -Node: Old Extension Problems1149907 -Ref: Old Extension Problems-Footnote-11151424 -Node: Extension New Mechanism Goals1151481 -Ref: Extension New Mechanism Goals-Footnote-11154841 -Node: Extension Other Design Decisions1155030 -Node: Extension Future Growth1157136 -Node: Old Extension Mechanism1157972 -Node: Notes summary1159734 -Node: Basic Concepts1160920 -Node: Basic High Level1161601 -Ref: figure-general-flow1161873 -Ref: figure-process-flow1162472 -Ref: Basic High Level-Footnote-11165701 -Node: Basic Data Typing1165886 -Node: Glossary1169214 -Node: Copying1194366 -Node: GNU Free Documentation License1231922 -Node: Index1257058 +Ref: Read Terminal-Footnote-177628 +Node: Long77799 +Node: Executable Scripts79175 +Ref: Executable Scripts-Footnote-181008 +Ref: Executable Scripts-Footnote-281110 +Node: Comments81657 +Node: Quoting84130 +Node: DOS Quoting89443 +Node: Sample Data Files90118 +Node: Very Simple92672 +Node: Two Rules97445 +Node: More Complex99339 +Ref: More Complex-Footnote-1102271 +Node: Statements/Lines102356 +Ref: Statements/Lines-Footnote-1106812 +Node: Other Features107077 +Node: When108005 +Node: Intro Summary110175 +Node: Invoking Gawk110941 +Node: Command Line112456 +Node: Options113247 +Ref: Options-Footnote-1129076 +Node: Other Arguments129101 +Node: Naming Standard Input131763 +Node: Environment Variables132856 +Node: AWKPATH Variable133414 +Ref: AWKPATH Variable-Footnote-1136286 +Ref: AWKPATH Variable-Footnote-2136331 +Node: AWKLIBPATH Variable136591 +Node: Other Environment Variables137350 +Node: Exit Status141007 +Node: Include Files141682 +Node: Loading Shared Libraries145260 +Node: Obsolete146644 +Node: Undocumented147341 +Node: Invoking Summary147608 +Node: Regexp149208 +Node: Regexp Usage150658 +Node: Escape Sequences152691 +Node: Regexp Operators158358 +Ref: Regexp Operators-Footnote-1165838 +Ref: Regexp Operators-Footnote-2165985 +Node: Bracket Expressions166083 +Ref: table-char-classes167973 +Node: GNU Regexp Operators170913 +Node: Case-sensitivity174636 +Ref: Case-sensitivity-Footnote-1177528 +Ref: Case-sensitivity-Footnote-2177763 +Node: Leftmost Longest177871 +Node: Computed Regexps179072 +Node: Regexp Summary182444 +Node: Reading Files183913 +Node: Records186005 +Node: awk split records186748 +Node: gawk split records191606 +Ref: gawk split records-Footnote-1196127 +Node: Fields196164 +Ref: Fields-Footnote-1199128 +Node: Nonconstant Fields199214 +Ref: Nonconstant Fields-Footnote-1201444 +Node: Changing Fields201646 +Node: Field Separators207600 +Node: Default Field Splitting210302 +Node: Regexp Field Splitting211419 +Node: Single Character Fields214760 +Node: Command Line Field Separator215819 +Node: Full Line Fields219161 +Ref: Full Line Fields-Footnote-1219669 +Node: Field Splitting Summary219715 +Ref: Field Splitting Summary-Footnote-1222814 +Node: Constant Size222915 +Node: Splitting By Content227522 +Ref: Splitting By Content-Footnote-1231272 +Node: Multiple Line231312 +Ref: Multiple Line-Footnote-1237168 +Node: Getline237347 +Node: Plain Getline239563 +Node: Getline/Variable241658 +Node: Getline/File242805 +Node: Getline/Variable/File244189 +Ref: Getline/Variable/File-Footnote-1245788 +Node: Getline/Pipe245875 +Node: Getline/Variable/Pipe248574 +Node: Getline/Coprocess249681 +Node: Getline/Variable/Coprocess250933 +Node: Getline Notes251670 +Node: Getline Summary254474 +Ref: table-getline-variants254882 +Node: Read Timeout255794 +Ref: Read Timeout-Footnote-1259621 +Node: Command-line directories259679 +Node: Input Summary260583 +Node: Input Exercises263720 +Node: Printing264453 +Node: Print266175 +Node: Print Examples267516 +Node: Output Separators270295 +Node: OFMT272311 +Node: Printf273669 +Node: Basic Printf274575 +Node: Control Letters276114 +Node: Format Modifiers280105 +Node: Printf Examples286132 +Node: Redirection288596 +Node: Special Files295568 +Node: Special FD296099 +Ref: Special FD-Footnote-1299696 +Node: Special Network299770 +Node: Special Caveats300620 +Node: Close Files And Pipes301416 +Ref: Close Files And Pipes-Footnote-1308577 +Ref: Close Files And Pipes-Footnote-2308725 +Node: Output Summary308875 +Node: Output exercises309872 +Node: Expressions310552 +Node: Values311737 +Node: Constants312413 +Node: Scalar Constants313093 +Ref: Scalar Constants-Footnote-1313952 +Node: Nondecimal-numbers314202 +Node: Regexp Constants317202 +Node: Using Constant Regexps317677 +Node: Variables320749 +Node: Using Variables321404 +Node: Assignment Options323128 +Node: Conversion325003 +Node: Strings And Numbers325527 +Ref: Strings And Numbers-Footnote-1328589 +Node: Locale influences conversions328698 +Ref: table-locale-affects331415 +Node: All Operators332003 +Node: Arithmetic Ops332633 +Node: Concatenation335138 +Ref: Concatenation-Footnote-1337957 +Node: Assignment Ops338077 +Ref: table-assign-ops343060 +Node: Increment Ops344377 +Node: Truth Values and Conditions347815 +Node: Truth Values348898 +Node: Typing and Comparison349947 +Node: Variable Typing350740 +Node: Comparison Operators354390 +Ref: table-relational-ops354800 +Node: POSIX String Comparison358350 +Ref: POSIX String Comparison-Footnote-1359434 +Node: Boolean Ops359572 +Ref: Boolean Ops-Footnote-1363642 +Node: Conditional Exp363733 +Node: Function Calls365460 +Node: Precedence369340 +Node: Locales373009 +Node: Expressions Summary374640 +Node: Patterns and Actions377181 +Node: Pattern Overview378297 +Node: Regexp Patterns379974 +Node: Expression Patterns380517 +Node: Ranges384298 +Node: BEGIN/END387404 +Node: Using BEGIN/END388166 +Ref: Using BEGIN/END-Footnote-1390902 +Node: I/O And BEGIN/END391008 +Node: BEGINFILE/ENDFILE393293 +Node: Empty396224 +Node: Using Shell Variables396541 +Node: Action Overview398824 +Node: Statements401151 +Node: If Statement402999 +Node: While Statement404497 +Node: Do Statement406541 +Node: For Statement407697 +Node: Switch Statement410849 +Node: Break Statement412952 +Node: Continue Statement415007 +Node: Next Statement416800 +Node: Nextfile Statement419190 +Node: Exit Statement421845 +Node: Built-in Variables424249 +Node: User-modified425376 +Ref: User-modified-Footnote-1433065 +Node: Auto-set433127 +Ref: Auto-set-Footnote-1445709 +Ref: Auto-set-Footnote-2445914 +Node: ARGC and ARGV445970 +Node: Pattern Action Summary449824 +Node: Arrays452047 +Node: Array Basics453596 +Node: Array Intro454422 +Ref: figure-array-elements456395 +Node: Reference to Elements458802 +Node: Assigning Elements461075 +Node: Array Example461566 +Node: Scanning an Array463298 +Node: Controlling Scanning466313 +Ref: Controlling Scanning-Footnote-1471486 +Node: Delete471802 +Ref: Delete-Footnote-1474567 +Node: Numeric Array Subscripts474624 +Node: Uninitialized Subscripts476807 +Node: Multidimensional478432 +Node: Multiscanning481525 +Node: Arrays of Arrays483114 +Node: Arrays Summary487777 +Node: Functions489882 +Node: Built-in490755 +Node: Calling Built-in491833 +Node: Numeric Functions493821 +Ref: Numeric Functions-Footnote-1497763 +Ref: Numeric Functions-Footnote-2498120 +Ref: Numeric Functions-Footnote-3498168 +Node: String Functions498437 +Ref: String Functions-Footnote-1521448 +Ref: String Functions-Footnote-2521577 +Ref: String Functions-Footnote-3521825 +Node: Gory Details521912 +Ref: table-sub-escapes523699 +Ref: table-sub-proposed525219 +Ref: table-posix-sub526583 +Ref: table-gensub-escapes528123 +Ref: Gory Details-Footnote-1529299 +Node: I/O Functions529450 +Ref: I/O Functions-Footnote-1536573 +Node: Time Functions536720 +Ref: Time Functions-Footnote-1547184 +Ref: Time Functions-Footnote-2547252 +Ref: Time Functions-Footnote-3547410 +Ref: Time Functions-Footnote-4547521 +Ref: Time Functions-Footnote-5547633 +Ref: Time Functions-Footnote-6547860 +Node: Bitwise Functions548126 +Ref: table-bitwise-ops548688 +Ref: Bitwise Functions-Footnote-1552933 +Node: Type Functions553117 +Node: I18N Functions554259 +Node: User-defined555904 +Node: Definition Syntax556708 +Ref: Definition Syntax-Footnote-1561887 +Node: Function Example561956 +Ref: Function Example-Footnote-1564520 +Node: Function Caveats564542 +Node: Calling A Function565060 +Node: Variable Scope566015 +Node: Pass By Value/Reference569003 +Node: Return Statement572513 +Node: Dynamic Typing575497 +Node: Indirect Calls576426 +Node: Functions Summary586139 +Node: Library Functions588678 +Ref: Library Functions-Footnote-1592296 +Ref: Library Functions-Footnote-2592439 +Node: Library Names592610 +Ref: Library Names-Footnote-1596083 +Ref: Library Names-Footnote-2596303 +Node: General Functions596389 +Node: Strtonum Function597417 +Node: Assert Function600197 +Node: Round Function603523 +Node: Cliff Random Function605064 +Node: Ordinal Functions606080 +Ref: Ordinal Functions-Footnote-1609157 +Ref: Ordinal Functions-Footnote-2609409 +Node: Join Function609620 +Ref: Join Function-Footnote-1611391 +Node: Getlocaltime Function611591 +Node: Readfile Function615327 +Node: Data File Management617166 +Node: Filetrans Function617798 +Node: Rewind Function621867 +Node: File Checking623425 +Ref: File Checking-Footnote-1624557 +Node: Empty Files624758 +Node: Ignoring Assigns626737 +Node: Getopt Function628291 +Ref: Getopt Function-Footnote-1639594 +Node: Passwd Functions639797 +Ref: Passwd Functions-Footnote-1648776 +Node: Group Functions648864 +Ref: Group Functions-Footnote-1656805 +Node: Walking Arrays657018 +Node: Library Functions Summary658621 +Node: Library exercises660009 +Node: Sample Programs661289 +Node: Running Examples662059 +Node: Clones662787 +Node: Cut Program664011 +Node: Egrep Program673879 +Ref: Egrep Program-Footnote-1681850 +Node: Id Program681960 +Node: Split Program685624 +Ref: Split Program-Footnote-1689162 +Node: Tee Program689290 +Node: Uniq Program692097 +Node: Wc Program699527 +Ref: Wc Program-Footnote-1703792 +Node: Miscellaneous Programs703884 +Node: Dupword Program705097 +Node: Alarm Program707128 +Node: Translate Program711942 +Ref: Translate Program-Footnote-1716333 +Ref: Translate Program-Footnote-2716603 +Node: Labels Program716737 +Ref: Labels Program-Footnote-1720108 +Node: Word Sorting720192 +Node: History Sorting724235 +Node: Extract Program726071 +Node: Simple Sed733607 +Node: Igawk Program736669 +Ref: Igawk Program-Footnote-1750980 +Ref: Igawk Program-Footnote-2751181 +Node: Anagram Program751319 +Node: Signature Program754387 +Node: Programs Summary755634 +Node: Programs Exercises756849 +Node: Advanced Features760500 +Node: Nondecimal Data762448 +Node: Array Sorting764025 +Node: Controlling Array Traversal764722 +Node: Array Sorting Functions773002 +Ref: Array Sorting Functions-Footnote-1776909 +Node: Two-way I/O777103 +Ref: Two-way I/O-Footnote-1782047 +Ref: Two-way I/O-Footnote-2782226 +Node: TCP/IP Networking782308 +Node: Profiling785153 +Node: Advanced Features Summary792695 +Node: Internationalization794559 +Node: I18N and L10N796039 +Node: Explaining gettext796725 +Ref: Explaining gettext-Footnote-1801865 +Ref: Explaining gettext-Footnote-2802049 +Node: Programmer i18n802214 +Node: Translator i18n806439 +Node: String Extraction807233 +Ref: String Extraction-Footnote-1808194 +Node: Printf Ordering808280 +Ref: Printf Ordering-Footnote-1811062 +Node: I18N Portability811126 +Ref: I18N Portability-Footnote-1813575 +Node: I18N Example813638 +Ref: I18N Example-Footnote-1816360 +Node: Gawk I18N816432 +Node: I18N Summary817070 +Node: Debugger818409 +Node: Debugging819431 +Node: Debugging Concepts819872 +Node: Debugging Terms821728 +Node: Awk Debugging824325 +Node: Sample Debugging Session825217 +Node: Debugger Invocation825737 +Node: Finding The Bug827070 +Node: List of Debugger Commands833552 +Node: Breakpoint Control834884 +Node: Debugger Execution Control838548 +Node: Viewing And Changing Data841908 +Node: Execution Stack845266 +Node: Debugger Info846779 +Node: Miscellaneous Debugger Commands850773 +Node: Readline Support855957 +Node: Limitations856849 +Node: Debugging Summary859123 +Node: Arbitrary Precision Arithmetic860287 +Node: Computer Arithmetic861774 +Ref: Computer Arithmetic-Footnote-1866161 +Node: Math Definitions866218 +Ref: table-ieee-formats869507 +Ref: Math Definitions-Footnote-1870047 +Node: MPFR features870150 +Node: FP Math Caution871792 +Ref: FP Math Caution-Footnote-1872833 +Node: Inexactness of computations873202 +Node: Inexact representation874150 +Node: Comparing FP Values875505 +Node: Errors accumulate876469 +Node: Getting Accuracy877902 +Node: Try To Round880561 +Node: Setting precision881460 +Ref: table-predefined-precision-strings882142 +Node: Setting the rounding mode883935 +Ref: table-gawk-rounding-modes884299 +Ref: Setting the rounding mode-Footnote-1887753 +Node: Arbitrary Precision Integers887932 +Ref: Arbitrary Precision Integers-Footnote-1890935 +Node: POSIX Floating Point Problems891084 +Ref: POSIX Floating Point Problems-Footnote-1894960 +Node: Floating point summary894998 +Node: Dynamic Extensions897215 +Node: Extension Intro898767 +Node: Plugin License900032 +Node: Extension Mechanism Outline900717 +Ref: figure-load-extension901141 +Ref: figure-load-new-function902626 +Ref: figure-call-new-function903628 +Node: Extension API Description905612 +Node: Extension API Functions Introduction907062 +Node: General Data Types911927 +Ref: General Data Types-Footnote-1917620 +Node: Requesting Values917919 +Ref: table-value-types-returned918656 +Node: Memory Allocation Functions919614 +Ref: Memory Allocation Functions-Footnote-1922361 +Node: Constructor Functions922457 +Node: Registration Functions924215 +Node: Extension Functions924900 +Node: Exit Callback Functions927202 +Node: Extension Version String928451 +Node: Input Parsers929101 +Node: Output Wrappers938915 +Node: Two-way processors943431 +Node: Printing Messages945635 +Ref: Printing Messages-Footnote-1946712 +Node: Updating `ERRNO'946864 +Node: Accessing Parameters947603 +Node: Symbol Table Access948833 +Node: Symbol table by name949347 +Node: Symbol table by cookie951323 +Ref: Symbol table by cookie-Footnote-1955456 +Node: Cached values955519 +Ref: Cached values-Footnote-1959023 +Node: Array Manipulation959114 +Ref: Array Manipulation-Footnote-1960212 +Node: Array Data Types960251 +Ref: Array Data Types-Footnote-1962954 +Node: Array Functions963046 +Node: Flattening Arrays966920 +Node: Creating Arrays973772 +Node: Extension API Variables978503 +Node: Extension Versioning979139 +Node: Extension API Informational Variables981040 +Node: Extension API Boilerplate982126 +Node: Finding Extensions985930 +Node: Extension Example986490 +Node: Internal File Description987220 +Node: Internal File Ops991311 +Ref: Internal File Ops-Footnote-11002743 +Node: Using Internal File Ops1002883 +Ref: Using Internal File Ops-Footnote-11005230 +Node: Extension Samples1005498 +Node: Extension Sample File Functions1007022 +Node: Extension Sample Fnmatch1014590 +Node: Extension Sample Fork1016072 +Node: Extension Sample Inplace1017285 +Node: Extension Sample Ord1018960 +Node: Extension Sample Readdir1019796 +Ref: table-readdir-file-types1020652 +Node: Extension Sample Revout1021451 +Node: Extension Sample Rev2way1022042 +Node: Extension Sample Read write array1022783 +Node: Extension Sample Readfile1024662 +Node: Extension Sample API Tests1025762 +Node: Extension Sample Time1026287 +Node: gawkextlib1027602 +Node: Extension summary1030415 +Node: Extension Exercises1034108 +Node: Language History1034830 +Node: V7/SVR3.11036473 +Node: SVR41038793 +Node: POSIX1040235 +Node: BTL1041621 +Node: POSIX/GNU1042355 +Node: Feature History1048098 +Node: Common Extensions1061228 +Node: Ranges and Locales1062540 +Ref: Ranges and Locales-Footnote-11067157 +Ref: Ranges and Locales-Footnote-21067184 +Ref: Ranges and Locales-Footnote-31067418 +Node: Contributors1067639 +Node: History summary1073064 +Node: Installation1074433 +Node: Gawk Distribution1075384 +Node: Getting1075868 +Node: Extracting1076692 +Node: Distribution contents1078334 +Node: Unix Installation1084051 +Node: Quick Installation1084668 +Node: Additional Configuration Options1087110 +Node: Configuration Philosophy1088848 +Node: Non-Unix Installation1091199 +Node: PC Installation1091657 +Node: PC Binary Installation1092968 +Node: PC Compiling1094816 +Ref: PC Compiling-Footnote-11097815 +Node: PC Testing1097920 +Node: PC Using1099096 +Node: Cygwin1103254 +Node: MSYS1104063 +Node: VMS Installation1104577 +Node: VMS Compilation1105373 +Ref: VMS Compilation-Footnote-11106595 +Node: VMS Dynamic Extensions1106653 +Node: VMS Installation Details1108026 +Node: VMS Running1110278 +Node: VMS GNV1113112 +Node: VMS Old Gawk1113835 +Node: Bugs1114305 +Node: Other Versions1118309 +Node: Installation summary1124564 +Node: Notes1125620 +Node: Compatibility Mode1126485 +Node: Additions1127267 +Node: Accessing The Source1128192 +Node: Adding Code1129628 +Node: New Ports1135806 +Node: Derived Files1140287 +Ref: Derived Files-Footnote-11145368 +Ref: Derived Files-Footnote-21145402 +Ref: Derived Files-Footnote-31145998 +Node: Future Extensions1146112 +Node: Implementation Limitations1146718 +Node: Extension Design1147966 +Node: Old Extension Problems1149120 +Ref: Old Extension Problems-Footnote-11150637 +Node: Extension New Mechanism Goals1150694 +Ref: Extension New Mechanism Goals-Footnote-11154054 +Node: Extension Other Design Decisions1154243 +Node: Extension Future Growth1156349 +Node: Old Extension Mechanism1157185 +Node: Notes summary1158947 +Node: Basic Concepts1160133 +Node: Basic High Level1160814 +Ref: figure-general-flow1161086 +Ref: figure-process-flow1161685 +Ref: Basic High Level-Footnote-11164914 +Node: Basic Data Typing1165099 +Node: Glossary1168427 +Node: Copying1193579 +Node: GNU Free Documentation License1231135 +Node: Index1256271  End Tag Table -- cgit v1.2.3 From 44f0c70e04a1beef988cde4950aabe29139e789a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sat, 16 Aug 2014 22:08:24 +0300 Subject: More reviewer comments. --- doc/gawk.info | 954 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 481 insertions(+), 473 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 8f91f3c0..501b8136 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -4817,7 +4817,8 @@ argument to `-F' is `t', then `FS' is set to the TAB character. If you type `-F\t' at the shell, without any quotes, the `\' gets deleted, so `awk' figures that you really want your fields to be separated with TABs and not `t's. Use `-v FS="t"' or `-F"[t]"' on the command line if -you really do want to separate your fields with `t's. +you really do want to separate your fields with `t's. Use `-F '\t'' +when not in compatibility mode to specify that TABs separate fields. As an example, let's use an `awk' program file called `edu.awk' that contains the pattern `/edu/' and the action `print $1': @@ -4937,8 +4938,8 @@ which usually prints: root -on an incorrect implementation of `awk', while `gawk' prints something -like: +on an incorrect implementation of `awk', while `gawk' prints the full +first line of the file, something like: root:nSijPlPhZZwgE:0:0:Root:/: @@ -5018,7 +5019,7 @@ calculated idle time: BEGIN { FIELDWIDTHS = "9 6 10 6 7 7 35" } NR > 2 { idle = $4 - sub(/^ */, "", idle) # strip leading spaces + sub(/^ +/, "", idle) # strip leading spaces if (idle == "") idle = 0 if (idle ~ /:/) { @@ -5149,8 +5150,10 @@ would be to remove the quotes when they occur, with something like this: As with `FS', the `IGNORECASE' variable (*note User-modified::) affects field splitting with `FPAT'. - Similar to `FIELDWIDTHS', the value of `PROCINFO["FS"]' will be -`"FPAT"' if content-based field splitting is being used. + Assigning a value to `FPAT' overrides field splitting with `FS' and +with `FIELDWIDTHS'. Similar to `FIELDWIDTHS', the value of +`PROCINFO["FS"]' will be `"FPAT"' if content-based field splitting is +being used. NOTE: Some programs export CSV data that contains embedded newlines between the double quotes. `gawk' provides no way to @@ -5168,6 +5171,11 @@ changed the first `+' to `*') allows fields to be empty: Finally, the `patsplit()' function makes the same functionality available for splitting regular strings (*note String Functions::). + To recap, `gawk' provides three independent methods to split input +records into fields. `gawk' uses whichever mechanism was last chosen +based on which of the three variables--`FS', `FIELDWIDTHS', and +`FPAT'--was last assigned to. + ---------- Footnotes ---------- (1) At least, we don't know of one. @@ -6755,8 +6763,8 @@ to rename the files. It then sends the list to the shell for execution.  File: gawk.info, Node: Special Files, Next: Close Files And Pipes, Prev: Redirection, Up: Printing -5.7 Special File Name in `gawk' -=============================== +5.7 Special File Names in `gawk' +================================ `gawk' provides a number of special file names that it interprets internally. These file names provide access to standard file @@ -8194,7 +8202,7 @@ operands, according to the following symmetric matrix: user input--should be treated as numeric, even though it is actually made of characters and is therefore also a string. Thus, for example, the string constant `" +3.14"', when it appears in program source code, -is a string--even though it looks numeric--and is _never_ treated as +is a string--even though it looks numeric--and is _never_ treated as a number for comparison purposes. In short, when one operand is a "pure" string, such as a string @@ -21605,7 +21613,7 @@ File: gawk.info, Node: FP Math Caution, Next: Arbitrary Precision Integers, P 15.4 Floating Point Arithmetic: Caveat Emptor! ============================================== - Math class is tough! -- Late 1980's Barbie + Math class is tough! -- Teen Talk Barbie (July, 1992) This minor node provides a high level overview of the issues involved when doing lots of floating-point arithmetic.(1) The @@ -22167,7 +22175,7 @@ File: gawk.info, Node: Floating point summary, Prev: POSIX Floating Point Prob floating-point values. The default for `awk' is to use double-precision floating-point values. - * In the 1980's, Barbie mistakenly said "Math class is tough!" + * In the early 1990's, Barbie mistakenly said "Math class is tough!" While math isn't tough, floating-point arithmetic isn't the same as pencil and paper math, and care must be taken: @@ -33379,7 +33387,7 @@ Index * Robbins, Arnold <6>: Passwd Functions. (line 90) * Robbins, Arnold <7>: Getline/Pipe. (line 39) * Robbins, Arnold: Command Line Field Separator. - (line 73) + (line 74) * Robbins, Bill: Getline/Pipe. (line 39) * Robbins, Harry: Acknowledgments. (line 92) * Robbins, Jean: Acknowledgments. (line 92) @@ -33794,7 +33802,7 @@ Index * Unix awk, close() function and: Close Files And Pipes. (line 131) * Unix awk, password files, field separators and: Command Line Field Separator. - (line 64) + (line 65) * Unix, awk scripts and: Executable Scripts. (line 6) * UNIXROOT variable, on OS/2 systems: PC Using. (line 16) * unsigned integers: Computer Arithmetic. (line 41) @@ -34020,465 +34028,465 @@ Node: Default Field Splitting210302 Node: Regexp Field Splitting211419 Node: Single Character Fields214760 Node: Command Line Field Separator215819 -Node: Full Line Fields219161 -Ref: Full Line Fields-Footnote-1219669 -Node: Field Splitting Summary219715 -Ref: Field Splitting Summary-Footnote-1222814 -Node: Constant Size222915 -Node: Splitting By Content227522 -Ref: Splitting By Content-Footnote-1231272 -Node: Multiple Line231312 -Ref: Multiple Line-Footnote-1237168 -Node: Getline237347 -Node: Plain Getline239563 -Node: Getline/Variable241658 -Node: Getline/File242805 -Node: Getline/Variable/File244189 -Ref: Getline/Variable/File-Footnote-1245788 -Node: Getline/Pipe245875 -Node: Getline/Variable/Pipe248574 -Node: Getline/Coprocess249681 -Node: Getline/Variable/Coprocess250933 -Node: Getline Notes251670 -Node: Getline Summary254474 -Ref: table-getline-variants254882 -Node: Read Timeout255794 -Ref: Read Timeout-Footnote-1259621 -Node: Command-line directories259679 -Node: Input Summary260583 -Node: Input Exercises263720 -Node: Printing264453 -Node: Print266175 -Node: Print Examples267516 -Node: Output Separators270295 -Node: OFMT272311 -Node: Printf273669 -Node: Basic Printf274575 -Node: Control Letters276114 -Node: Format Modifiers280105 -Node: Printf Examples286132 -Node: Redirection288596 -Node: Special Files295568 -Node: Special FD296099 -Ref: Special FD-Footnote-1299696 -Node: Special Network299770 -Node: Special Caveats300620 -Node: Close Files And Pipes301416 -Ref: Close Files And Pipes-Footnote-1308577 -Ref: Close Files And Pipes-Footnote-2308725 -Node: Output Summary308875 -Node: Output exercises309872 -Node: Expressions310552 -Node: Values311737 -Node: Constants312413 -Node: Scalar Constants313093 -Ref: Scalar Constants-Footnote-1313952 -Node: Nondecimal-numbers314202 -Node: Regexp Constants317202 -Node: Using Constant Regexps317677 -Node: Variables320749 -Node: Using Variables321404 -Node: Assignment Options323128 -Node: Conversion325003 -Node: Strings And Numbers325527 -Ref: Strings And Numbers-Footnote-1328589 -Node: Locale influences conversions328698 -Ref: table-locale-affects331415 -Node: All Operators332003 -Node: Arithmetic Ops332633 -Node: Concatenation335138 -Ref: Concatenation-Footnote-1337957 -Node: Assignment Ops338077 -Ref: table-assign-ops343060 -Node: Increment Ops344377 -Node: Truth Values and Conditions347815 -Node: Truth Values348898 -Node: Typing and Comparison349947 -Node: Variable Typing350740 -Node: Comparison Operators354390 -Ref: table-relational-ops354800 -Node: POSIX String Comparison358350 -Ref: POSIX String Comparison-Footnote-1359434 -Node: Boolean Ops359572 -Ref: Boolean Ops-Footnote-1363642 -Node: Conditional Exp363733 -Node: Function Calls365460 -Node: Precedence369340 -Node: Locales373009 -Node: Expressions Summary374640 -Node: Patterns and Actions377181 -Node: Pattern Overview378297 -Node: Regexp Patterns379974 -Node: Expression Patterns380517 -Node: Ranges384298 -Node: BEGIN/END387404 -Node: Using BEGIN/END388166 -Ref: Using BEGIN/END-Footnote-1390902 -Node: I/O And BEGIN/END391008 -Node: BEGINFILE/ENDFILE393293 -Node: Empty396224 -Node: Using Shell Variables396541 -Node: Action Overview398824 -Node: Statements401151 -Node: If Statement402999 -Node: While Statement404497 -Node: Do Statement406541 -Node: For Statement407697 -Node: Switch Statement410849 -Node: Break Statement412952 -Node: Continue Statement415007 -Node: Next Statement416800 -Node: Nextfile Statement419190 -Node: Exit Statement421845 -Node: Built-in Variables424249 -Node: User-modified425376 -Ref: User-modified-Footnote-1433065 -Node: Auto-set433127 -Ref: Auto-set-Footnote-1445709 -Ref: Auto-set-Footnote-2445914 -Node: ARGC and ARGV445970 -Node: Pattern Action Summary449824 -Node: Arrays452047 -Node: Array Basics453596 -Node: Array Intro454422 -Ref: figure-array-elements456395 -Node: Reference to Elements458802 -Node: Assigning Elements461075 -Node: Array Example461566 -Node: Scanning an Array463298 -Node: Controlling Scanning466313 -Ref: Controlling Scanning-Footnote-1471486 -Node: Delete471802 -Ref: Delete-Footnote-1474567 -Node: Numeric Array Subscripts474624 -Node: Uninitialized Subscripts476807 -Node: Multidimensional478432 -Node: Multiscanning481525 -Node: Arrays of Arrays483114 -Node: Arrays Summary487777 -Node: Functions489882 -Node: Built-in490755 -Node: Calling Built-in491833 -Node: Numeric Functions493821 -Ref: Numeric Functions-Footnote-1497763 -Ref: Numeric Functions-Footnote-2498120 -Ref: Numeric Functions-Footnote-3498168 -Node: String Functions498437 -Ref: String Functions-Footnote-1521448 -Ref: String Functions-Footnote-2521577 -Ref: String Functions-Footnote-3521825 -Node: Gory Details521912 -Ref: table-sub-escapes523699 -Ref: table-sub-proposed525219 -Ref: table-posix-sub526583 -Ref: table-gensub-escapes528123 -Ref: Gory Details-Footnote-1529299 -Node: I/O Functions529450 -Ref: I/O Functions-Footnote-1536573 -Node: Time Functions536720 -Ref: Time Functions-Footnote-1547184 -Ref: Time Functions-Footnote-2547252 -Ref: Time Functions-Footnote-3547410 -Ref: Time Functions-Footnote-4547521 -Ref: Time Functions-Footnote-5547633 -Ref: Time Functions-Footnote-6547860 -Node: Bitwise Functions548126 -Ref: table-bitwise-ops548688 -Ref: Bitwise Functions-Footnote-1552933 -Node: Type Functions553117 -Node: I18N Functions554259 -Node: User-defined555904 -Node: Definition Syntax556708 -Ref: Definition Syntax-Footnote-1561887 -Node: Function Example561956 -Ref: Function Example-Footnote-1564520 -Node: Function Caveats564542 -Node: Calling A Function565060 -Node: Variable Scope566015 -Node: Pass By Value/Reference569003 -Node: Return Statement572513 -Node: Dynamic Typing575497 -Node: Indirect Calls576426 -Node: Functions Summary586139 -Node: Library Functions588678 -Ref: Library Functions-Footnote-1592296 -Ref: Library Functions-Footnote-2592439 -Node: Library Names592610 -Ref: Library Names-Footnote-1596083 -Ref: Library Names-Footnote-2596303 -Node: General Functions596389 -Node: Strtonum Function597417 -Node: Assert Function600197 -Node: Round Function603523 -Node: Cliff Random Function605064 -Node: Ordinal Functions606080 -Ref: Ordinal Functions-Footnote-1609157 -Ref: Ordinal Functions-Footnote-2609409 -Node: Join Function609620 -Ref: Join Function-Footnote-1611391 -Node: Getlocaltime Function611591 -Node: Readfile Function615327 -Node: Data File Management617166 -Node: Filetrans Function617798 -Node: Rewind Function621867 -Node: File Checking623425 -Ref: File Checking-Footnote-1624557 -Node: Empty Files624758 -Node: Ignoring Assigns626737 -Node: Getopt Function628291 -Ref: Getopt Function-Footnote-1639594 -Node: Passwd Functions639797 -Ref: Passwd Functions-Footnote-1648776 -Node: Group Functions648864 -Ref: Group Functions-Footnote-1656805 -Node: Walking Arrays657018 -Node: Library Functions Summary658621 -Node: Library exercises660009 -Node: Sample Programs661289 -Node: Running Examples662059 -Node: Clones662787 -Node: Cut Program664011 -Node: Egrep Program673879 -Ref: Egrep Program-Footnote-1681850 -Node: Id Program681960 -Node: Split Program685624 -Ref: Split Program-Footnote-1689162 -Node: Tee Program689290 -Node: Uniq Program692097 -Node: Wc Program699527 -Ref: Wc Program-Footnote-1703792 -Node: Miscellaneous Programs703884 -Node: Dupword Program705097 -Node: Alarm Program707128 -Node: Translate Program711942 -Ref: Translate Program-Footnote-1716333 -Ref: Translate Program-Footnote-2716603 -Node: Labels Program716737 -Ref: Labels Program-Footnote-1720108 -Node: Word Sorting720192 -Node: History Sorting724235 -Node: Extract Program726071 -Node: Simple Sed733607 -Node: Igawk Program736669 -Ref: Igawk Program-Footnote-1750980 -Ref: Igawk Program-Footnote-2751181 -Node: Anagram Program751319 -Node: Signature Program754387 -Node: Programs Summary755634 -Node: Programs Exercises756849 -Node: Advanced Features760500 -Node: Nondecimal Data762448 -Node: Array Sorting764025 -Node: Controlling Array Traversal764722 -Node: Array Sorting Functions773002 -Ref: Array Sorting Functions-Footnote-1776909 -Node: Two-way I/O777103 -Ref: Two-way I/O-Footnote-1782047 -Ref: Two-way I/O-Footnote-2782226 -Node: TCP/IP Networking782308 -Node: Profiling785153 -Node: Advanced Features Summary792695 -Node: Internationalization794559 -Node: I18N and L10N796039 -Node: Explaining gettext796725 -Ref: Explaining gettext-Footnote-1801865 -Ref: Explaining gettext-Footnote-2802049 -Node: Programmer i18n802214 -Node: Translator i18n806439 -Node: String Extraction807233 -Ref: String Extraction-Footnote-1808194 -Node: Printf Ordering808280 -Ref: Printf Ordering-Footnote-1811062 -Node: I18N Portability811126 -Ref: I18N Portability-Footnote-1813575 -Node: I18N Example813638 -Ref: I18N Example-Footnote-1816360 -Node: Gawk I18N816432 -Node: I18N Summary817070 -Node: Debugger818409 -Node: Debugging819431 -Node: Debugging Concepts819872 -Node: Debugging Terms821728 -Node: Awk Debugging824325 -Node: Sample Debugging Session825217 -Node: Debugger Invocation825737 -Node: Finding The Bug827070 -Node: List of Debugger Commands833552 -Node: Breakpoint Control834884 -Node: Debugger Execution Control838548 -Node: Viewing And Changing Data841908 -Node: Execution Stack845266 -Node: Debugger Info846779 -Node: Miscellaneous Debugger Commands850773 -Node: Readline Support855957 -Node: Limitations856849 -Node: Debugging Summary859123 -Node: Arbitrary Precision Arithmetic860287 -Node: Computer Arithmetic861774 -Ref: Computer Arithmetic-Footnote-1866161 -Node: Math Definitions866218 -Ref: table-ieee-formats869507 -Ref: Math Definitions-Footnote-1870047 -Node: MPFR features870150 -Node: FP Math Caution871792 -Ref: FP Math Caution-Footnote-1872833 -Node: Inexactness of computations873202 -Node: Inexact representation874150 -Node: Comparing FP Values875505 -Node: Errors accumulate876469 -Node: Getting Accuracy877902 -Node: Try To Round880561 -Node: Setting precision881460 -Ref: table-predefined-precision-strings882142 -Node: Setting the rounding mode883935 -Ref: table-gawk-rounding-modes884299 -Ref: Setting the rounding mode-Footnote-1887753 -Node: Arbitrary Precision Integers887932 -Ref: Arbitrary Precision Integers-Footnote-1890935 -Node: POSIX Floating Point Problems891084 -Ref: POSIX Floating Point Problems-Footnote-1894960 -Node: Floating point summary894998 -Node: Dynamic Extensions897215 -Node: Extension Intro898767 -Node: Plugin License900032 -Node: Extension Mechanism Outline900717 -Ref: figure-load-extension901141 -Ref: figure-load-new-function902626 -Ref: figure-call-new-function903628 -Node: Extension API Description905612 -Node: Extension API Functions Introduction907062 -Node: General Data Types911927 -Ref: General Data Types-Footnote-1917620 -Node: Requesting Values917919 -Ref: table-value-types-returned918656 -Node: Memory Allocation Functions919614 -Ref: Memory Allocation Functions-Footnote-1922361 -Node: Constructor Functions922457 -Node: Registration Functions924215 -Node: Extension Functions924900 -Node: Exit Callback Functions927202 -Node: Extension Version String928451 -Node: Input Parsers929101 -Node: Output Wrappers938915 -Node: Two-way processors943431 -Node: Printing Messages945635 -Ref: Printing Messages-Footnote-1946712 -Node: Updating `ERRNO'946864 -Node: Accessing Parameters947603 -Node: Symbol Table Access948833 -Node: Symbol table by name949347 -Node: Symbol table by cookie951323 -Ref: Symbol table by cookie-Footnote-1955456 -Node: Cached values955519 -Ref: Cached values-Footnote-1959023 -Node: Array Manipulation959114 -Ref: Array Manipulation-Footnote-1960212 -Node: Array Data Types960251 -Ref: Array Data Types-Footnote-1962954 -Node: Array Functions963046 -Node: Flattening Arrays966920 -Node: Creating Arrays973772 -Node: Extension API Variables978503 -Node: Extension Versioning979139 -Node: Extension API Informational Variables981040 -Node: Extension API Boilerplate982126 -Node: Finding Extensions985930 -Node: Extension Example986490 -Node: Internal File Description987220 -Node: Internal File Ops991311 -Ref: Internal File Ops-Footnote-11002743 -Node: Using Internal File Ops1002883 -Ref: Using Internal File Ops-Footnote-11005230 -Node: Extension Samples1005498 -Node: Extension Sample File Functions1007022 -Node: Extension Sample Fnmatch1014590 -Node: Extension Sample Fork1016072 -Node: Extension Sample Inplace1017285 -Node: Extension Sample Ord1018960 -Node: Extension Sample Readdir1019796 -Ref: table-readdir-file-types1020652 -Node: Extension Sample Revout1021451 -Node: Extension Sample Rev2way1022042 -Node: Extension Sample Read write array1022783 -Node: Extension Sample Readfile1024662 -Node: Extension Sample API Tests1025762 -Node: Extension Sample Time1026287 -Node: gawkextlib1027602 -Node: Extension summary1030415 -Node: Extension Exercises1034108 -Node: Language History1034830 -Node: V7/SVR3.11036473 -Node: SVR41038793 -Node: POSIX1040235 -Node: BTL1041621 -Node: POSIX/GNU1042355 -Node: Feature History1048098 -Node: Common Extensions1061228 -Node: Ranges and Locales1062540 -Ref: Ranges and Locales-Footnote-11067157 -Ref: Ranges and Locales-Footnote-21067184 -Ref: Ranges and Locales-Footnote-31067418 -Node: Contributors1067639 -Node: History summary1073064 -Node: Installation1074433 -Node: Gawk Distribution1075384 -Node: Getting1075868 -Node: Extracting1076692 -Node: Distribution contents1078334 -Node: Unix Installation1084051 -Node: Quick Installation1084668 -Node: Additional Configuration Options1087110 -Node: Configuration Philosophy1088848 -Node: Non-Unix Installation1091199 -Node: PC Installation1091657 -Node: PC Binary Installation1092968 -Node: PC Compiling1094816 -Ref: PC Compiling-Footnote-11097815 -Node: PC Testing1097920 -Node: PC Using1099096 -Node: Cygwin1103254 -Node: MSYS1104063 -Node: VMS Installation1104577 -Node: VMS Compilation1105373 -Ref: VMS Compilation-Footnote-11106595 -Node: VMS Dynamic Extensions1106653 -Node: VMS Installation Details1108026 -Node: VMS Running1110278 -Node: VMS GNV1113112 -Node: VMS Old Gawk1113835 -Node: Bugs1114305 -Node: Other Versions1118309 -Node: Installation summary1124564 -Node: Notes1125620 -Node: Compatibility Mode1126485 -Node: Additions1127267 -Node: Accessing The Source1128192 -Node: Adding Code1129628 -Node: New Ports1135806 -Node: Derived Files1140287 -Ref: Derived Files-Footnote-11145368 -Ref: Derived Files-Footnote-21145402 -Ref: Derived Files-Footnote-31145998 -Node: Future Extensions1146112 -Node: Implementation Limitations1146718 -Node: Extension Design1147966 -Node: Old Extension Problems1149120 -Ref: Old Extension Problems-Footnote-11150637 -Node: Extension New Mechanism Goals1150694 -Ref: Extension New Mechanism Goals-Footnote-11154054 -Node: Extension Other Design Decisions1154243 -Node: Extension Future Growth1156349 -Node: Old Extension Mechanism1157185 -Node: Notes summary1158947 -Node: Basic Concepts1160133 -Node: Basic High Level1160814 -Ref: figure-general-flow1161086 -Ref: figure-process-flow1161685 -Ref: Basic High Level-Footnote-11164914 -Node: Basic Data Typing1165099 -Node: Glossary1168427 -Node: Copying1193579 -Node: GNU Free Documentation License1231135 -Node: Index1256271 +Node: Full Line Fields219245 +Ref: Full Line Fields-Footnote-1219753 +Node: Field Splitting Summary219799 +Ref: Field Splitting Summary-Footnote-1222931 +Node: Constant Size223032 +Node: Splitting By Content227638 +Ref: Splitting By Content-Footnote-1231711 +Node: Multiple Line231751 +Ref: Multiple Line-Footnote-1237607 +Node: Getline237786 +Node: Plain Getline240002 +Node: Getline/Variable242097 +Node: Getline/File243244 +Node: Getline/Variable/File244628 +Ref: Getline/Variable/File-Footnote-1246227 +Node: Getline/Pipe246314 +Node: Getline/Variable/Pipe249013 +Node: Getline/Coprocess250120 +Node: Getline/Variable/Coprocess251372 +Node: Getline Notes252109 +Node: Getline Summary254913 +Ref: table-getline-variants255321 +Node: Read Timeout256233 +Ref: Read Timeout-Footnote-1260060 +Node: Command-line directories260118 +Node: Input Summary261022 +Node: Input Exercises264159 +Node: Printing264892 +Node: Print266614 +Node: Print Examples267955 +Node: Output Separators270734 +Node: OFMT272750 +Node: Printf274108 +Node: Basic Printf275014 +Node: Control Letters276553 +Node: Format Modifiers280544 +Node: Printf Examples286571 +Node: Redirection289035 +Node: Special Files296007 +Node: Special FD296540 +Ref: Special FD-Footnote-1300137 +Node: Special Network300211 +Node: Special Caveats301061 +Node: Close Files And Pipes301857 +Ref: Close Files And Pipes-Footnote-1309018 +Ref: Close Files And Pipes-Footnote-2309166 +Node: Output Summary309316 +Node: Output exercises310313 +Node: Expressions310993 +Node: Values312178 +Node: Constants312854 +Node: Scalar Constants313534 +Ref: Scalar Constants-Footnote-1314393 +Node: Nondecimal-numbers314643 +Node: Regexp Constants317643 +Node: Using Constant Regexps318118 +Node: Variables321190 +Node: Using Variables321845 +Node: Assignment Options323569 +Node: Conversion325444 +Node: Strings And Numbers325968 +Ref: Strings And Numbers-Footnote-1329030 +Node: Locale influences conversions329139 +Ref: table-locale-affects331856 +Node: All Operators332444 +Node: Arithmetic Ops333074 +Node: Concatenation335579 +Ref: Concatenation-Footnote-1338398 +Node: Assignment Ops338518 +Ref: table-assign-ops343501 +Node: Increment Ops344818 +Node: Truth Values and Conditions348256 +Node: Truth Values349339 +Node: Typing and Comparison350388 +Node: Variable Typing351181 +Node: Comparison Operators354833 +Ref: table-relational-ops355243 +Node: POSIX String Comparison358793 +Ref: POSIX String Comparison-Footnote-1359877 +Node: Boolean Ops360015 +Ref: Boolean Ops-Footnote-1364085 +Node: Conditional Exp364176 +Node: Function Calls365903 +Node: Precedence369783 +Node: Locales373452 +Node: Expressions Summary375083 +Node: Patterns and Actions377624 +Node: Pattern Overview378740 +Node: Regexp Patterns380417 +Node: Expression Patterns380960 +Node: Ranges384741 +Node: BEGIN/END387847 +Node: Using BEGIN/END388609 +Ref: Using BEGIN/END-Footnote-1391345 +Node: I/O And BEGIN/END391451 +Node: BEGINFILE/ENDFILE393736 +Node: Empty396667 +Node: Using Shell Variables396984 +Node: Action Overview399267 +Node: Statements401594 +Node: If Statement403442 +Node: While Statement404940 +Node: Do Statement406984 +Node: For Statement408140 +Node: Switch Statement411292 +Node: Break Statement413395 +Node: Continue Statement415450 +Node: Next Statement417243 +Node: Nextfile Statement419633 +Node: Exit Statement422288 +Node: Built-in Variables424692 +Node: User-modified425819 +Ref: User-modified-Footnote-1433508 +Node: Auto-set433570 +Ref: Auto-set-Footnote-1446152 +Ref: Auto-set-Footnote-2446357 +Node: ARGC and ARGV446413 +Node: Pattern Action Summary450267 +Node: Arrays452490 +Node: Array Basics454039 +Node: Array Intro454865 +Ref: figure-array-elements456838 +Node: Reference to Elements459245 +Node: Assigning Elements461518 +Node: Array Example462009 +Node: Scanning an Array463741 +Node: Controlling Scanning466756 +Ref: Controlling Scanning-Footnote-1471929 +Node: Delete472245 +Ref: Delete-Footnote-1475010 +Node: Numeric Array Subscripts475067 +Node: Uninitialized Subscripts477250 +Node: Multidimensional478875 +Node: Multiscanning481968 +Node: Arrays of Arrays483557 +Node: Arrays Summary488220 +Node: Functions490325 +Node: Built-in491198 +Node: Calling Built-in492276 +Node: Numeric Functions494264 +Ref: Numeric Functions-Footnote-1498206 +Ref: Numeric Functions-Footnote-2498563 +Ref: Numeric Functions-Footnote-3498611 +Node: String Functions498880 +Ref: String Functions-Footnote-1521891 +Ref: String Functions-Footnote-2522020 +Ref: String Functions-Footnote-3522268 +Node: Gory Details522355 +Ref: table-sub-escapes524142 +Ref: table-sub-proposed525662 +Ref: table-posix-sub527026 +Ref: table-gensub-escapes528566 +Ref: Gory Details-Footnote-1529742 +Node: I/O Functions529893 +Ref: I/O Functions-Footnote-1537016 +Node: Time Functions537163 +Ref: Time Functions-Footnote-1547627 +Ref: Time Functions-Footnote-2547695 +Ref: Time Functions-Footnote-3547853 +Ref: Time Functions-Footnote-4547964 +Ref: Time Functions-Footnote-5548076 +Ref: Time Functions-Footnote-6548303 +Node: Bitwise Functions548569 +Ref: table-bitwise-ops549131 +Ref: Bitwise Functions-Footnote-1553376 +Node: Type Functions553560 +Node: I18N Functions554702 +Node: User-defined556347 +Node: Definition Syntax557151 +Ref: Definition Syntax-Footnote-1562330 +Node: Function Example562399 +Ref: Function Example-Footnote-1564963 +Node: Function Caveats564985 +Node: Calling A Function565503 +Node: Variable Scope566458 +Node: Pass By Value/Reference569446 +Node: Return Statement572956 +Node: Dynamic Typing575940 +Node: Indirect Calls576869 +Node: Functions Summary586582 +Node: Library Functions589121 +Ref: Library Functions-Footnote-1592739 +Ref: Library Functions-Footnote-2592882 +Node: Library Names593053 +Ref: Library Names-Footnote-1596526 +Ref: Library Names-Footnote-2596746 +Node: General Functions596832 +Node: Strtonum Function597860 +Node: Assert Function600640 +Node: Round Function603966 +Node: Cliff Random Function605507 +Node: Ordinal Functions606523 +Ref: Ordinal Functions-Footnote-1609600 +Ref: Ordinal Functions-Footnote-2609852 +Node: Join Function610063 +Ref: Join Function-Footnote-1611834 +Node: Getlocaltime Function612034 +Node: Readfile Function615770 +Node: Data File Management617609 +Node: Filetrans Function618241 +Node: Rewind Function622310 +Node: File Checking623868 +Ref: File Checking-Footnote-1625000 +Node: Empty Files625201 +Node: Ignoring Assigns627180 +Node: Getopt Function628734 +Ref: Getopt Function-Footnote-1640037 +Node: Passwd Functions640240 +Ref: Passwd Functions-Footnote-1649219 +Node: Group Functions649307 +Ref: Group Functions-Footnote-1657248 +Node: Walking Arrays657461 +Node: Library Functions Summary659064 +Node: Library exercises660452 +Node: Sample Programs661732 +Node: Running Examples662502 +Node: Clones663230 +Node: Cut Program664454 +Node: Egrep Program674322 +Ref: Egrep Program-Footnote-1682293 +Node: Id Program682403 +Node: Split Program686067 +Ref: Split Program-Footnote-1689605 +Node: Tee Program689733 +Node: Uniq Program692540 +Node: Wc Program699970 +Ref: Wc Program-Footnote-1704235 +Node: Miscellaneous Programs704327 +Node: Dupword Program705540 +Node: Alarm Program707571 +Node: Translate Program712385 +Ref: Translate Program-Footnote-1716776 +Ref: Translate Program-Footnote-2717046 +Node: Labels Program717180 +Ref: Labels Program-Footnote-1720551 +Node: Word Sorting720635 +Node: History Sorting724678 +Node: Extract Program726514 +Node: Simple Sed734050 +Node: Igawk Program737112 +Ref: Igawk Program-Footnote-1751423 +Ref: Igawk Program-Footnote-2751624 +Node: Anagram Program751762 +Node: Signature Program754830 +Node: Programs Summary756077 +Node: Programs Exercises757292 +Node: Advanced Features760943 +Node: Nondecimal Data762891 +Node: Array Sorting764468 +Node: Controlling Array Traversal765165 +Node: Array Sorting Functions773445 +Ref: Array Sorting Functions-Footnote-1777352 +Node: Two-way I/O777546 +Ref: Two-way I/O-Footnote-1782490 +Ref: Two-way I/O-Footnote-2782669 +Node: TCP/IP Networking782751 +Node: Profiling785596 +Node: Advanced Features Summary793138 +Node: Internationalization795002 +Node: I18N and L10N796482 +Node: Explaining gettext797168 +Ref: Explaining gettext-Footnote-1802308 +Ref: Explaining gettext-Footnote-2802492 +Node: Programmer i18n802657 +Node: Translator i18n806882 +Node: String Extraction807676 +Ref: String Extraction-Footnote-1808637 +Node: Printf Ordering808723 +Ref: Printf Ordering-Footnote-1811505 +Node: I18N Portability811569 +Ref: I18N Portability-Footnote-1814018 +Node: I18N Example814081 +Ref: I18N Example-Footnote-1816803 +Node: Gawk I18N816875 +Node: I18N Summary817513 +Node: Debugger818852 +Node: Debugging819874 +Node: Debugging Concepts820315 +Node: Debugging Terms822171 +Node: Awk Debugging824768 +Node: Sample Debugging Session825660 +Node: Debugger Invocation826180 +Node: Finding The Bug827513 +Node: List of Debugger Commands833995 +Node: Breakpoint Control835327 +Node: Debugger Execution Control838991 +Node: Viewing And Changing Data842351 +Node: Execution Stack845709 +Node: Debugger Info847222 +Node: Miscellaneous Debugger Commands851216 +Node: Readline Support856400 +Node: Limitations857292 +Node: Debugging Summary859566 +Node: Arbitrary Precision Arithmetic860730 +Node: Computer Arithmetic862217 +Ref: Computer Arithmetic-Footnote-1866604 +Node: Math Definitions866661 +Ref: table-ieee-formats869950 +Ref: Math Definitions-Footnote-1870490 +Node: MPFR features870593 +Node: FP Math Caution872235 +Ref: FP Math Caution-Footnote-1873287 +Node: Inexactness of computations873656 +Node: Inexact representation874604 +Node: Comparing FP Values875959 +Node: Errors accumulate876923 +Node: Getting Accuracy878356 +Node: Try To Round881015 +Node: Setting precision881914 +Ref: table-predefined-precision-strings882596 +Node: Setting the rounding mode884389 +Ref: table-gawk-rounding-modes884753 +Ref: Setting the rounding mode-Footnote-1888207 +Node: Arbitrary Precision Integers888386 +Ref: Arbitrary Precision Integers-Footnote-1891389 +Node: POSIX Floating Point Problems891538 +Ref: POSIX Floating Point Problems-Footnote-1895414 +Node: Floating point summary895452 +Node: Dynamic Extensions897675 +Node: Extension Intro899227 +Node: Plugin License900492 +Node: Extension Mechanism Outline901177 +Ref: figure-load-extension901601 +Ref: figure-load-new-function903086 +Ref: figure-call-new-function904088 +Node: Extension API Description906072 +Node: Extension API Functions Introduction907522 +Node: General Data Types912387 +Ref: General Data Types-Footnote-1918080 +Node: Requesting Values918379 +Ref: table-value-types-returned919116 +Node: Memory Allocation Functions920074 +Ref: Memory Allocation Functions-Footnote-1922821 +Node: Constructor Functions922917 +Node: Registration Functions924675 +Node: Extension Functions925360 +Node: Exit Callback Functions927662 +Node: Extension Version String928911 +Node: Input Parsers929561 +Node: Output Wrappers939375 +Node: Two-way processors943891 +Node: Printing Messages946095 +Ref: Printing Messages-Footnote-1947172 +Node: Updating `ERRNO'947324 +Node: Accessing Parameters948063 +Node: Symbol Table Access949293 +Node: Symbol table by name949807 +Node: Symbol table by cookie951783 +Ref: Symbol table by cookie-Footnote-1955916 +Node: Cached values955979 +Ref: Cached values-Footnote-1959483 +Node: Array Manipulation959574 +Ref: Array Manipulation-Footnote-1960672 +Node: Array Data Types960711 +Ref: Array Data Types-Footnote-1963414 +Node: Array Functions963506 +Node: Flattening Arrays967380 +Node: Creating Arrays974232 +Node: Extension API Variables978963 +Node: Extension Versioning979599 +Node: Extension API Informational Variables981500 +Node: Extension API Boilerplate982586 +Node: Finding Extensions986390 +Node: Extension Example986950 +Node: Internal File Description987680 +Node: Internal File Ops991771 +Ref: Internal File Ops-Footnote-11003203 +Node: Using Internal File Ops1003343 +Ref: Using Internal File Ops-Footnote-11005690 +Node: Extension Samples1005958 +Node: Extension Sample File Functions1007482 +Node: Extension Sample Fnmatch1015050 +Node: Extension Sample Fork1016532 +Node: Extension Sample Inplace1017745 +Node: Extension Sample Ord1019420 +Node: Extension Sample Readdir1020256 +Ref: table-readdir-file-types1021112 +Node: Extension Sample Revout1021911 +Node: Extension Sample Rev2way1022502 +Node: Extension Sample Read write array1023243 +Node: Extension Sample Readfile1025122 +Node: Extension Sample API Tests1026222 +Node: Extension Sample Time1026747 +Node: gawkextlib1028062 +Node: Extension summary1030875 +Node: Extension Exercises1034568 +Node: Language History1035290 +Node: V7/SVR3.11036933 +Node: SVR41039253 +Node: POSIX1040695 +Node: BTL1042081 +Node: POSIX/GNU1042815 +Node: Feature History1048558 +Node: Common Extensions1061688 +Node: Ranges and Locales1063000 +Ref: Ranges and Locales-Footnote-11067617 +Ref: Ranges and Locales-Footnote-21067644 +Ref: Ranges and Locales-Footnote-31067878 +Node: Contributors1068099 +Node: History summary1073524 +Node: Installation1074893 +Node: Gawk Distribution1075844 +Node: Getting1076328 +Node: Extracting1077152 +Node: Distribution contents1078794 +Node: Unix Installation1084511 +Node: Quick Installation1085128 +Node: Additional Configuration Options1087570 +Node: Configuration Philosophy1089308 +Node: Non-Unix Installation1091659 +Node: PC Installation1092117 +Node: PC Binary Installation1093428 +Node: PC Compiling1095276 +Ref: PC Compiling-Footnote-11098275 +Node: PC Testing1098380 +Node: PC Using1099556 +Node: Cygwin1103714 +Node: MSYS1104523 +Node: VMS Installation1105037 +Node: VMS Compilation1105833 +Ref: VMS Compilation-Footnote-11107055 +Node: VMS Dynamic Extensions1107113 +Node: VMS Installation Details1108486 +Node: VMS Running1110738 +Node: VMS GNV1113572 +Node: VMS Old Gawk1114295 +Node: Bugs1114765 +Node: Other Versions1118769 +Node: Installation summary1125024 +Node: Notes1126080 +Node: Compatibility Mode1126945 +Node: Additions1127727 +Node: Accessing The Source1128652 +Node: Adding Code1130088 +Node: New Ports1136266 +Node: Derived Files1140747 +Ref: Derived Files-Footnote-11145828 +Ref: Derived Files-Footnote-21145862 +Ref: Derived Files-Footnote-31146458 +Node: Future Extensions1146572 +Node: Implementation Limitations1147178 +Node: Extension Design1148426 +Node: Old Extension Problems1149580 +Ref: Old Extension Problems-Footnote-11151097 +Node: Extension New Mechanism Goals1151154 +Ref: Extension New Mechanism Goals-Footnote-11154514 +Node: Extension Other Design Decisions1154703 +Node: Extension Future Growth1156809 +Node: Old Extension Mechanism1157645 +Node: Notes summary1159407 +Node: Basic Concepts1160593 +Node: Basic High Level1161274 +Ref: figure-general-flow1161546 +Ref: figure-process-flow1162145 +Ref: Basic High Level-Footnote-11165374 +Node: Basic Data Typing1165559 +Node: Glossary1168887 +Node: Copying1194039 +Node: GNU Free Documentation License1231595 +Node: Index1256731  End Tag Table -- cgit v1.2.3 From e909ea8295f5556db159ec28fdc566f504f9cb9a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 20 Aug 2014 06:17:10 +0300 Subject: More fixes from reviewer comments. --- doc/gawk.info | 1394 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 705 insertions(+), 689 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 501b8136..7c97a5c9 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -769,12 +769,10 @@ Preface Several kinds of tasks occur repeatedly when working with text files. You might want to extract certain lines and discard the rest. Or you -may need to make changes wherever certain patterns appear, but leave -the rest of the file alone. Writing single-use programs for these -tasks in languages such as C, C++, or Java is time-consuming and -inconvenient. Such jobs are often easier with `awk'. The `awk' -utility interprets a special-purpose programming language that makes it -easy to handle simple data-reformatting jobs. +may need to make changes wherever certain patterns appear, but leave the +rest of the file alone. Such jobs are often easy with `awk'. The +`awk' utility interprets a special-purpose programming language that +makes it easy to handle simple data-reformatting jobs. The GNU implementation of `awk' is called `gawk'; if you invoke it with the proper options or environment variables (*note Options::), it @@ -818,12 +816,11 @@ such as input/output (I/O) redirection and pipes. different computing environments. This Info file, while describing the `awk' language in general, also describes the particular implementation of `awk' called `gawk' (which stands for "GNU `awk'"). `gawk' runs on -a broad range of Unix systems, ranging from Intel(R)-architecture -PC-based computers up through large-scale systems. `gawk' has also -been ported to Mac OS X, Microsoft Windows (all versions) and OS/2 PCs, -and OpenVMS. (Some other, obsolete systems to which `gawk' was once -ported are no longer supported and the code for those systems has been -removed.) +a broad range of Unix systems, ranging from Intel-architecture PC-based +computers up through large-scale systems. `gawk' has also been ported +to Mac OS X, Microsoft Windows (all versions) and OS/2 PCs, and OpenVMS. +(Some other, obsolete systems to which `gawk' was once ported are no +longer supported and the code for those systems has been removed.) * Menu: @@ -840,7 +837,7 @@ removed.) ---------- Footnotes ---------- - (1) The 2008 POSIX standard is accessable online at + (1) The 2008 POSIX standard is accessible online at `http://www.opengroup.org/onlinepubs/9699919799/'. (2) These commands are available on POSIX-compliant systems, as well @@ -1155,7 +1152,7 @@ released but remains in an early stage of development. Until the GNU operating system is more fully developed, you should consider using GNU/Linux, a freely distributable, Unix-like operating -system for Intel(R), Power Architecture, Sun SPARC, IBM S/390, and other +system for Intel, Power Architecture, Sun SPARC, IBM S/390, and other systems.(2) Many GNU/Linux distributions are available for download from the Internet. @@ -2249,14 +2246,13 @@ those that it has are much larger than they used to be. If you find yourself writing `awk' scripts of more than, say, a few hundred lines, you might consider using a different programming language. The shell is good at string and pattern matching; in -addition, it allows powerful use of the system utilities. More -conventional languages, such as C, C++, and Java, offer better -facilities for system programming and for managing the complexity of -large programs. Python offers a nice balance between high-level ease -of programming and access to system facilities. Programs in these -languages may require more lines of source code than the equivalent -`awk' programs, but they are easier to maintain and usually run more -efficiently. +addition, it allows powerful use of the system utilities. Python +offers a nice balance between high-level ease of programming and access +to system facilities.(1) + + ---------- Footnotes ---------- + + (1) Other popular scripting languages include Ruby and Perl.  File: gawk.info, Node: Intro Summary, Prev: When, Up: Getting Started @@ -2475,9 +2471,9 @@ The following list describes options mandated by the POSIX standard: This option is particularly necessary for World Wide Web CGI applications that pass arguments through the URL; using this option prevents a malicious (or other) user from passing in - options, assignments, or `awk' source code (via `--source') to the - CGI application. This option should be used with `#!' scripts - (*note Executable Scripts::), like so: + options, assignments, or `awk' source code (via `-e') to the CGI + application. This option should be used with `#!' scripts (*note + Executable Scripts::), like so: #! /usr/local/bin/gawk -E @@ -2667,16 +2663,14 @@ standard input but then you will not be able to also use the standard input as a source of data.) Because it is clumsy using the standard `awk' mechanisms to mix -source file and command-line `awk' programs, `gawk' provides the -`--source' option. This does not require you to pre-empt the standard -input for your source code; it allows you to easily mix command-line -and library source code (*note AWKPATH Variable::). As with `-f', the -`--source' and `--include' options may also be used multiple times on -the command line. +source file and command-line `awk' programs, `gawk' provides the `-e' +option. This does not require you to pre-empt the standard input for +your source code; it allows you to easily mix command-line and library +source code (*note AWKPATH Variable::). As with `-f', the `-e' and `-i' +options may also be used multiple times on the command line. - If no `-f' or `--source' option is specified, then `gawk' uses the -first non-option command-line argument as the text of the program -source code. + If no `-f' or `-e' option is specified, then `gawk' uses the first +non-option command-line argument as the text of the program source code. If the environment variable `POSIXLY_CORRECT' exists, then `gawk' behaves in strict POSIX mode, exactly as if you had supplied `--posix'. @@ -2831,7 +2825,7 @@ in a standard directory in the default path and then specified on the command line with a short file name. Otherwise, the full file name would have to be typed for each file. - By using the `-i' option, or the `--source' and `-f' options, your + By using the `-i' option, or the `-e' and `-f' options, your command-line `awk' programs can use facilities in `awk' library files (*note Library Functions::). Path searching is not done if `gawk' is in compatibility mode. This is true for both `--traditional' and @@ -3355,6 +3349,10 @@ apply to both string constants and regexp constants: more than two hexadecimal digits produces undefined results. (The `\x' escape sequence is not allowed in POSIX `awk'.) + CAUTION: The next major relase of `gawk' will change, such + that a maximum of two hexadecimal digits following the `\x' + will be used. + `\/' A literal slash (necessary for regexp constants only). This sequence is used when you want to write a regexp constant that @@ -9618,29 +9616,36 @@ match to a given case is made, the case statement bodies execute until a `break', `continue', `next', `nextfile' or `exit' is encountered, or the end of the `switch' statement itself. For example: - switch (NR * 2 + 1) { - case 3: - case "11": - print NR - 1 - break - - case /2[[:digit:]]+/: - print NR - - default: - print NR + 1 - - case -1: - print NR * -1 + while ((c = getopt(ARGC, ARGV, "aksx")) != -1) { + switch (c) { + case "a": + # report size of all files + all_files = TRUE; + break + case "k": + BLOCK_SIZE = 1024 # 1K block size + break + case "s": + # do sums only + sum_only = TRUE + break + case "x": + # don't cross filesystems + fts_flags = or(fts_flags, FTS_XDEV) + break + case "?": + default: + usage() + break + } } Note that if none of the statements specified above halt execution of a matched `case' statement, execution falls through to the next -`case' until execution halts. In the above example, for any case value -starting with `2' followed by one or more digits, the `print' statement -is executed and then falls through into the `default' section, -executing its `print' statement. In turn, the -1 case will also be -executed since the `default' does not halt execution. +`case' until execution halts. In the above example, the `case' for +`"?"' falls through to the `default' case, which is to call a function +named `usage()'. (The `getopt()' function being called here is +described in *note Getopt Function::.)  File: gawk.info, Node: Break Statement, Next: Continue Statement, Prev: Switch Statement, Up: Statements @@ -9741,7 +9746,8 @@ the previous example with the following `while' loop: print "" } -This program loops forever once `x' reaches 5. +This program loops forever once `x' reaches 5, since the increment +(`x++') is never reached. The `continue' statement has no special meaning with respect to the `switch' statement, nor does it have any meaning when used outside the @@ -10497,8 +10503,16 @@ elements from `ARGV' (*note Delete::). All of these actions are typically done in the `BEGIN' rule, before actual processing of the input begins. *Note Split Program::, and see *note Tee Program::, for examples of each way of removing elements from -`ARGV'. The following fragment processes `ARGV' in order to examine, -and then remove, command-line options: +`ARGV'. + + To actually get options into an `awk' program, end the `awk' options +with `--' and then supply the `awk' program's options, in the following +manner: + + awk -f myprog.awk -- -v -q file1 file2 ... + + The following fragment processes `ARGV' in order to examine, and +then remove, the above command-line options: BEGIN { for (i = 1; i < ARGC; i++) { @@ -10516,19 +10530,14 @@ and then remove, command-line options: } } - To actually get the options into the `awk' program, end the `awk' -options with `--' and then supply the `awk' program's options, in the -following manner: - - awk -f myprog -- -v -q file1 file2 ... - - This is not necessary in `gawk'. Unless `--posix' has been -specified, `gawk' silently puts any unrecognized options into `ARGV' -for the `awk' program to deal with. As soon as it sees an unknown -option, `gawk' stops looking for other options that it might otherwise -recognize. The previous example with `gawk' would be: + Ending the `awk' options with `--' isn't necessary in `gawk'. Unless +`--posix' has been specified, `gawk' silently puts any unrecognized +options into `ARGV' for the `awk' program to deal with. As soon as it +sees an unknown option, `gawk' stops looking for other options that it +might otherwise recognize. The previous command line with `gawk' would +be: - gawk -f myprog -q -v file1 file2 ... + gawk -f myprog.awk -q -v file1 file2 ... Because `-q' is not a valid `gawk' option, it and the following `-v' are passed on to the `awk' program. (*Note Getopt Function::, for an @@ -10775,8 +10784,9 @@ been assigned any value as well as elements that have been deleted # Check if "foo" exists in a: Incorrect! if (a["foo"] != "") ... - This is incorrect, since this will _create_ `a["foo"]' if it - didn't exist before! + This is incorrect for two reasons. First, it _creates_ `a["foo"]' + if it didn't exist before! Second, it is valid (if a bit unusual) + to set an array element equal to the empty string. To determine whether an element exists in an array at a certain index, use the following expression: @@ -11329,10 +11339,11 @@ multidimensional array, use the same operator (`in') that is used for single dimensional arrays. Write the whole sequence of indices in parentheses, separated by commas, as the left operand: - (SUBSCRIPT1, SUBSCRIPT2, ...) in ARRAY + if ((SUBSCRIPT1, SUBSCRIPT2, ...) in ARRAY) + ... - The following example treats its input as a two-dimensional array of -fields; it rotates this array 90 degrees clockwise and prints the + Here is an example that treats its input as a two-dimensional array +of fields; it rotates this array 90 degrees clockwise and prints the result. It assumes that all lines have the same number of elements: { @@ -11771,6 +11782,9 @@ brackets ([ ]): easy to keep track of the seeds in case you need to consistently reproduce sequences of random numbers. + POSIX does not specify the initial seed; it differs among `awk' + implementations. + ---------- Footnotes ---------- (1) The C version of `rand()' on many Unix systems is known to @@ -13352,7 +13366,8 @@ this program, using our function to format the results, prints: 5.6 21.2 - This function deletes all the elements in an array: + This function deletes all the elements in an array (recall that the +extra whitespace signifies the start of the local variable list): function delarray(a, i) { @@ -13386,7 +13401,7 @@ empty. way: $ echo "Don't Panic!" | - > gawk --source '{ print rev($0) }' -f rev.awk + > gawk -e '{ print rev($0) }' -f rev.awk -| !cinaP t'noD The C `ctime()' function takes a timestamp and returns it in a @@ -14150,7 +14165,7 @@ P.J. Plauger wrote: In fact, they felt this idea was so important that they placed this statement on the cover of their book. Because we believe strongly that their statement is correct, this major node and *note Sample -Programs::, provide a good-sized body of code for you to read, and we +Programs::, provide a good-sized body of code for you to read and, we hope, to learn from. This major node presents a library of useful `awk' functions. Many @@ -18187,8 +18202,8 @@ language.(1) It works as follows: 2. For any arguments that do represent `awk' text, put the arguments into a shell variable that will be expanded. There are two cases: - a. Literal text, provided with `--source' or `--source='. This - text is just appended directly. + a. Literal text, provided with `-e' or `--source'. This text is + just appended directly. b. Source file names, provided with `-f'. We use a neat trick and append `@include FILENAME' to the shell variable's @@ -21329,8 +21344,8 @@ File: gawk.info, Node: Debugging Summary, Prev: Limitations, Up: Debugger * Debuggers let you step through your program one statement at a time, examine and change variable and array values, and do a - number of other things that let understand what your program is - actually doing (as opposed to what it is supposed to do). + number of other things that let you understand what your program + is actually doing (as opposed to what it is supposed to do). * Like most debuggers, the `gawk' debugger works in terms of stack frames, and lets you set both breakpoints (stop at a point in the @@ -21597,10 +21612,9 @@ Auto-set::). The MPFR library provides precise control over precisions and rounding modes, and gives correctly rounded, reproducible, -platform-independent results. With either of the command-line options -`--bignum' or `-M', all floating-point arithmetic operators and numeric -functions can yield results to any desired precision level supported by -MPFR. +platform-independent results. With the `-M' command-line option, all +floating-point arithmetic operators and numeric functions can yield +results to any desired precision level supported by MPFR. Two built-in variables, `PREC' and `ROUNDMODE', provide control over the working precision and the rounding mode. The precision and the @@ -21613,7 +21627,7 @@ File: gawk.info, Node: FP Math Caution, Next: Arbitrary Precision Integers, P 15.4 Floating Point Arithmetic: Caveat Emptor! ============================================== - Math class is tough! -- Teen Talk Barbie (July, 1992) + Math class is tough! -- Teen Talk Barbie, July 1992 This minor node provides a high level overview of the issues involved when doing lots of floating-point arithmetic.(1) The @@ -22007,13 +22021,13 @@ File: gawk.info, Node: Arbitrary Precision Integers, Next: POSIX Floating Poin 15.5 Arbitrary Precision Integer Arithmetic with `gawk' ======================================================= -When given one of the options `--bignum' or `-M', `gawk' performs all -integer arithmetic using GMP arbitrary precision integers. Any number -that looks like an integer in a source or data file is stored as an -arbitrary precision integer. The size of the integer is limited only -by the available memory. For example, the following computes 5^4^3^2, -the result of which is beyond the limits of ordinary hardware -double-precision floating point values: +When given the `-M' option, `gawk' performs all integer arithmetic +using GMP arbitrary precision integers. Any number that looks like an +integer in a source or data file is stored as an arbitrary precision +integer. The size of the integer is limited only by the available +memory. For example, the following computes 5^4^3^2, the result of +which is beyond the limits of ordinary hardware double-precision +floating point values: $ gawk -M 'BEGIN { > x = 5^4^3^2 @@ -22193,13 +22207,13 @@ File: gawk.info, Node: Floating point summary, Prev: POSIX Floating Point Prob * Often, increasing the accuracy and then rounding to the desired number of digits produces reasonable results. - * Use either `-M' or `--bignum' to enable MPFR arithmetic. Use - `PREC' to set the precision in bits, and `ROUNDMODE' to set the - IEEE 754 rounding mode. + * Use `-M' (or `--bignum') to enable MPFR arithmetic. Use `PREC' to + set the precision in bits, and `ROUNDMODE' to set the IEEE 754 + rounding mode. - * With `-M' or `--bignum', `gawk' performs arbitrary precision - integer arithmetic using the GMP library. This is faster and more - space efficient than using MPFR for the same calculations. + * With `-M', `gawk' performs arbitrary precision integer arithmetic + using the GMP library. This is faster and more space efficient + than using MPFR for the same calculations. * There are several "dark corners" with respect to floating-point numbers where `gawk' disagrees with the POSIX standard. It pays @@ -22519,7 +22533,7 @@ operations: place `-Dinline=''' on your command line, or use the GNU Autotools and include a `config.h' file in your extensions. - * All pointers filled in by `gawk' are to memory managed by `gawk' + * All pointers filled in by `gawk' point to memory managed by `gawk' and should be treated by the extension as read-only. Memory for _all_ strings passed into `gawk' from the extension _must_ come from calling the API-provided function pointers `api_malloc()', @@ -22929,7 +22943,7 @@ File: gawk.info, Node: Exit Callback Functions, Next: Extension Version String An "exit callback" function is a function that `gawk' calls before it exits. Such functions are useful if you have general "cleanup" tasks -that should be performed in your extension (such as closing data base +that should be performed in your extension (such as closing database connections or other resource deallocations). You can register such a function with `gawk' using the following function. @@ -26056,7 +26070,7 @@ the current version of `gawk'. `-r', `-S', `-t', and `-V' short options. Also, the ability to use GNU-style long-named options that start with `--' and the `--assign', `--bignum', `--characters-as-bytes', - `--copyright', `--debug', `--dump-variables', `--execle', + `--copyright', `--debug', `--dump-variables', `--exec', `--field-separator', `--file', `--gen-pot', `--help', `--include', `--lint', `--lint-old', `--load', `--non-decimal-data', `--optimize', `--posix', @@ -27502,7 +27516,7 @@ These give the same result as the `-W BINMODE=2' option in `mawk'. The following changes the record separator to `"\r\n"' and sets binary mode on reads, but does not affect the mode on standard input: - gawk -v RS="\r\n" --source "BEGIN { BINMODE = 1 }" ... + gawk -v RS="\r\n" -e "BEGIN { BINMODE = 1 }" ... or: @@ -28841,7 +28855,7 @@ C.7 Summary `--parsedebug' option is available if `gawk' is compiled with `-DDEBUG'. - * The source code for `gawk' is maintained in a publicly accessable + * The source code for `gawk' is maintained in a publicly accessible Git repository. Anyone may check it out and view the source. * Contributions to `gawk' are welcome. Following the steps outlined @@ -31010,6 +31024,7 @@ Index * -c option: Options. (line 81) * -D option: Options. (line 108) * -d option: Options. (line 93) +* -e option: Options. (line 335) * -E option: Options. (line 125) * -e option: Options. (line 117) * -f option: Options. (line 25) @@ -31093,10 +31108,10 @@ Index * [] (square brackets), regexp operator: Regexp Operators. (line 56) * \ (backslash): Comments. (line 50) * \ (backslash) in shell commands: Read Terminal. (line 25) -* \ (backslash), \" escape sequence: Escape Sequences. (line 76) +* \ (backslash), \" escape sequence: Escape Sequences. (line 80) * \ (backslash), \' operator (gawk): GNU Regexp Operators. (line 56) -* \ (backslash), \/ escape sequence: Escape Sequences. (line 69) +* \ (backslash), \/ escape sequence: Escape Sequences. (line 73) * \ (backslash), \< operator (gawk): GNU Regexp Operators. (line 30) * \ (backslash), \> operator (gawk): GNU Regexp Operators. @@ -31137,7 +31152,7 @@ Index * \ (backslash), in bracket expressions: Bracket Expressions. (line 17) * \ (backslash), in escape sequences: Escape Sequences. (line 6) * \ (backslash), in escape sequences, POSIX and: Escape Sequences. - (line 112) + (line 116) * \ (backslash), in regexp constants: Computed Regexps. (line 29) * \ (backslash), in shell commands: Quoting. (line 48) * \ (backslash), regexp operator: Regexp Operators. (line 18) @@ -31330,7 +31345,7 @@ Index (line 6) * awk, function of: Getting Started. (line 6) * awk, gawk and <1>: This Manual. (line 14) -* awk, gawk and: Preface. (line 23) +* awk, gawk and: Preface. (line 21) * awk, history of: History. (line 17) * awk, implementation issues, pipes: Redirection. (line 135) * awk, implementations: Other Versions. (line 6) @@ -31338,15 +31353,15 @@ Index * awk, invoking: Command Line. (line 6) * awk, new vs. old: Names. (line 6) * awk, new vs. old, OFMT variable: Strings And Numbers. (line 57) -* awk, POSIX and: Preface. (line 23) -* awk, POSIX and, See Also POSIX awk: Preface. (line 23) +* awk, POSIX and: Preface. (line 21) +* awk, POSIX and, See Also POSIX awk: Preface. (line 21) * awk, regexp constants and: Comparison Operators. (line 102) -* awk, See Also gawk: Preface. (line 36) +* awk, See Also gawk: Preface. (line 34) * awk, terms describing: This Manual. (line 6) * awk, uses for <1>: When. (line 6) * awk, uses for <2>: Getting Started. (line 12) -* awk, uses for: Preface. (line 23) +* awk, uses for: Preface. (line 21) * awk, versions of <1>: V7/SVR3.1. (line 6) * awk, versions of: Names. (line 10) * awk, versions of, changes between SVR3.1 and SVR4: SVR4. (line 6) @@ -31366,10 +31381,10 @@ Index * b debugger command (alias for break): Breakpoint Control. (line 11) * backslash (\): Comments. (line 50) * backslash (\) in shell commands: Read Terminal. (line 25) -* backslash (\), \" escape sequence: Escape Sequences. (line 76) +* backslash (\), \" escape sequence: Escape Sequences. (line 80) * backslash (\), \' operator (gawk): GNU Regexp Operators. (line 56) -* backslash (\), \/ escape sequence: Escape Sequences. (line 69) +* backslash (\), \/ escape sequence: Escape Sequences. (line 73) * backslash (\), \< operator (gawk): GNU Regexp Operators. (line 30) * backslash (\), \> operator (gawk): GNU Regexp Operators. @@ -31410,7 +31425,7 @@ Index * backslash (\), in bracket expressions: Bracket Expressions. (line 17) * backslash (\), in escape sequences: Escape Sequences. (line 6) * backslash (\), in escape sequences, POSIX and: Escape Sequences. - (line 112) + (line 116) * backslash (\), in regexp constants: Computed Regexps. (line 29) * backslash (\), in shell commands: Quoting. (line 48) * backslash (\), regexp operator: Regexp Operators. (line 18) @@ -31505,7 +31520,7 @@ Index * Brian Kernighan's awk <3>: String Functions. (line 490) * Brian Kernighan's awk <4>: Delete. (line 48) * Brian Kernighan's awk <5>: Nextfile Statement. (line 47) -* Brian Kernighan's awk <6>: Continue Statement. (line 43) +* Brian Kernighan's awk <6>: Continue Statement. (line 44) * Brian Kernighan's awk <7>: Break Statement. (line 51) * Brian Kernighan's awk <8>: I/O And BEGIN/END. (line 16) * Brian Kernighan's awk <9>: Concatenation. (line 36) @@ -31514,9 +31529,9 @@ Index (line 67) * Brian Kernighan's awk <12>: GNU Regexp Operators. (line 83) -* Brian Kernighan's awk <13>: Escape Sequences. (line 116) +* Brian Kernighan's awk <13>: Escape Sequences. (line 120) * Brian Kernighan's awk <14>: When. (line 21) -* Brian Kernighan's awk: Preface. (line 15) +* Brian Kernighan's awk: Preface. (line 13) * Brian Kernighan's awk, extensions: BTL. (line 6) * Brian Kernighan's awk, source code: Other Versions. (line 13) * Brini, Davide: Signature Program. (line 6) @@ -31712,9 +31727,9 @@ Index * cosine: Numeric Functions. (line 15) * counting: Wc Program. (line 6) * csh utility: Statements/Lines. (line 44) -* csh utility, POSIXLY_CORRECT environment variable: Options. (line 355) +* csh utility, POSIXLY_CORRECT environment variable: Options. (line 353) * csh utility, |& operator, comparison with: Two-way I/O. (line 25) -* ctime() user-defined function: Function Example. (line 73) +* ctime() user-defined function: Function Example. (line 74) * currency symbols, localization: Explaining gettext. (line 104) * current system time: Time Functions. (line 66) * custom.h file: Configuration Philosophy. @@ -31739,11 +31754,11 @@ Index * dark corner, close() function: Close Files And Pipes. (line 131) * dark corner, command-line arguments: Assignment Options. (line 43) -* dark corner, continue statement: Continue Statement. (line 43) +* dark corner, continue statement: Continue Statement. (line 44) * dark corner, CONVFMT variable: Strings And Numbers. (line 40) * dark corner, escape sequences: Other Arguments. (line 31) * dark corner, escape sequences, for metacharacters: Escape Sequences. - (line 134) + (line 138) * dark corner, exit statement: Exit Statement. (line 30) * dark corner, field separators: Field Splitting Summary. (line 46) @@ -31914,7 +31929,7 @@ Index * describe call stack frame, in debugger: Debugger Info. (line 27) * differences between gawk and awk: String Functions. (line 197) * differences in awk and gawk, ARGC/ARGV variables: ARGC and ARGV. - (line 88) + (line 90) * differences in awk and gawk, ARGIND variable: Auto-set. (line 44) * differences in awk and gawk, array elements, deleting: Delete. (line 39) @@ -32389,7 +32404,7 @@ Index * gawk version: Auto-set. (line 199) * gawk, ARGIND variable in: Other Arguments. (line 12) * gawk, awk and <1>: This Manual. (line 14) -* gawk, awk and: Preface. (line 23) +* gawk, awk and: Preface. (line 21) * gawk, bitwise operations in: Bitwise Functions. (line 39) * gawk, break statement in: Break Statement. (line 51) * gawk, built-in variables and: Built-in Variables. (line 14) @@ -32403,7 +32418,7 @@ Index (line 6) * gawk, configuring, options: Additional Configuration Options. (line 6) -* gawk, continue statement in: Continue Statement. (line 43) +* gawk, continue statement in: Continue Statement. (line 44) * gawk, distribution: Distribution contents. (line 6) * gawk, ERRNO variable in <1>: TCP/IP Networking. (line 54) @@ -32412,7 +32427,7 @@ Index * gawk, ERRNO variable in <4>: Close Files And Pipes. (line 139) * gawk, ERRNO variable in: Getline. (line 19) -* gawk, escape sequences: Escape Sequences. (line 124) +* gawk, escape sequences: Escape Sequences. (line 128) * gawk, extensions, disabling: Options. (line 254) * gawk, features, adding: Adding Code. (line 6) * gawk, features, advanced: Advanced Features. (line 6) @@ -32466,14 +32481,14 @@ Index * gawk, RT variable in <1>: Auto-set. (line 257) * gawk, RT variable in <2>: Multiple Line. (line 129) * gawk, RT variable in: awk split records. (line 124) -* gawk, See Also awk: Preface. (line 36) +* gawk, See Also awk: Preface. (line 34) * gawk, source code, obtaining: Getting. (line 6) * gawk, splitting fields and: Constant Size. (line 88) * gawk, string-translation functions: I18N Functions. (line 6) * gawk, SYMTAB array in: Auto-set. (line 261) * gawk, TEXTDOMAIN variable in: User-modified. (line 152) * gawk, timestamps: Time Functions. (line 6) -* gawk, uses for: Preface. (line 36) +* gawk, uses for: Preface. (line 34) * gawk, versions of, information about, printing: Options. (line 300) * gawk, VMS version of: VMS Installation. (line 6) * gawk, word-boundary operator: GNU Regexp Operators. @@ -32535,7 +32550,7 @@ Index * git utility: gawkextlib. (line 29) * Git, use of for gawk source code: Derived Files. (line 6) * GNITS mailing list: Acknowledgments. (line 52) -* GNU awk, See gawk: Preface. (line 53) +* GNU awk, See gawk: Preface. (line 51) * GNU Free Documentation License: GNU Free Documentation License. (line 7) * GNU General Public License: Glossary. (line 305) @@ -32617,7 +32632,7 @@ Index (line 43) * in operator, order of array access: Scanning an Array. (line 48) * in operator, testing if array element exists: Reference to Elements. - (line 37) + (line 38) * in operator, use in loops: Scanning an Array. (line 17) * increment operators: Increment Ops. (line 6) * index: String Functions. (line 155) @@ -32785,7 +32800,7 @@ Index * lint checking, empty programs: Command Line. (line 16) * lint checking, issuing warnings: Options. (line 185) * lint checking, POSIXLY_CORRECT environment variable: Options. - (line 340) + (line 338) * lint checking, undefined functions: Pass By Value/Reference. (line 88) * LINT variable: User-modified. (line 88) @@ -32846,7 +32861,7 @@ Index * mawk utility <2>: Nextfile Statement. (line 47) * mawk utility <3>: Concatenation. (line 36) * mawk utility <4>: Getline/Pipe. (line 62) -* mawk utility: Escape Sequences. (line 124) +* mawk utility: Escape Sequences. (line 128) * maximum precision supported by MPFR library: Auto-set. (line 213) * McIlroy, Doug: Glossary. (line 149) * McPhee, Patrick: Contributors. (line 100) @@ -32859,7 +32874,7 @@ Index (line 54) * messages from extensions: Printing Messages. (line 6) * metacharacters in regular expressions: Regexp Operators. (line 6) -* metacharacters, escape sequences for: Escape Sequences. (line 130) +* metacharacters, escape sequences for: Escape Sequences. (line 134) * minimum precision supported by MPFR library: Auto-set. (line 216) * mktime: Time Functions. (line 25) * modifiers, in format specifiers: Format Modifiers. (line 6) @@ -33080,14 +33095,14 @@ Index * plus sign (+), += operator: Assignment Ops. (line 82) * plus sign (+), regexp operator: Regexp Operators. (line 103) * pointers to functions: Indirect Calls. (line 6) -* portability: Escape Sequences. (line 94) +* portability: Escape Sequences. (line 98) * portability, #! (executable scripts): Executable Scripts. (line 33) * portability, ** operator and: Arithmetic Ops. (line 81) * portability, **= operator and: Assignment Ops. (line 143) * portability, ARGV variable: Executable Scripts. (line 42) * portability, backslash continuation and: Statements/Lines. (line 30) * portability, backslash in escape sequences: Escape Sequences. - (line 112) + (line 116) * portability, close() function and: Close Files And Pipes. (line 81) * portability, data files as single record: gawk split records. @@ -33105,7 +33120,7 @@ Index * portability, NF variable, decrementing: Changing Fields. (line 115) * portability, operators: Increment Ops. (line 60) * portability, operators, not in POSIX awk: Precedence. (line 98) -* portability, POSIXLY_CORRECT environment variable: Options. (line 360) +* portability, POSIXLY_CORRECT environment variable: Options. (line 358) * portability, substr() function: String Functions. (line 510) * portable object files <1>: Translator i18n. (line 6) * portable object files: Explaining gettext. (line 37) @@ -33126,14 +33141,14 @@ Index * POSIX awk, < operator and: Getline/File. (line 26) * POSIX awk, arithmetic operators and: Arithmetic Ops. (line 30) * POSIX awk, backslashes in string constants: Escape Sequences. - (line 112) + (line 116) * POSIX awk, BEGIN/END patterns: I/O And BEGIN/END. (line 16) * POSIX awk, bracket expressions and: Bracket Expressions. (line 24) * POSIX awk, bracket expressions and, character classes: Bracket Expressions. (line 30) * POSIX awk, break statement and: Break Statement. (line 51) * POSIX awk, changes in awk versions: POSIX. (line 6) -* POSIX awk, continue statement and: Continue Statement. (line 43) +* POSIX awk, continue statement and: Continue Statement. (line 44) * POSIX awk, CONVFMT variable and: User-modified. (line 30) * POSIX awk, date utility and: Time Functions. (line 254) * POSIX awk, field separators and <1>: Field Splitting Summary. @@ -33155,10 +33170,10 @@ Index * POSIX awk, timestamps and: Time Functions. (line 6) * POSIX awk, | I/O operator and: Getline/Pipe. (line 55) * POSIX mode: Options. (line 254) -* POSIX, awk and: Preface. (line 23) +* POSIX, awk and: Preface. (line 21) * POSIX, gawk extensions not included in: POSIX/GNU. (line 6) * POSIX, programs, implementing in awk: Clones. (line 6) -* POSIXLY_CORRECT environment variable: Options. (line 340) +* POSIXLY_CORRECT environment variable: Options. (line 338) * PREC variable: User-modified. (line 124) * precedence <1>: Precedence. (line 6) * precedence: Increment Ops. (line 60) @@ -33359,7 +33374,7 @@ Index * return statement, user-defined functions: Return Statement. (line 6) * return value, close() function: Close Files And Pipes. (line 131) -* rev() user-defined function: Function Example. (line 53) +* rev() user-defined function: Function Example. (line 54) * revoutput extension: Extension Sample Revout. (line 11) * revtwoway extension: Extension Sample Rev2way. @@ -33494,7 +33509,7 @@ Index * side effects <1>: Increment Ops. (line 11) * side effects: Concatenation. (line 41) * side effects, array indexing: Reference to Elements. - (line 42) + (line 43) * side effects, asort() function: Array Sorting Functions. (line 24) * side effects, assignment expressions: Assignment Ops. (line 23) @@ -33507,14 +33522,14 @@ Index * sidebar, A Constant's Base Does Not Affect Its Value: Nondecimal-numbers. (line 64) * sidebar, Backslash Before Regular Characters: Escape Sequences. - (line 110) + (line 114) * sidebar, Changing FS Does Not Affect the Fields: Field Splitting Summary. (line 38) * sidebar, Changing NR and FNR: Auto-set. (line 299) * sidebar, Controlling Output Buffering with system(): I/O Functions. (line 138) * sidebar, Escape Sequences for Metacharacters: Escape Sequences. - (line 128) + (line 132) * sidebar, FS and IGNORECASE: Field Splitting Summary. (line 64) * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions. @@ -33742,7 +33757,7 @@ Index (line 37) * troubleshooting, awk uses FS not IFS: Field Separators. (line 30) * troubleshooting, backslash before nonspecial character: Escape Sequences. - (line 112) + (line 116) * troubleshooting, division: Arithmetic Ops. (line 44) * troubleshooting, fatal errors, field widths, specifying: Constant Size. (line 23) @@ -33798,7 +33813,7 @@ Index * uniq.awk program: Uniq Program. (line 65) * Unix: Glossary. (line 611) * Unix awk, backslashes in escape sequences: Escape Sequences. - (line 124) + (line 128) * Unix awk, close() function and: Close Files And Pipes. (line 131) * Unix awk, password files, field separators and: Command Line Field Separator. @@ -33945,548 +33960,549 @@ Tag Table: Node: Top1204 Node: Foreword41858 Node: Preface46203 -Ref: Preface-Footnote-149350 -Ref: Preface-Footnote-249457 -Node: History49689 -Node: Names52063 -Ref: Names-Footnote-153527 -Node: This Manual53600 -Ref: This Manual-Footnote-159379 -Node: Conventions59479 -Node: Manual History61635 -Ref: Manual History-Footnote-164714 -Ref: Manual History-Footnote-264755 -Node: How To Contribute64829 -Node: Acknowledgments66068 -Node: Getting Started70816 -Node: Running gawk73250 -Node: One-shot74440 -Node: Read Terminal75665 -Ref: Read Terminal-Footnote-177628 -Node: Long77799 -Node: Executable Scripts79175 -Ref: Executable Scripts-Footnote-181008 -Ref: Executable Scripts-Footnote-281110 -Node: Comments81657 -Node: Quoting84130 -Node: DOS Quoting89443 -Node: Sample Data Files90118 -Node: Very Simple92672 -Node: Two Rules97445 -Node: More Complex99339 -Ref: More Complex-Footnote-1102271 -Node: Statements/Lines102356 -Ref: Statements/Lines-Footnote-1106812 -Node: Other Features107077 -Node: When108005 -Node: Intro Summary110175 -Node: Invoking Gawk110941 -Node: Command Line112456 -Node: Options113247 -Ref: Options-Footnote-1129076 -Node: Other Arguments129101 -Node: Naming Standard Input131763 -Node: Environment Variables132856 -Node: AWKPATH Variable133414 -Ref: AWKPATH Variable-Footnote-1136286 -Ref: AWKPATH Variable-Footnote-2136331 -Node: AWKLIBPATH Variable136591 -Node: Other Environment Variables137350 -Node: Exit Status141007 -Node: Include Files141682 -Node: Loading Shared Libraries145260 -Node: Obsolete146644 -Node: Undocumented147341 -Node: Invoking Summary147608 -Node: Regexp149208 -Node: Regexp Usage150658 -Node: Escape Sequences152691 -Node: Regexp Operators158358 -Ref: Regexp Operators-Footnote-1165838 -Ref: Regexp Operators-Footnote-2165985 -Node: Bracket Expressions166083 -Ref: table-char-classes167973 -Node: GNU Regexp Operators170913 -Node: Case-sensitivity174636 -Ref: Case-sensitivity-Footnote-1177528 -Ref: Case-sensitivity-Footnote-2177763 -Node: Leftmost Longest177871 -Node: Computed Regexps179072 -Node: Regexp Summary182444 -Node: Reading Files183913 -Node: Records186005 -Node: awk split records186748 -Node: gawk split records191606 -Ref: gawk split records-Footnote-1196127 -Node: Fields196164 -Ref: Fields-Footnote-1199128 -Node: Nonconstant Fields199214 -Ref: Nonconstant Fields-Footnote-1201444 -Node: Changing Fields201646 -Node: Field Separators207600 -Node: Default Field Splitting210302 -Node: Regexp Field Splitting211419 -Node: Single Character Fields214760 -Node: Command Line Field Separator215819 -Node: Full Line Fields219245 -Ref: Full Line Fields-Footnote-1219753 -Node: Field Splitting Summary219799 -Ref: Field Splitting Summary-Footnote-1222931 -Node: Constant Size223032 -Node: Splitting By Content227638 -Ref: Splitting By Content-Footnote-1231711 -Node: Multiple Line231751 -Ref: Multiple Line-Footnote-1237607 -Node: Getline237786 -Node: Plain Getline240002 -Node: Getline/Variable242097 -Node: Getline/File243244 -Node: Getline/Variable/File244628 -Ref: Getline/Variable/File-Footnote-1246227 -Node: Getline/Pipe246314 -Node: Getline/Variable/Pipe249013 -Node: Getline/Coprocess250120 -Node: Getline/Variable/Coprocess251372 -Node: Getline Notes252109 -Node: Getline Summary254913 -Ref: table-getline-variants255321 -Node: Read Timeout256233 -Ref: Read Timeout-Footnote-1260060 -Node: Command-line directories260118 -Node: Input Summary261022 -Node: Input Exercises264159 -Node: Printing264892 -Node: Print266614 -Node: Print Examples267955 -Node: Output Separators270734 -Node: OFMT272750 -Node: Printf274108 -Node: Basic Printf275014 -Node: Control Letters276553 -Node: Format Modifiers280544 -Node: Printf Examples286571 -Node: Redirection289035 -Node: Special Files296007 -Node: Special FD296540 -Ref: Special FD-Footnote-1300137 -Node: Special Network300211 -Node: Special Caveats301061 -Node: Close Files And Pipes301857 -Ref: Close Files And Pipes-Footnote-1309018 -Ref: Close Files And Pipes-Footnote-2309166 -Node: Output Summary309316 -Node: Output exercises310313 -Node: Expressions310993 -Node: Values312178 -Node: Constants312854 -Node: Scalar Constants313534 -Ref: Scalar Constants-Footnote-1314393 -Node: Nondecimal-numbers314643 -Node: Regexp Constants317643 -Node: Using Constant Regexps318118 -Node: Variables321190 -Node: Using Variables321845 -Node: Assignment Options323569 -Node: Conversion325444 -Node: Strings And Numbers325968 -Ref: Strings And Numbers-Footnote-1329030 -Node: Locale influences conversions329139 -Ref: table-locale-affects331856 -Node: All Operators332444 -Node: Arithmetic Ops333074 -Node: Concatenation335579 -Ref: Concatenation-Footnote-1338398 -Node: Assignment Ops338518 -Ref: table-assign-ops343501 -Node: Increment Ops344818 -Node: Truth Values and Conditions348256 -Node: Truth Values349339 -Node: Typing and Comparison350388 -Node: Variable Typing351181 -Node: Comparison Operators354833 -Ref: table-relational-ops355243 -Node: POSIX String Comparison358793 -Ref: POSIX String Comparison-Footnote-1359877 -Node: Boolean Ops360015 -Ref: Boolean Ops-Footnote-1364085 -Node: Conditional Exp364176 -Node: Function Calls365903 -Node: Precedence369783 -Node: Locales373452 -Node: Expressions Summary375083 -Node: Patterns and Actions377624 -Node: Pattern Overview378740 -Node: Regexp Patterns380417 -Node: Expression Patterns380960 -Node: Ranges384741 -Node: BEGIN/END387847 -Node: Using BEGIN/END388609 -Ref: Using BEGIN/END-Footnote-1391345 -Node: I/O And BEGIN/END391451 -Node: BEGINFILE/ENDFILE393736 -Node: Empty396667 -Node: Using Shell Variables396984 -Node: Action Overview399267 -Node: Statements401594 -Node: If Statement403442 -Node: While Statement404940 -Node: Do Statement406984 -Node: For Statement408140 -Node: Switch Statement411292 -Node: Break Statement413395 -Node: Continue Statement415450 -Node: Next Statement417243 -Node: Nextfile Statement419633 -Node: Exit Statement422288 -Node: Built-in Variables424692 -Node: User-modified425819 -Ref: User-modified-Footnote-1433508 -Node: Auto-set433570 -Ref: Auto-set-Footnote-1446152 -Ref: Auto-set-Footnote-2446357 -Node: ARGC and ARGV446413 -Node: Pattern Action Summary450267 -Node: Arrays452490 -Node: Array Basics454039 -Node: Array Intro454865 -Ref: figure-array-elements456838 -Node: Reference to Elements459245 -Node: Assigning Elements461518 -Node: Array Example462009 -Node: Scanning an Array463741 -Node: Controlling Scanning466756 -Ref: Controlling Scanning-Footnote-1471929 -Node: Delete472245 -Ref: Delete-Footnote-1475010 -Node: Numeric Array Subscripts475067 -Node: Uninitialized Subscripts477250 -Node: Multidimensional478875 -Node: Multiscanning481968 -Node: Arrays of Arrays483557 -Node: Arrays Summary488220 -Node: Functions490325 -Node: Built-in491198 -Node: Calling Built-in492276 -Node: Numeric Functions494264 -Ref: Numeric Functions-Footnote-1498206 -Ref: Numeric Functions-Footnote-2498563 -Ref: Numeric Functions-Footnote-3498611 -Node: String Functions498880 -Ref: String Functions-Footnote-1521891 -Ref: String Functions-Footnote-2522020 -Ref: String Functions-Footnote-3522268 -Node: Gory Details522355 -Ref: table-sub-escapes524142 -Ref: table-sub-proposed525662 -Ref: table-posix-sub527026 -Ref: table-gensub-escapes528566 -Ref: Gory Details-Footnote-1529742 -Node: I/O Functions529893 -Ref: I/O Functions-Footnote-1537016 -Node: Time Functions537163 -Ref: Time Functions-Footnote-1547627 -Ref: Time Functions-Footnote-2547695 -Ref: Time Functions-Footnote-3547853 -Ref: Time Functions-Footnote-4547964 -Ref: Time Functions-Footnote-5548076 -Ref: Time Functions-Footnote-6548303 -Node: Bitwise Functions548569 -Ref: table-bitwise-ops549131 -Ref: Bitwise Functions-Footnote-1553376 -Node: Type Functions553560 -Node: I18N Functions554702 -Node: User-defined556347 -Node: Definition Syntax557151 -Ref: Definition Syntax-Footnote-1562330 -Node: Function Example562399 -Ref: Function Example-Footnote-1564963 -Node: Function Caveats564985 -Node: Calling A Function565503 -Node: Variable Scope566458 -Node: Pass By Value/Reference569446 -Node: Return Statement572956 -Node: Dynamic Typing575940 -Node: Indirect Calls576869 -Node: Functions Summary586582 -Node: Library Functions589121 -Ref: Library Functions-Footnote-1592739 -Ref: Library Functions-Footnote-2592882 -Node: Library Names593053 -Ref: Library Names-Footnote-1596526 -Ref: Library Names-Footnote-2596746 -Node: General Functions596832 -Node: Strtonum Function597860 -Node: Assert Function600640 -Node: Round Function603966 -Node: Cliff Random Function605507 -Node: Ordinal Functions606523 -Ref: Ordinal Functions-Footnote-1609600 -Ref: Ordinal Functions-Footnote-2609852 -Node: Join Function610063 -Ref: Join Function-Footnote-1611834 -Node: Getlocaltime Function612034 -Node: Readfile Function615770 -Node: Data File Management617609 -Node: Filetrans Function618241 -Node: Rewind Function622310 -Node: File Checking623868 -Ref: File Checking-Footnote-1625000 -Node: Empty Files625201 -Node: Ignoring Assigns627180 -Node: Getopt Function628734 -Ref: Getopt Function-Footnote-1640037 -Node: Passwd Functions640240 -Ref: Passwd Functions-Footnote-1649219 -Node: Group Functions649307 -Ref: Group Functions-Footnote-1657248 -Node: Walking Arrays657461 -Node: Library Functions Summary659064 -Node: Library exercises660452 -Node: Sample Programs661732 -Node: Running Examples662502 -Node: Clones663230 -Node: Cut Program664454 -Node: Egrep Program674322 -Ref: Egrep Program-Footnote-1682293 -Node: Id Program682403 -Node: Split Program686067 -Ref: Split Program-Footnote-1689605 -Node: Tee Program689733 -Node: Uniq Program692540 -Node: Wc Program699970 -Ref: Wc Program-Footnote-1704235 -Node: Miscellaneous Programs704327 -Node: Dupword Program705540 -Node: Alarm Program707571 -Node: Translate Program712385 -Ref: Translate Program-Footnote-1716776 -Ref: Translate Program-Footnote-2717046 -Node: Labels Program717180 -Ref: Labels Program-Footnote-1720551 -Node: Word Sorting720635 -Node: History Sorting724678 -Node: Extract Program726514 -Node: Simple Sed734050 -Node: Igawk Program737112 -Ref: Igawk Program-Footnote-1751423 -Ref: Igawk Program-Footnote-2751624 -Node: Anagram Program751762 -Node: Signature Program754830 -Node: Programs Summary756077 -Node: Programs Exercises757292 -Node: Advanced Features760943 -Node: Nondecimal Data762891 -Node: Array Sorting764468 -Node: Controlling Array Traversal765165 -Node: Array Sorting Functions773445 -Ref: Array Sorting Functions-Footnote-1777352 -Node: Two-way I/O777546 -Ref: Two-way I/O-Footnote-1782490 -Ref: Two-way I/O-Footnote-2782669 -Node: TCP/IP Networking782751 -Node: Profiling785596 -Node: Advanced Features Summary793138 -Node: Internationalization795002 -Node: I18N and L10N796482 -Node: Explaining gettext797168 -Ref: Explaining gettext-Footnote-1802308 -Ref: Explaining gettext-Footnote-2802492 -Node: Programmer i18n802657 -Node: Translator i18n806882 -Node: String Extraction807676 -Ref: String Extraction-Footnote-1808637 -Node: Printf Ordering808723 -Ref: Printf Ordering-Footnote-1811505 -Node: I18N Portability811569 -Ref: I18N Portability-Footnote-1814018 -Node: I18N Example814081 -Ref: I18N Example-Footnote-1816803 -Node: Gawk I18N816875 -Node: I18N Summary817513 -Node: Debugger818852 -Node: Debugging819874 -Node: Debugging Concepts820315 -Node: Debugging Terms822171 -Node: Awk Debugging824768 -Node: Sample Debugging Session825660 -Node: Debugger Invocation826180 -Node: Finding The Bug827513 -Node: List of Debugger Commands833995 -Node: Breakpoint Control835327 -Node: Debugger Execution Control838991 -Node: Viewing And Changing Data842351 -Node: Execution Stack845709 -Node: Debugger Info847222 -Node: Miscellaneous Debugger Commands851216 -Node: Readline Support856400 -Node: Limitations857292 -Node: Debugging Summary859566 -Node: Arbitrary Precision Arithmetic860730 -Node: Computer Arithmetic862217 -Ref: Computer Arithmetic-Footnote-1866604 -Node: Math Definitions866661 -Ref: table-ieee-formats869950 -Ref: Math Definitions-Footnote-1870490 -Node: MPFR features870593 -Node: FP Math Caution872235 -Ref: FP Math Caution-Footnote-1873287 -Node: Inexactness of computations873656 -Node: Inexact representation874604 -Node: Comparing FP Values875959 -Node: Errors accumulate876923 -Node: Getting Accuracy878356 -Node: Try To Round881015 -Node: Setting precision881914 -Ref: table-predefined-precision-strings882596 -Node: Setting the rounding mode884389 -Ref: table-gawk-rounding-modes884753 -Ref: Setting the rounding mode-Footnote-1888207 -Node: Arbitrary Precision Integers888386 -Ref: Arbitrary Precision Integers-Footnote-1891389 -Node: POSIX Floating Point Problems891538 -Ref: POSIX Floating Point Problems-Footnote-1895414 -Node: Floating point summary895452 -Node: Dynamic Extensions897675 -Node: Extension Intro899227 -Node: Plugin License900492 -Node: Extension Mechanism Outline901177 -Ref: figure-load-extension901601 -Ref: figure-load-new-function903086 -Ref: figure-call-new-function904088 -Node: Extension API Description906072 -Node: Extension API Functions Introduction907522 -Node: General Data Types912387 -Ref: General Data Types-Footnote-1918080 -Node: Requesting Values918379 -Ref: table-value-types-returned919116 -Node: Memory Allocation Functions920074 -Ref: Memory Allocation Functions-Footnote-1922821 -Node: Constructor Functions922917 -Node: Registration Functions924675 -Node: Extension Functions925360 -Node: Exit Callback Functions927662 -Node: Extension Version String928911 -Node: Input Parsers929561 -Node: Output Wrappers939375 -Node: Two-way processors943891 -Node: Printing Messages946095 -Ref: Printing Messages-Footnote-1947172 -Node: Updating `ERRNO'947324 -Node: Accessing Parameters948063 -Node: Symbol Table Access949293 -Node: Symbol table by name949807 -Node: Symbol table by cookie951783 -Ref: Symbol table by cookie-Footnote-1955916 -Node: Cached values955979 -Ref: Cached values-Footnote-1959483 -Node: Array Manipulation959574 -Ref: Array Manipulation-Footnote-1960672 -Node: Array Data Types960711 -Ref: Array Data Types-Footnote-1963414 -Node: Array Functions963506 -Node: Flattening Arrays967380 -Node: Creating Arrays974232 -Node: Extension API Variables978963 -Node: Extension Versioning979599 -Node: Extension API Informational Variables981500 -Node: Extension API Boilerplate982586 -Node: Finding Extensions986390 -Node: Extension Example986950 -Node: Internal File Description987680 -Node: Internal File Ops991771 -Ref: Internal File Ops-Footnote-11003203 -Node: Using Internal File Ops1003343 -Ref: Using Internal File Ops-Footnote-11005690 -Node: Extension Samples1005958 -Node: Extension Sample File Functions1007482 -Node: Extension Sample Fnmatch1015050 -Node: Extension Sample Fork1016532 -Node: Extension Sample Inplace1017745 -Node: Extension Sample Ord1019420 -Node: Extension Sample Readdir1020256 -Ref: table-readdir-file-types1021112 -Node: Extension Sample Revout1021911 -Node: Extension Sample Rev2way1022502 -Node: Extension Sample Read write array1023243 -Node: Extension Sample Readfile1025122 -Node: Extension Sample API Tests1026222 -Node: Extension Sample Time1026747 -Node: gawkextlib1028062 -Node: Extension summary1030875 -Node: Extension Exercises1034568 -Node: Language History1035290 -Node: V7/SVR3.11036933 -Node: SVR41039253 -Node: POSIX1040695 -Node: BTL1042081 -Node: POSIX/GNU1042815 -Node: Feature History1048558 -Node: Common Extensions1061688 -Node: Ranges and Locales1063000 -Ref: Ranges and Locales-Footnote-11067617 -Ref: Ranges and Locales-Footnote-21067644 -Ref: Ranges and Locales-Footnote-31067878 -Node: Contributors1068099 -Node: History summary1073524 -Node: Installation1074893 -Node: Gawk Distribution1075844 -Node: Getting1076328 -Node: Extracting1077152 -Node: Distribution contents1078794 -Node: Unix Installation1084511 -Node: Quick Installation1085128 -Node: Additional Configuration Options1087570 -Node: Configuration Philosophy1089308 -Node: Non-Unix Installation1091659 -Node: PC Installation1092117 -Node: PC Binary Installation1093428 -Node: PC Compiling1095276 -Ref: PC Compiling-Footnote-11098275 -Node: PC Testing1098380 -Node: PC Using1099556 -Node: Cygwin1103714 -Node: MSYS1104523 -Node: VMS Installation1105037 -Node: VMS Compilation1105833 -Ref: VMS Compilation-Footnote-11107055 -Node: VMS Dynamic Extensions1107113 -Node: VMS Installation Details1108486 -Node: VMS Running1110738 -Node: VMS GNV1113572 -Node: VMS Old Gawk1114295 -Node: Bugs1114765 -Node: Other Versions1118769 -Node: Installation summary1125024 -Node: Notes1126080 -Node: Compatibility Mode1126945 -Node: Additions1127727 -Node: Accessing The Source1128652 -Node: Adding Code1130088 -Node: New Ports1136266 -Node: Derived Files1140747 -Ref: Derived Files-Footnote-11145828 -Ref: Derived Files-Footnote-21145862 -Ref: Derived Files-Footnote-31146458 -Node: Future Extensions1146572 -Node: Implementation Limitations1147178 -Node: Extension Design1148426 -Node: Old Extension Problems1149580 -Ref: Old Extension Problems-Footnote-11151097 -Node: Extension New Mechanism Goals1151154 -Ref: Extension New Mechanism Goals-Footnote-11154514 -Node: Extension Other Design Decisions1154703 -Node: Extension Future Growth1156809 -Node: Old Extension Mechanism1157645 -Node: Notes summary1159407 -Node: Basic Concepts1160593 -Node: Basic High Level1161274 -Ref: figure-general-flow1161546 -Ref: figure-process-flow1162145 -Ref: Basic High Level-Footnote-11165374 -Node: Basic Data Typing1165559 -Node: Glossary1168887 -Node: Copying1194039 -Node: GNU Free Documentation License1231595 -Node: Index1256731 +Ref: Preface-Footnote-149226 +Ref: Preface-Footnote-249333 +Node: History49565 +Node: Names51939 +Ref: Names-Footnote-153403 +Node: This Manual53476 +Ref: This Manual-Footnote-159255 +Node: Conventions59355 +Node: Manual History61511 +Ref: Manual History-Footnote-164587 +Ref: Manual History-Footnote-264628 +Node: How To Contribute64702 +Node: Acknowledgments65941 +Node: Getting Started70689 +Node: Running gawk73123 +Node: One-shot74313 +Node: Read Terminal75538 +Ref: Read Terminal-Footnote-177501 +Node: Long77672 +Node: Executable Scripts79048 +Ref: Executable Scripts-Footnote-180881 +Ref: Executable Scripts-Footnote-280983 +Node: Comments81530 +Node: Quoting84003 +Node: DOS Quoting89316 +Node: Sample Data Files89991 +Node: Very Simple92545 +Node: Two Rules97318 +Node: More Complex99212 +Ref: More Complex-Footnote-1102144 +Node: Statements/Lines102229 +Ref: Statements/Lines-Footnote-1106685 +Node: Other Features106950 +Node: When107878 +Ref: When-Footnote-1109764 +Node: Intro Summary109829 +Node: Invoking Gawk110595 +Node: Command Line112110 +Node: Options112901 +Ref: Options-Footnote-1128699 +Node: Other Arguments128724 +Node: Naming Standard Input131386 +Node: Environment Variables132479 +Node: AWKPATH Variable133037 +Ref: AWKPATH Variable-Footnote-1135903 +Ref: AWKPATH Variable-Footnote-2135948 +Node: AWKLIBPATH Variable136208 +Node: Other Environment Variables136967 +Node: Exit Status140624 +Node: Include Files141299 +Node: Loading Shared Libraries144877 +Node: Obsolete146261 +Node: Undocumented146958 +Node: Invoking Summary147225 +Node: Regexp148825 +Node: Regexp Usage150275 +Node: Escape Sequences152308 +Node: Regexp Operators158139 +Ref: Regexp Operators-Footnote-1165619 +Ref: Regexp Operators-Footnote-2165766 +Node: Bracket Expressions165864 +Ref: table-char-classes167754 +Node: GNU Regexp Operators170694 +Node: Case-sensitivity174417 +Ref: Case-sensitivity-Footnote-1177309 +Ref: Case-sensitivity-Footnote-2177544 +Node: Leftmost Longest177652 +Node: Computed Regexps178853 +Node: Regexp Summary182225 +Node: Reading Files183694 +Node: Records185786 +Node: awk split records186529 +Node: gawk split records191387 +Ref: gawk split records-Footnote-1195908 +Node: Fields195945 +Ref: Fields-Footnote-1198909 +Node: Nonconstant Fields198995 +Ref: Nonconstant Fields-Footnote-1201225 +Node: Changing Fields201427 +Node: Field Separators207381 +Node: Default Field Splitting210083 +Node: Regexp Field Splitting211200 +Node: Single Character Fields214541 +Node: Command Line Field Separator215600 +Node: Full Line Fields219026 +Ref: Full Line Fields-Footnote-1219534 +Node: Field Splitting Summary219580 +Ref: Field Splitting Summary-Footnote-1222712 +Node: Constant Size222813 +Node: Splitting By Content227419 +Ref: Splitting By Content-Footnote-1231492 +Node: Multiple Line231532 +Ref: Multiple Line-Footnote-1237388 +Node: Getline237567 +Node: Plain Getline239783 +Node: Getline/Variable241878 +Node: Getline/File243025 +Node: Getline/Variable/File244409 +Ref: Getline/Variable/File-Footnote-1246008 +Node: Getline/Pipe246095 +Node: Getline/Variable/Pipe248794 +Node: Getline/Coprocess249901 +Node: Getline/Variable/Coprocess251153 +Node: Getline Notes251890 +Node: Getline Summary254694 +Ref: table-getline-variants255102 +Node: Read Timeout256014 +Ref: Read Timeout-Footnote-1259841 +Node: Command-line directories259899 +Node: Input Summary260803 +Node: Input Exercises263940 +Node: Printing264673 +Node: Print266395 +Node: Print Examples267736 +Node: Output Separators270515 +Node: OFMT272531 +Node: Printf273889 +Node: Basic Printf274795 +Node: Control Letters276334 +Node: Format Modifiers280325 +Node: Printf Examples286352 +Node: Redirection288816 +Node: Special Files295788 +Node: Special FD296321 +Ref: Special FD-Footnote-1299918 +Node: Special Network299992 +Node: Special Caveats300842 +Node: Close Files And Pipes301638 +Ref: Close Files And Pipes-Footnote-1308799 +Ref: Close Files And Pipes-Footnote-2308947 +Node: Output Summary309097 +Node: Output exercises310094 +Node: Expressions310774 +Node: Values311959 +Node: Constants312635 +Node: Scalar Constants313315 +Ref: Scalar Constants-Footnote-1314174 +Node: Nondecimal-numbers314424 +Node: Regexp Constants317424 +Node: Using Constant Regexps317899 +Node: Variables320971 +Node: Using Variables321626 +Node: Assignment Options323350 +Node: Conversion325225 +Node: Strings And Numbers325749 +Ref: Strings And Numbers-Footnote-1328811 +Node: Locale influences conversions328920 +Ref: table-locale-affects331637 +Node: All Operators332225 +Node: Arithmetic Ops332855 +Node: Concatenation335360 +Ref: Concatenation-Footnote-1338179 +Node: Assignment Ops338299 +Ref: table-assign-ops343282 +Node: Increment Ops344599 +Node: Truth Values and Conditions348037 +Node: Truth Values349120 +Node: Typing and Comparison350169 +Node: Variable Typing350962 +Node: Comparison Operators354614 +Ref: table-relational-ops355024 +Node: POSIX String Comparison358574 +Ref: POSIX String Comparison-Footnote-1359658 +Node: Boolean Ops359796 +Ref: Boolean Ops-Footnote-1363866 +Node: Conditional Exp363957 +Node: Function Calls365684 +Node: Precedence369564 +Node: Locales373233 +Node: Expressions Summary374864 +Node: Patterns and Actions377405 +Node: Pattern Overview378521 +Node: Regexp Patterns380198 +Node: Expression Patterns380741 +Node: Ranges384522 +Node: BEGIN/END387628 +Node: Using BEGIN/END388390 +Ref: Using BEGIN/END-Footnote-1391126 +Node: I/O And BEGIN/END391232 +Node: BEGINFILE/ENDFILE393517 +Node: Empty396448 +Node: Using Shell Variables396765 +Node: Action Overview399048 +Node: Statements401375 +Node: If Statement403223 +Node: While Statement404721 +Node: Do Statement406765 +Node: For Statement407921 +Node: Switch Statement411073 +Node: Break Statement413461 +Node: Continue Statement415516 +Node: Next Statement417355 +Node: Nextfile Statement419745 +Node: Exit Statement422400 +Node: Built-in Variables424804 +Node: User-modified425931 +Ref: User-modified-Footnote-1433620 +Node: Auto-set433682 +Ref: Auto-set-Footnote-1446264 +Ref: Auto-set-Footnote-2446469 +Node: ARGC and ARGV446525 +Node: Pattern Action Summary450429 +Node: Arrays452652 +Node: Array Basics454201 +Node: Array Intro455027 +Ref: figure-array-elements457000 +Node: Reference to Elements459407 +Node: Assigning Elements461786 +Node: Array Example462277 +Node: Scanning an Array464009 +Node: Controlling Scanning467024 +Ref: Controlling Scanning-Footnote-1472197 +Node: Delete472513 +Ref: Delete-Footnote-1475278 +Node: Numeric Array Subscripts475335 +Node: Uninitialized Subscripts477518 +Node: Multidimensional479143 +Node: Multiscanning482256 +Node: Arrays of Arrays483845 +Node: Arrays Summary488508 +Node: Functions490613 +Node: Built-in491486 +Node: Calling Built-in492564 +Node: Numeric Functions494552 +Ref: Numeric Functions-Footnote-1498586 +Ref: Numeric Functions-Footnote-2498943 +Ref: Numeric Functions-Footnote-3498991 +Node: String Functions499260 +Ref: String Functions-Footnote-1522271 +Ref: String Functions-Footnote-2522400 +Ref: String Functions-Footnote-3522648 +Node: Gory Details522735 +Ref: table-sub-escapes524522 +Ref: table-sub-proposed526042 +Ref: table-posix-sub527406 +Ref: table-gensub-escapes528946 +Ref: Gory Details-Footnote-1530122 +Node: I/O Functions530273 +Ref: I/O Functions-Footnote-1537396 +Node: Time Functions537543 +Ref: Time Functions-Footnote-1548007 +Ref: Time Functions-Footnote-2548075 +Ref: Time Functions-Footnote-3548233 +Ref: Time Functions-Footnote-4548344 +Ref: Time Functions-Footnote-5548456 +Ref: Time Functions-Footnote-6548683 +Node: Bitwise Functions548949 +Ref: table-bitwise-ops549511 +Ref: Bitwise Functions-Footnote-1553756 +Node: Type Functions553940 +Node: I18N Functions555082 +Node: User-defined556727 +Node: Definition Syntax557531 +Ref: Definition Syntax-Footnote-1562710 +Node: Function Example562779 +Ref: Function Example-Footnote-1565419 +Node: Function Caveats565441 +Node: Calling A Function565959 +Node: Variable Scope566914 +Node: Pass By Value/Reference569902 +Node: Return Statement573412 +Node: Dynamic Typing576396 +Node: Indirect Calls577325 +Node: Functions Summary587038 +Node: Library Functions589577 +Ref: Library Functions-Footnote-1593195 +Ref: Library Functions-Footnote-2593338 +Node: Library Names593509 +Ref: Library Names-Footnote-1596982 +Ref: Library Names-Footnote-2597202 +Node: General Functions597288 +Node: Strtonum Function598316 +Node: Assert Function601096 +Node: Round Function604422 +Node: Cliff Random Function605963 +Node: Ordinal Functions606979 +Ref: Ordinal Functions-Footnote-1610056 +Ref: Ordinal Functions-Footnote-2610308 +Node: Join Function610519 +Ref: Join Function-Footnote-1612290 +Node: Getlocaltime Function612490 +Node: Readfile Function616226 +Node: Data File Management618065 +Node: Filetrans Function618697 +Node: Rewind Function622766 +Node: File Checking624324 +Ref: File Checking-Footnote-1625456 +Node: Empty Files625657 +Node: Ignoring Assigns627636 +Node: Getopt Function629190 +Ref: Getopt Function-Footnote-1640493 +Node: Passwd Functions640696 +Ref: Passwd Functions-Footnote-1649675 +Node: Group Functions649763 +Ref: Group Functions-Footnote-1657704 +Node: Walking Arrays657917 +Node: Library Functions Summary659520 +Node: Library exercises660908 +Node: Sample Programs662188 +Node: Running Examples662958 +Node: Clones663686 +Node: Cut Program664910 +Node: Egrep Program674778 +Ref: Egrep Program-Footnote-1682749 +Node: Id Program682859 +Node: Split Program686523 +Ref: Split Program-Footnote-1690061 +Node: Tee Program690189 +Node: Uniq Program692996 +Node: Wc Program700426 +Ref: Wc Program-Footnote-1704691 +Node: Miscellaneous Programs704783 +Node: Dupword Program705996 +Node: Alarm Program708027 +Node: Translate Program712841 +Ref: Translate Program-Footnote-1717232 +Ref: Translate Program-Footnote-2717502 +Node: Labels Program717636 +Ref: Labels Program-Footnote-1721007 +Node: Word Sorting721091 +Node: History Sorting725134 +Node: Extract Program726970 +Node: Simple Sed734506 +Node: Igawk Program737568 +Ref: Igawk Program-Footnote-1751872 +Ref: Igawk Program-Footnote-2752073 +Node: Anagram Program752211 +Node: Signature Program755279 +Node: Programs Summary756526 +Node: Programs Exercises757741 +Node: Advanced Features761392 +Node: Nondecimal Data763340 +Node: Array Sorting764917 +Node: Controlling Array Traversal765614 +Node: Array Sorting Functions773894 +Ref: Array Sorting Functions-Footnote-1777801 +Node: Two-way I/O777995 +Ref: Two-way I/O-Footnote-1782939 +Ref: Two-way I/O-Footnote-2783118 +Node: TCP/IP Networking783200 +Node: Profiling786045 +Node: Advanced Features Summary793587 +Node: Internationalization795451 +Node: I18N and L10N796931 +Node: Explaining gettext797617 +Ref: Explaining gettext-Footnote-1802757 +Ref: Explaining gettext-Footnote-2802941 +Node: Programmer i18n803106 +Node: Translator i18n807331 +Node: String Extraction808125 +Ref: String Extraction-Footnote-1809086 +Node: Printf Ordering809172 +Ref: Printf Ordering-Footnote-1811954 +Node: I18N Portability812018 +Ref: I18N Portability-Footnote-1814467 +Node: I18N Example814530 +Ref: I18N Example-Footnote-1817252 +Node: Gawk I18N817324 +Node: I18N Summary817962 +Node: Debugger819301 +Node: Debugging820323 +Node: Debugging Concepts820764 +Node: Debugging Terms822620 +Node: Awk Debugging825217 +Node: Sample Debugging Session826109 +Node: Debugger Invocation826629 +Node: Finding The Bug827962 +Node: List of Debugger Commands834444 +Node: Breakpoint Control835776 +Node: Debugger Execution Control839440 +Node: Viewing And Changing Data842800 +Node: Execution Stack846158 +Node: Debugger Info847671 +Node: Miscellaneous Debugger Commands851665 +Node: Readline Support856849 +Node: Limitations857741 +Node: Debugging Summary860015 +Node: Arbitrary Precision Arithmetic861183 +Node: Computer Arithmetic862670 +Ref: Computer Arithmetic-Footnote-1867057 +Node: Math Definitions867114 +Ref: table-ieee-formats870403 +Ref: Math Definitions-Footnote-1870943 +Node: MPFR features871046 +Node: FP Math Caution872663 +Ref: FP Math Caution-Footnote-1873713 +Node: Inexactness of computations874082 +Node: Inexact representation875030 +Node: Comparing FP Values876385 +Node: Errors accumulate877349 +Node: Getting Accuracy878782 +Node: Try To Round881441 +Node: Setting precision882340 +Ref: table-predefined-precision-strings883022 +Node: Setting the rounding mode884815 +Ref: table-gawk-rounding-modes885179 +Ref: Setting the rounding mode-Footnote-1888633 +Node: Arbitrary Precision Integers888812 +Ref: Arbitrary Precision Integers-Footnote-1891793 +Node: POSIX Floating Point Problems891942 +Ref: POSIX Floating Point Problems-Footnote-1895818 +Node: Floating point summary895856 +Node: Dynamic Extensions898060 +Node: Extension Intro899612 +Node: Plugin License900877 +Node: Extension Mechanism Outline901562 +Ref: figure-load-extension901986 +Ref: figure-load-new-function903471 +Ref: figure-call-new-function904473 +Node: Extension API Description906457 +Node: Extension API Functions Introduction907907 +Node: General Data Types912774 +Ref: General Data Types-Footnote-1918467 +Node: Requesting Values918766 +Ref: table-value-types-returned919503 +Node: Memory Allocation Functions920461 +Ref: Memory Allocation Functions-Footnote-1923208 +Node: Constructor Functions923304 +Node: Registration Functions925062 +Node: Extension Functions925747 +Node: Exit Callback Functions928049 +Node: Extension Version String929297 +Node: Input Parsers929947 +Node: Output Wrappers939761 +Node: Two-way processors944277 +Node: Printing Messages946481 +Ref: Printing Messages-Footnote-1947558 +Node: Updating `ERRNO'947710 +Node: Accessing Parameters948449 +Node: Symbol Table Access949679 +Node: Symbol table by name950193 +Node: Symbol table by cookie952169 +Ref: Symbol table by cookie-Footnote-1956302 +Node: Cached values956365 +Ref: Cached values-Footnote-1959869 +Node: Array Manipulation959960 +Ref: Array Manipulation-Footnote-1961058 +Node: Array Data Types961097 +Ref: Array Data Types-Footnote-1963800 +Node: Array Functions963892 +Node: Flattening Arrays967766 +Node: Creating Arrays974618 +Node: Extension API Variables979349 +Node: Extension Versioning979985 +Node: Extension API Informational Variables981886 +Node: Extension API Boilerplate982972 +Node: Finding Extensions986776 +Node: Extension Example987336 +Node: Internal File Description988066 +Node: Internal File Ops992157 +Ref: Internal File Ops-Footnote-11003589 +Node: Using Internal File Ops1003729 +Ref: Using Internal File Ops-Footnote-11006076 +Node: Extension Samples1006344 +Node: Extension Sample File Functions1007868 +Node: Extension Sample Fnmatch1015436 +Node: Extension Sample Fork1016918 +Node: Extension Sample Inplace1018131 +Node: Extension Sample Ord1019806 +Node: Extension Sample Readdir1020642 +Ref: table-readdir-file-types1021498 +Node: Extension Sample Revout1022297 +Node: Extension Sample Rev2way1022888 +Node: Extension Sample Read write array1023629 +Node: Extension Sample Readfile1025508 +Node: Extension Sample API Tests1026608 +Node: Extension Sample Time1027133 +Node: gawkextlib1028448 +Node: Extension summary1031261 +Node: Extension Exercises1034954 +Node: Language History1035676 +Node: V7/SVR3.11037319 +Node: SVR41039639 +Node: POSIX1041081 +Node: BTL1042467 +Node: POSIX/GNU1043201 +Node: Feature History1048942 +Node: Common Extensions1062072 +Node: Ranges and Locales1063384 +Ref: Ranges and Locales-Footnote-11068001 +Ref: Ranges and Locales-Footnote-21068028 +Ref: Ranges and Locales-Footnote-31068262 +Node: Contributors1068483 +Node: History summary1073908 +Node: Installation1075277 +Node: Gawk Distribution1076228 +Node: Getting1076712 +Node: Extracting1077536 +Node: Distribution contents1079178 +Node: Unix Installation1084895 +Node: Quick Installation1085512 +Node: Additional Configuration Options1087954 +Node: Configuration Philosophy1089692 +Node: Non-Unix Installation1092043 +Node: PC Installation1092501 +Node: PC Binary Installation1093812 +Node: PC Compiling1095660 +Ref: PC Compiling-Footnote-11098659 +Node: PC Testing1098764 +Node: PC Using1099940 +Node: Cygwin1104092 +Node: MSYS1104901 +Node: VMS Installation1105415 +Node: VMS Compilation1106211 +Ref: VMS Compilation-Footnote-11107433 +Node: VMS Dynamic Extensions1107491 +Node: VMS Installation Details1108864 +Node: VMS Running1111116 +Node: VMS GNV1113950 +Node: VMS Old Gawk1114673 +Node: Bugs1115143 +Node: Other Versions1119147 +Node: Installation summary1125402 +Node: Notes1126458 +Node: Compatibility Mode1127323 +Node: Additions1128105 +Node: Accessing The Source1129030 +Node: Adding Code1130466 +Node: New Ports1136644 +Node: Derived Files1141125 +Ref: Derived Files-Footnote-11146206 +Ref: Derived Files-Footnote-21146240 +Ref: Derived Files-Footnote-31146836 +Node: Future Extensions1146950 +Node: Implementation Limitations1147556 +Node: Extension Design1148804 +Node: Old Extension Problems1149958 +Ref: Old Extension Problems-Footnote-11151475 +Node: Extension New Mechanism Goals1151532 +Ref: Extension New Mechanism Goals-Footnote-11154892 +Node: Extension Other Design Decisions1155081 +Node: Extension Future Growth1157187 +Node: Old Extension Mechanism1158023 +Node: Notes summary1159785 +Node: Basic Concepts1160971 +Node: Basic High Level1161652 +Ref: figure-general-flow1161924 +Ref: figure-process-flow1162523 +Ref: Basic High Level-Footnote-11165752 +Node: Basic Data Typing1165937 +Node: Glossary1169265 +Node: Copying1194417 +Node: GNU Free Documentation License1231973 +Node: Index1257109  End Tag Table -- cgit v1.2.3 From 0a8f56def1597bd886d7c9095c1f73e157d1197b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 20 Aug 2014 06:23:01 +0300 Subject: \x escape sequences now process a maximum of 2 digits. --- doc/gawk.info | 1028 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 515 insertions(+), 513 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index a3195bb5..a4f52a54 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -3336,15 +3336,17 @@ apply to both string constants and regexp constants: `\xHH...' The hexadecimal value HH, where HH stands for a sequence of - hexadecimal digits (`0'-`9', and either `A'-`F' or `a'-`f'). Like - the same construct in ISO C, the escape sequence continues until - the first nonhexadecimal digit is seen. (c.e.) However, using - more than two hexadecimal digits produces undefined results. (The - `\x' escape sequence is not allowed in POSIX `awk'.) + hexadecimal digits (`0'-`9', and either `A'-`F' or `a'-`f'). A + maximum of two digts are allowed after the `\x'. Any further + hexadecimal digits are treated as simple letters or numbers. + (c.e.) - CAUTION: The next major relase of `gawk' will change, such - that a maximum of two hexadecimal digits following the `\x' - will be used. + CAUTION: In ISO C, the escape sequence continues until the + first nonhexadecimal digit is seen. For many years, `gawk' + would continue incorporating hexadecimal digits into the + value until a non-hexadecimal digit or the end of the string + was encountered. However, using more than two hexadecimal + digits produces `\/' A literal slash (necessary for regexp constants only). This @@ -31148,10 +31150,10 @@ Index * [] (square brackets), regexp operator: Regexp Operators. (line 56) * \ (backslash): Comments. (line 50) * \ (backslash) in shell commands: Read Terminal. (line 25) -* \ (backslash), \" escape sequence: Escape Sequences. (line 80) +* \ (backslash), \" escape sequence: Escape Sequences. (line 82) * \ (backslash), \' operator (gawk): GNU Regexp Operators. (line 56) -* \ (backslash), \/ escape sequence: Escape Sequences. (line 73) +* \ (backslash), \/ escape sequence: Escape Sequences. (line 75) * \ (backslash), \< operator (gawk): GNU Regexp Operators. (line 30) * \ (backslash), \> operator (gawk): GNU Regexp Operators. @@ -31192,7 +31194,7 @@ Index * \ (backslash), in bracket expressions: Bracket Expressions. (line 17) * \ (backslash), in escape sequences: Escape Sequences. (line 6) * \ (backslash), in escape sequences, POSIX and: Escape Sequences. - (line 116) + (line 118) * \ (backslash), in regexp constants: Computed Regexps. (line 29) * \ (backslash), in shell commands: Quoting. (line 48) * \ (backslash), regexp operator: Regexp Operators. (line 18) @@ -31421,10 +31423,10 @@ Index * b debugger command (alias for break): Breakpoint Control. (line 11) * backslash (\): Comments. (line 50) * backslash (\) in shell commands: Read Terminal. (line 25) -* backslash (\), \" escape sequence: Escape Sequences. (line 80) +* backslash (\), \" escape sequence: Escape Sequences. (line 82) * backslash (\), \' operator (gawk): GNU Regexp Operators. (line 56) -* backslash (\), \/ escape sequence: Escape Sequences. (line 73) +* backslash (\), \/ escape sequence: Escape Sequences. (line 75) * backslash (\), \< operator (gawk): GNU Regexp Operators. (line 30) * backslash (\), \> operator (gawk): GNU Regexp Operators. @@ -31465,7 +31467,7 @@ Index * backslash (\), in bracket expressions: Bracket Expressions. (line 17) * backslash (\), in escape sequences: Escape Sequences. (line 6) * backslash (\), in escape sequences, POSIX and: Escape Sequences. - (line 116) + (line 118) * backslash (\), in regexp constants: Computed Regexps. (line 29) * backslash (\), in shell commands: Quoting. (line 48) * backslash (\), regexp operator: Regexp Operators. (line 18) @@ -31569,7 +31571,7 @@ Index (line 67) * Brian Kernighan's awk <12>: GNU Regexp Operators. (line 83) -* Brian Kernighan's awk <13>: Escape Sequences. (line 120) +* Brian Kernighan's awk <13>: Escape Sequences. (line 122) * Brian Kernighan's awk <14>: When. (line 21) * Brian Kernighan's awk: Preface. (line 13) * Brian Kernighan's awk, extensions: BTL. (line 6) @@ -31798,7 +31800,7 @@ Index * dark corner, CONVFMT variable: Strings And Numbers. (line 40) * dark corner, escape sequences: Other Arguments. (line 31) * dark corner, escape sequences, for metacharacters: Escape Sequences. - (line 138) + (line 140) * dark corner, exit statement: Exit Statement. (line 30) * dark corner, field separators: Field Splitting Summary. (line 46) @@ -32468,7 +32470,7 @@ Index * gawk, ERRNO variable in <4>: Close Files And Pipes. (line 139) * gawk, ERRNO variable in: Getline. (line 19) -* gawk, escape sequences: Escape Sequences. (line 128) +* gawk, escape sequences: Escape Sequences. (line 130) * gawk, extensions, disabling: Options. (line 252) * gawk, features, adding: Adding Code. (line 6) * gawk, features, advanced: Advanced Features. (line 6) @@ -32902,7 +32904,7 @@ Index * mawk utility <2>: Nextfile Statement. (line 47) * mawk utility <3>: Concatenation. (line 36) * mawk utility <4>: Getline/Pipe. (line 62) -* mawk utility: Escape Sequences. (line 128) +* mawk utility: Escape Sequences. (line 130) * maximum precision supported by MPFR library: Auto-set. (line 221) * McIlroy, Doug: Glossary. (line 149) * McPhee, Patrick: Contributors. (line 100) @@ -32915,7 +32917,7 @@ Index (line 54) * messages from extensions: Printing Messages. (line 6) * metacharacters in regular expressions: Regexp Operators. (line 6) -* metacharacters, escape sequences for: Escape Sequences. (line 134) +* metacharacters, escape sequences for: Escape Sequences. (line 136) * minimum precision supported by MPFR library: Auto-set. (line 224) * mktime: Time Functions. (line 25) * modifiers, in format specifiers: Format Modifiers. (line 6) @@ -33136,14 +33138,14 @@ Index * plus sign (+), += operator: Assignment Ops. (line 82) * plus sign (+), regexp operator: Regexp Operators. (line 103) * pointers to functions: Indirect Calls. (line 6) -* portability: Escape Sequences. (line 98) +* portability: Escape Sequences. (line 100) * portability, #! (executable scripts): Executable Scripts. (line 33) * portability, ** operator and: Arithmetic Ops. (line 81) * portability, **= operator and: Assignment Ops. (line 143) * portability, ARGV variable: Executable Scripts. (line 42) * portability, backslash continuation and: Statements/Lines. (line 30) * portability, backslash in escape sequences: Escape Sequences. - (line 116) + (line 118) * portability, close() function and: Close Files And Pipes. (line 81) * portability, data files as single record: gawk split records. @@ -33182,7 +33184,7 @@ Index * POSIX awk, < operator and: Getline/File. (line 26) * POSIX awk, arithmetic operators and: Arithmetic Ops. (line 30) * POSIX awk, backslashes in string constants: Escape Sequences. - (line 116) + (line 118) * POSIX awk, BEGIN/END patterns: I/O And BEGIN/END. (line 16) * POSIX awk, bracket expressions and: Bracket Expressions. (line 24) * POSIX awk, bracket expressions and, character classes: Bracket Expressions. @@ -33563,14 +33565,14 @@ Index * sidebar, A Constant's Base Does Not Affect Its Value: Nondecimal-numbers. (line 64) * sidebar, Backslash Before Regular Characters: Escape Sequences. - (line 114) + (line 116) * sidebar, Changing FS Does Not Affect the Fields: Field Splitting Summary. (line 38) * sidebar, Changing NR and FNR: Auto-set. (line 307) * sidebar, Controlling Output Buffering with system(): I/O Functions. (line 138) * sidebar, Escape Sequences for Metacharacters: Escape Sequences. - (line 132) + (line 134) * sidebar, FS and IGNORECASE: Field Splitting Summary. (line 64) * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions. @@ -33798,7 +33800,7 @@ Index (line 37) * troubleshooting, awk uses FS not IFS: Field Separators. (line 30) * troubleshooting, backslash before nonspecial character: Escape Sequences. - (line 116) + (line 118) * troubleshooting, division: Arithmetic Ops. (line 44) * troubleshooting, fatal errors, field widths, specifying: Constant Size. (line 23) @@ -33854,7 +33856,7 @@ Index * uniq.awk program: Uniq Program. (line 65) * Unix: Glossary. (line 611) * Unix awk, backslashes in escape sequences: Escape Sequences. - (line 128) + (line 130) * Unix awk, close() function and: Close Files And Pipes. (line 131) * Unix awk, password files, field separators and: Command Line Field Separator. @@ -34058,492 +34060,492 @@ Node: Invoking Summary146891 Node: Regexp148491 Node: Regexp Usage149941 Node: Escape Sequences151974 -Node: Regexp Operators157805 -Ref: Regexp Operators-Footnote-1165285 -Ref: Regexp Operators-Footnote-2165432 -Node: Bracket Expressions165530 -Ref: table-char-classes167420 -Node: GNU Regexp Operators170360 -Node: Case-sensitivity174083 -Ref: Case-sensitivity-Footnote-1176975 -Ref: Case-sensitivity-Footnote-2177210 -Node: Leftmost Longest177318 -Node: Computed Regexps178519 -Node: Regexp Summary181891 -Node: Reading Files183360 -Node: Records185452 -Node: awk split records186195 -Node: gawk split records191053 -Ref: gawk split records-Footnote-1195574 -Node: Fields195611 -Ref: Fields-Footnote-1198575 -Node: Nonconstant Fields198661 -Ref: Nonconstant Fields-Footnote-1200891 -Node: Changing Fields201093 -Node: Field Separators207047 -Node: Default Field Splitting209749 -Node: Regexp Field Splitting210866 -Node: Single Character Fields214207 -Node: Command Line Field Separator215266 -Node: Full Line Fields218692 -Ref: Full Line Fields-Footnote-1219200 -Node: Field Splitting Summary219246 -Ref: Field Splitting Summary-Footnote-1222378 -Node: Constant Size222479 -Node: Splitting By Content227085 -Ref: Splitting By Content-Footnote-1231158 -Node: Multiple Line231198 -Ref: Multiple Line-Footnote-1237054 -Node: Getline237233 -Node: Plain Getline239449 -Node: Getline/Variable241544 -Node: Getline/File242691 -Node: Getline/Variable/File244075 -Ref: Getline/Variable/File-Footnote-1245674 -Node: Getline/Pipe245761 -Node: Getline/Variable/Pipe248460 -Node: Getline/Coprocess249567 -Node: Getline/Variable/Coprocess250819 -Node: Getline Notes251556 -Node: Getline Summary254360 -Ref: table-getline-variants254768 -Node: Read Timeout255680 -Ref: Read Timeout-Footnote-1259507 -Node: Command-line directories259565 -Node: Input Summary260469 -Node: Input Exercises263606 -Node: Printing264339 -Node: Print266061 -Node: Print Examples267402 -Node: Output Separators270181 -Node: OFMT272197 -Node: Printf273555 -Node: Basic Printf274461 -Node: Control Letters276000 -Node: Format Modifiers279991 -Node: Printf Examples286018 -Node: Redirection288482 -Node: Special Files295454 -Node: Special FD295987 -Ref: Special FD-Footnote-1299584 -Node: Special Network299658 -Node: Special Caveats300508 -Node: Close Files And Pipes301304 -Ref: Close Files And Pipes-Footnote-1308465 -Ref: Close Files And Pipes-Footnote-2308613 -Node: Output Summary308763 -Node: Output exercises309760 -Node: Expressions310440 -Node: Values311625 -Node: Constants312301 -Node: Scalar Constants312981 -Ref: Scalar Constants-Footnote-1313840 -Node: Nondecimal-numbers314090 -Node: Regexp Constants317090 -Node: Using Constant Regexps317565 -Node: Variables320637 -Node: Using Variables321292 -Node: Assignment Options323016 -Node: Conversion324891 -Node: Strings And Numbers325415 -Ref: Strings And Numbers-Footnote-1328477 -Node: Locale influences conversions328586 -Ref: table-locale-affects331303 -Node: All Operators331891 -Node: Arithmetic Ops332521 -Node: Concatenation335026 -Ref: Concatenation-Footnote-1337845 -Node: Assignment Ops337965 -Ref: table-assign-ops342948 -Node: Increment Ops344265 -Node: Truth Values and Conditions347703 -Node: Truth Values348786 -Node: Typing and Comparison349835 -Node: Variable Typing350628 -Node: Comparison Operators354280 -Ref: table-relational-ops354690 -Node: POSIX String Comparison358240 -Ref: POSIX String Comparison-Footnote-1359324 -Node: Boolean Ops359462 -Ref: Boolean Ops-Footnote-1363532 -Node: Conditional Exp363623 -Node: Function Calls365350 -Node: Precedence369230 -Node: Locales372899 -Node: Expressions Summary374530 -Node: Patterns and Actions377071 -Node: Pattern Overview378187 -Node: Regexp Patterns379864 -Node: Expression Patterns380407 -Node: Ranges384188 -Node: BEGIN/END387294 -Node: Using BEGIN/END388056 -Ref: Using BEGIN/END-Footnote-1390792 -Node: I/O And BEGIN/END390898 -Node: BEGINFILE/ENDFILE393183 -Node: Empty396114 -Node: Using Shell Variables396431 -Node: Action Overview398714 -Node: Statements401041 -Node: If Statement402889 -Node: While Statement404387 -Node: Do Statement406431 -Node: For Statement407587 -Node: Switch Statement410739 -Node: Break Statement413127 -Node: Continue Statement415182 -Node: Next Statement417021 -Node: Nextfile Statement419411 -Node: Exit Statement422066 -Node: Built-in Variables424470 -Node: User-modified425597 -Ref: User-modified-Footnote-1433286 -Node: Auto-set433348 -Ref: Auto-set-Footnote-1446267 -Ref: Auto-set-Footnote-2446472 -Node: ARGC and ARGV446528 -Node: Pattern Action Summary450432 -Node: Arrays452655 -Node: Array Basics454204 -Node: Array Intro455030 -Ref: figure-array-elements457003 -Node: Reference to Elements459410 -Node: Assigning Elements461789 -Node: Array Example462280 -Node: Scanning an Array464012 -Node: Controlling Scanning467027 -Ref: Controlling Scanning-Footnote-1472200 -Node: Delete472516 -Ref: Delete-Footnote-1475281 -Node: Numeric Array Subscripts475338 -Node: Uninitialized Subscripts477521 -Node: Multidimensional479146 -Node: Multiscanning482259 -Node: Arrays of Arrays483848 -Node: Arrays Summary488511 -Node: Functions490616 -Node: Built-in491489 -Node: Calling Built-in492567 -Node: Numeric Functions494555 -Ref: Numeric Functions-Footnote-1499391 -Ref: Numeric Functions-Footnote-2499748 -Ref: Numeric Functions-Footnote-3499796 -Node: String Functions500065 -Ref: String Functions-Footnote-1523076 -Ref: String Functions-Footnote-2523205 -Ref: String Functions-Footnote-3523453 -Node: Gory Details523540 -Ref: table-sub-escapes525327 -Ref: table-sub-proposed526847 -Ref: table-posix-sub528211 -Ref: table-gensub-escapes529751 -Ref: Gory Details-Footnote-1530927 -Node: I/O Functions531078 -Ref: I/O Functions-Footnote-1538201 -Node: Time Functions538348 -Ref: Time Functions-Footnote-1548812 -Ref: Time Functions-Footnote-2548880 -Ref: Time Functions-Footnote-3549038 -Ref: Time Functions-Footnote-4549149 -Ref: Time Functions-Footnote-5549261 -Ref: Time Functions-Footnote-6549488 -Node: Bitwise Functions549754 -Ref: table-bitwise-ops550316 -Ref: Bitwise Functions-Footnote-1554561 -Node: Type Functions554745 -Node: I18N Functions555887 -Node: User-defined557532 -Node: Definition Syntax558336 -Ref: Definition Syntax-Footnote-1563515 -Node: Function Example563584 -Ref: Function Example-Footnote-1566224 -Node: Function Caveats566246 -Node: Calling A Function566764 -Node: Variable Scope567719 -Node: Pass By Value/Reference570707 -Node: Return Statement574217 -Node: Dynamic Typing577201 -Node: Indirect Calls578130 -Node: Functions Summary587843 -Node: Library Functions590382 -Ref: Library Functions-Footnote-1594000 -Ref: Library Functions-Footnote-2594143 -Node: Library Names594314 -Ref: Library Names-Footnote-1597787 -Ref: Library Names-Footnote-2598007 -Node: General Functions598093 -Node: Strtonum Function599121 -Node: Assert Function601901 -Node: Round Function605227 -Node: Cliff Random Function606768 -Node: Ordinal Functions607784 -Ref: Ordinal Functions-Footnote-1610861 -Ref: Ordinal Functions-Footnote-2611113 -Node: Join Function611324 -Ref: Join Function-Footnote-1613095 -Node: Getlocaltime Function613295 -Node: Readfile Function617031 -Node: Data File Management618870 -Node: Filetrans Function619502 -Node: Rewind Function623571 -Node: File Checking625129 -Ref: File Checking-Footnote-1626261 -Node: Empty Files626462 -Node: Ignoring Assigns628441 -Node: Getopt Function629995 -Ref: Getopt Function-Footnote-1641298 -Node: Passwd Functions641501 -Ref: Passwd Functions-Footnote-1650480 -Node: Group Functions650568 -Ref: Group Functions-Footnote-1658509 -Node: Walking Arrays658722 -Node: Library Functions Summary660325 -Node: Library exercises661713 -Node: Sample Programs662993 -Node: Running Examples663763 -Node: Clones664491 -Node: Cut Program665715 -Node: Egrep Program675583 -Ref: Egrep Program-Footnote-1683554 -Node: Id Program683664 -Node: Split Program687328 -Ref: Split Program-Footnote-1690866 -Node: Tee Program690994 -Node: Uniq Program693801 -Node: Wc Program701231 -Ref: Wc Program-Footnote-1705496 -Node: Miscellaneous Programs705588 -Node: Dupword Program706801 -Node: Alarm Program708832 -Node: Translate Program713646 -Ref: Translate Program-Footnote-1718037 -Ref: Translate Program-Footnote-2718307 -Node: Labels Program718441 -Ref: Labels Program-Footnote-1721812 -Node: Word Sorting721896 -Node: History Sorting725939 -Node: Extract Program727775 -Node: Simple Sed735311 -Node: Igawk Program738373 -Ref: Igawk Program-Footnote-1752677 -Ref: Igawk Program-Footnote-2752878 -Node: Anagram Program753016 -Node: Signature Program756084 -Node: Programs Summary757331 -Node: Programs Exercises758546 -Node: Advanced Features762197 -Node: Nondecimal Data764145 -Node: Array Sorting765722 -Node: Controlling Array Traversal766419 -Node: Array Sorting Functions774699 -Ref: Array Sorting Functions-Footnote-1778606 -Node: Two-way I/O778800 -Ref: Two-way I/O-Footnote-1783744 -Ref: Two-way I/O-Footnote-2783923 -Node: TCP/IP Networking784005 -Node: Profiling786850 -Node: Advanced Features Summary794401 -Node: Internationalization796265 -Node: I18N and L10N797745 -Node: Explaining gettext798431 -Ref: Explaining gettext-Footnote-1803571 -Ref: Explaining gettext-Footnote-2803755 -Node: Programmer i18n803920 -Node: Translator i18n808145 -Node: String Extraction808939 -Ref: String Extraction-Footnote-1809900 -Node: Printf Ordering809986 -Ref: Printf Ordering-Footnote-1812768 -Node: I18N Portability812832 -Ref: I18N Portability-Footnote-1815281 -Node: I18N Example815344 -Ref: I18N Example-Footnote-1818066 -Node: Gawk I18N818138 -Node: I18N Summary818776 -Node: Debugger820115 -Node: Debugging821137 -Node: Debugging Concepts821578 -Node: Debugging Terms823434 -Node: Awk Debugging826031 -Node: Sample Debugging Session826923 -Node: Debugger Invocation827443 -Node: Finding The Bug828776 -Node: List of Debugger Commands835258 -Node: Breakpoint Control836590 -Node: Debugger Execution Control840254 -Node: Viewing And Changing Data843614 -Node: Execution Stack846972 -Node: Debugger Info848485 -Node: Miscellaneous Debugger Commands852479 -Node: Readline Support857663 -Node: Limitations858555 -Node: Debugging Summary860829 -Node: Arbitrary Precision Arithmetic861997 -Node: Computer Arithmetic863484 -Ref: Computer Arithmetic-Footnote-1867871 -Node: Math Definitions867928 -Ref: table-ieee-formats871217 -Ref: Math Definitions-Footnote-1871757 -Node: MPFR features871860 -Node: FP Math Caution873477 -Ref: FP Math Caution-Footnote-1874527 -Node: Inexactness of computations874896 -Node: Inexact representation875844 -Node: Comparing FP Values877199 -Node: Errors accumulate878163 -Node: Getting Accuracy879596 -Node: Try To Round882255 -Node: Setting precision883154 -Ref: table-predefined-precision-strings883836 -Node: Setting the rounding mode885629 -Ref: table-gawk-rounding-modes885993 -Ref: Setting the rounding mode-Footnote-1889447 -Node: Arbitrary Precision Integers889626 -Ref: Arbitrary Precision Integers-Footnote-1893399 -Node: POSIX Floating Point Problems893548 -Ref: POSIX Floating Point Problems-Footnote-1897424 -Node: Floating point summary897462 -Node: Dynamic Extensions899666 -Node: Extension Intro901218 -Node: Plugin License902483 -Node: Extension Mechanism Outline903168 -Ref: figure-load-extension903592 -Ref: figure-load-new-function905077 -Ref: figure-call-new-function906079 -Node: Extension API Description908063 -Node: Extension API Functions Introduction909513 -Node: General Data Types914380 -Ref: General Data Types-Footnote-1920073 -Node: Requesting Values920372 -Ref: table-value-types-returned921109 -Node: Memory Allocation Functions922067 -Ref: Memory Allocation Functions-Footnote-1924814 -Node: Constructor Functions924910 -Node: Registration Functions926668 -Node: Extension Functions927353 -Node: Exit Callback Functions929655 -Node: Extension Version String930903 -Node: Input Parsers931553 -Node: Output Wrappers941367 -Node: Two-way processors945883 -Node: Printing Messages948087 -Ref: Printing Messages-Footnote-1949164 -Node: Updating `ERRNO'949316 -Node: Accessing Parameters950055 -Node: Symbol Table Access951285 -Node: Symbol table by name951799 -Node: Symbol table by cookie953775 -Ref: Symbol table by cookie-Footnote-1957908 -Node: Cached values957971 -Ref: Cached values-Footnote-1961475 -Node: Array Manipulation961566 -Ref: Array Manipulation-Footnote-1962664 -Node: Array Data Types962703 -Ref: Array Data Types-Footnote-1965406 -Node: Array Functions965498 -Node: Flattening Arrays969372 -Node: Creating Arrays976224 -Node: Extension API Variables980955 -Node: Extension Versioning981591 -Node: Extension API Informational Variables983492 -Node: Extension API Boilerplate984578 -Node: Finding Extensions988382 -Node: Extension Example988942 -Node: Internal File Description989672 -Node: Internal File Ops993763 -Ref: Internal File Ops-Footnote-11005195 -Node: Using Internal File Ops1005335 -Ref: Using Internal File Ops-Footnote-11007682 -Node: Extension Samples1007950 -Node: Extension Sample File Functions1009474 -Node: Extension Sample Fnmatch1017042 -Node: Extension Sample Fork1018524 -Node: Extension Sample Inplace1019737 -Node: Extension Sample Ord1021412 -Node: Extension Sample Readdir1022248 -Ref: table-readdir-file-types1023104 -Node: Extension Sample Revout1023903 -Node: Extension Sample Rev2way1024494 -Node: Extension Sample Read write array1025235 -Node: Extension Sample Readfile1027114 -Node: Extension Sample API Tests1028214 -Node: Extension Sample Time1028739 -Node: gawkextlib1030054 -Node: Extension summary1032867 -Node: Extension Exercises1036560 -Node: Language History1037282 -Node: V7/SVR3.11038925 -Node: SVR41041245 -Node: POSIX1042687 -Node: BTL1044073 -Node: POSIX/GNU1044807 -Node: Feature History1050548 -Node: Common Extensions1063678 -Node: Ranges and Locales1064990 -Ref: Ranges and Locales-Footnote-11069607 -Ref: Ranges and Locales-Footnote-21069634 -Ref: Ranges and Locales-Footnote-31069868 -Node: Contributors1070089 -Node: History summary1075514 -Node: Installation1076883 -Node: Gawk Distribution1077834 -Node: Getting1078318 -Node: Extracting1079142 -Node: Distribution contents1080784 -Node: Unix Installation1086554 -Node: Quick Installation1087171 -Node: Additional Configuration Options1089613 -Node: Configuration Philosophy1091351 -Node: Non-Unix Installation1093702 -Node: PC Installation1094160 -Node: PC Binary Installation1095471 -Node: PC Compiling1097319 -Ref: PC Compiling-Footnote-11100318 -Node: PC Testing1100423 -Node: PC Using1101599 -Node: Cygwin1105751 -Node: MSYS1106560 -Node: VMS Installation1107074 -Node: VMS Compilation1107870 -Ref: VMS Compilation-Footnote-11109092 -Node: VMS Dynamic Extensions1109150 -Node: VMS Installation Details1110523 -Node: VMS Running1112775 -Node: VMS GNV1115609 -Node: VMS Old Gawk1116332 -Node: Bugs1116802 -Node: Other Versions1120806 -Node: Installation summary1127061 -Node: Notes1128117 -Node: Compatibility Mode1128982 -Node: Additions1129764 -Node: Accessing The Source1130689 -Node: Adding Code1132125 -Node: New Ports1138303 -Node: Derived Files1142784 -Ref: Derived Files-Footnote-11147865 -Ref: Derived Files-Footnote-21147899 -Ref: Derived Files-Footnote-31148495 -Node: Future Extensions1148609 -Node: Implementation Limitations1149215 -Node: Extension Design1150463 -Node: Old Extension Problems1151617 -Ref: Old Extension Problems-Footnote-11153134 -Node: Extension New Mechanism Goals1153191 -Ref: Extension New Mechanism Goals-Footnote-11156551 -Node: Extension Other Design Decisions1156740 -Node: Extension Future Growth1158846 -Node: Old Extension Mechanism1159682 -Node: Notes summary1161444 -Node: Basic Concepts1162630 -Node: Basic High Level1163311 -Ref: figure-general-flow1163583 -Ref: figure-process-flow1164182 -Ref: Basic High Level-Footnote-11167411 -Node: Basic Data Typing1167596 -Node: Glossary1170924 -Node: Copying1196076 -Node: GNU Free Documentation License1233632 -Node: Index1258768 +Node: Regexp Operators157888 +Ref: Regexp Operators-Footnote-1165368 +Ref: Regexp Operators-Footnote-2165515 +Node: Bracket Expressions165613 +Ref: table-char-classes167503 +Node: GNU Regexp Operators170443 +Node: Case-sensitivity174166 +Ref: Case-sensitivity-Footnote-1177058 +Ref: Case-sensitivity-Footnote-2177293 +Node: Leftmost Longest177401 +Node: Computed Regexps178602 +Node: Regexp Summary181974 +Node: Reading Files183443 +Node: Records185535 +Node: awk split records186278 +Node: gawk split records191136 +Ref: gawk split records-Footnote-1195657 +Node: Fields195694 +Ref: Fields-Footnote-1198658 +Node: Nonconstant Fields198744 +Ref: Nonconstant Fields-Footnote-1200974 +Node: Changing Fields201176 +Node: Field Separators207130 +Node: Default Field Splitting209832 +Node: Regexp Field Splitting210949 +Node: Single Character Fields214290 +Node: Command Line Field Separator215349 +Node: Full Line Fields218775 +Ref: Full Line Fields-Footnote-1219283 +Node: Field Splitting Summary219329 +Ref: Field Splitting Summary-Footnote-1222461 +Node: Constant Size222562 +Node: Splitting By Content227168 +Ref: Splitting By Content-Footnote-1231241 +Node: Multiple Line231281 +Ref: Multiple Line-Footnote-1237137 +Node: Getline237316 +Node: Plain Getline239532 +Node: Getline/Variable241627 +Node: Getline/File242774 +Node: Getline/Variable/File244158 +Ref: Getline/Variable/File-Footnote-1245757 +Node: Getline/Pipe245844 +Node: Getline/Variable/Pipe248543 +Node: Getline/Coprocess249650 +Node: Getline/Variable/Coprocess250902 +Node: Getline Notes251639 +Node: Getline Summary254443 +Ref: table-getline-variants254851 +Node: Read Timeout255763 +Ref: Read Timeout-Footnote-1259590 +Node: Command-line directories259648 +Node: Input Summary260552 +Node: Input Exercises263689 +Node: Printing264422 +Node: Print266144 +Node: Print Examples267485 +Node: Output Separators270264 +Node: OFMT272280 +Node: Printf273638 +Node: Basic Printf274544 +Node: Control Letters276083 +Node: Format Modifiers280074 +Node: Printf Examples286101 +Node: Redirection288565 +Node: Special Files295537 +Node: Special FD296070 +Ref: Special FD-Footnote-1299667 +Node: Special Network299741 +Node: Special Caveats300591 +Node: Close Files And Pipes301387 +Ref: Close Files And Pipes-Footnote-1308548 +Ref: Close Files And Pipes-Footnote-2308696 +Node: Output Summary308846 +Node: Output exercises309843 +Node: Expressions310523 +Node: Values311708 +Node: Constants312384 +Node: Scalar Constants313064 +Ref: Scalar Constants-Footnote-1313923 +Node: Nondecimal-numbers314173 +Node: Regexp Constants317173 +Node: Using Constant Regexps317648 +Node: Variables320720 +Node: Using Variables321375 +Node: Assignment Options323099 +Node: Conversion324974 +Node: Strings And Numbers325498 +Ref: Strings And Numbers-Footnote-1328560 +Node: Locale influences conversions328669 +Ref: table-locale-affects331386 +Node: All Operators331974 +Node: Arithmetic Ops332604 +Node: Concatenation335109 +Ref: Concatenation-Footnote-1337928 +Node: Assignment Ops338048 +Ref: table-assign-ops343031 +Node: Increment Ops344348 +Node: Truth Values and Conditions347786 +Node: Truth Values348869 +Node: Typing and Comparison349918 +Node: Variable Typing350711 +Node: Comparison Operators354363 +Ref: table-relational-ops354773 +Node: POSIX String Comparison358323 +Ref: POSIX String Comparison-Footnote-1359407 +Node: Boolean Ops359545 +Ref: Boolean Ops-Footnote-1363615 +Node: Conditional Exp363706 +Node: Function Calls365433 +Node: Precedence369313 +Node: Locales372982 +Node: Expressions Summary374613 +Node: Patterns and Actions377154 +Node: Pattern Overview378270 +Node: Regexp Patterns379947 +Node: Expression Patterns380490 +Node: Ranges384271 +Node: BEGIN/END387377 +Node: Using BEGIN/END388139 +Ref: Using BEGIN/END-Footnote-1390875 +Node: I/O And BEGIN/END390981 +Node: BEGINFILE/ENDFILE393266 +Node: Empty396197 +Node: Using Shell Variables396514 +Node: Action Overview398797 +Node: Statements401124 +Node: If Statement402972 +Node: While Statement404470 +Node: Do Statement406514 +Node: For Statement407670 +Node: Switch Statement410822 +Node: Break Statement413210 +Node: Continue Statement415265 +Node: Next Statement417104 +Node: Nextfile Statement419494 +Node: Exit Statement422149 +Node: Built-in Variables424553 +Node: User-modified425680 +Ref: User-modified-Footnote-1433369 +Node: Auto-set433431 +Ref: Auto-set-Footnote-1446350 +Ref: Auto-set-Footnote-2446555 +Node: ARGC and ARGV446611 +Node: Pattern Action Summary450515 +Node: Arrays452738 +Node: Array Basics454287 +Node: Array Intro455113 +Ref: figure-array-elements457086 +Node: Reference to Elements459493 +Node: Assigning Elements461872 +Node: Array Example462363 +Node: Scanning an Array464095 +Node: Controlling Scanning467110 +Ref: Controlling Scanning-Footnote-1472283 +Node: Delete472599 +Ref: Delete-Footnote-1475364 +Node: Numeric Array Subscripts475421 +Node: Uninitialized Subscripts477604 +Node: Multidimensional479229 +Node: Multiscanning482342 +Node: Arrays of Arrays483931 +Node: Arrays Summary488594 +Node: Functions490699 +Node: Built-in491572 +Node: Calling Built-in492650 +Node: Numeric Functions494638 +Ref: Numeric Functions-Footnote-1499474 +Ref: Numeric Functions-Footnote-2499831 +Ref: Numeric Functions-Footnote-3499879 +Node: String Functions500148 +Ref: String Functions-Footnote-1523159 +Ref: String Functions-Footnote-2523288 +Ref: String Functions-Footnote-3523536 +Node: Gory Details523623 +Ref: table-sub-escapes525410 +Ref: table-sub-proposed526930 +Ref: table-posix-sub528294 +Ref: table-gensub-escapes529834 +Ref: Gory Details-Footnote-1531010 +Node: I/O Functions531161 +Ref: I/O Functions-Footnote-1538284 +Node: Time Functions538431 +Ref: Time Functions-Footnote-1548895 +Ref: Time Functions-Footnote-2548963 +Ref: Time Functions-Footnote-3549121 +Ref: Time Functions-Footnote-4549232 +Ref: Time Functions-Footnote-5549344 +Ref: Time Functions-Footnote-6549571 +Node: Bitwise Functions549837 +Ref: table-bitwise-ops550399 +Ref: Bitwise Functions-Footnote-1554644 +Node: Type Functions554828 +Node: I18N Functions555970 +Node: User-defined557615 +Node: Definition Syntax558419 +Ref: Definition Syntax-Footnote-1563598 +Node: Function Example563667 +Ref: Function Example-Footnote-1566307 +Node: Function Caveats566329 +Node: Calling A Function566847 +Node: Variable Scope567802 +Node: Pass By Value/Reference570790 +Node: Return Statement574300 +Node: Dynamic Typing577284 +Node: Indirect Calls578213 +Node: Functions Summary587926 +Node: Library Functions590465 +Ref: Library Functions-Footnote-1594083 +Ref: Library Functions-Footnote-2594226 +Node: Library Names594397 +Ref: Library Names-Footnote-1597870 +Ref: Library Names-Footnote-2598090 +Node: General Functions598176 +Node: Strtonum Function599204 +Node: Assert Function601984 +Node: Round Function605310 +Node: Cliff Random Function606851 +Node: Ordinal Functions607867 +Ref: Ordinal Functions-Footnote-1610944 +Ref: Ordinal Functions-Footnote-2611196 +Node: Join Function611407 +Ref: Join Function-Footnote-1613178 +Node: Getlocaltime Function613378 +Node: Readfile Function617114 +Node: Data File Management618953 +Node: Filetrans Function619585 +Node: Rewind Function623654 +Node: File Checking625212 +Ref: File Checking-Footnote-1626344 +Node: Empty Files626545 +Node: Ignoring Assigns628524 +Node: Getopt Function630078 +Ref: Getopt Function-Footnote-1641381 +Node: Passwd Functions641584 +Ref: Passwd Functions-Footnote-1650563 +Node: Group Functions650651 +Ref: Group Functions-Footnote-1658592 +Node: Walking Arrays658805 +Node: Library Functions Summary660408 +Node: Library exercises661796 +Node: Sample Programs663076 +Node: Running Examples663846 +Node: Clones664574 +Node: Cut Program665798 +Node: Egrep Program675666 +Ref: Egrep Program-Footnote-1683637 +Node: Id Program683747 +Node: Split Program687411 +Ref: Split Program-Footnote-1690949 +Node: Tee Program691077 +Node: Uniq Program693884 +Node: Wc Program701314 +Ref: Wc Program-Footnote-1705579 +Node: Miscellaneous Programs705671 +Node: Dupword Program706884 +Node: Alarm Program708915 +Node: Translate Program713729 +Ref: Translate Program-Footnote-1718120 +Ref: Translate Program-Footnote-2718390 +Node: Labels Program718524 +Ref: Labels Program-Footnote-1721895 +Node: Word Sorting721979 +Node: History Sorting726022 +Node: Extract Program727858 +Node: Simple Sed735394 +Node: Igawk Program738456 +Ref: Igawk Program-Footnote-1752760 +Ref: Igawk Program-Footnote-2752961 +Node: Anagram Program753099 +Node: Signature Program756167 +Node: Programs Summary757414 +Node: Programs Exercises758629 +Node: Advanced Features762280 +Node: Nondecimal Data764228 +Node: Array Sorting765805 +Node: Controlling Array Traversal766502 +Node: Array Sorting Functions774782 +Ref: Array Sorting Functions-Footnote-1778689 +Node: Two-way I/O778883 +Ref: Two-way I/O-Footnote-1783827 +Ref: Two-way I/O-Footnote-2784006 +Node: TCP/IP Networking784088 +Node: Profiling786933 +Node: Advanced Features Summary794484 +Node: Internationalization796348 +Node: I18N and L10N797828 +Node: Explaining gettext798514 +Ref: Explaining gettext-Footnote-1803654 +Ref: Explaining gettext-Footnote-2803838 +Node: Programmer i18n804003 +Node: Translator i18n808228 +Node: String Extraction809022 +Ref: String Extraction-Footnote-1809983 +Node: Printf Ordering810069 +Ref: Printf Ordering-Footnote-1812851 +Node: I18N Portability812915 +Ref: I18N Portability-Footnote-1815364 +Node: I18N Example815427 +Ref: I18N Example-Footnote-1818149 +Node: Gawk I18N818221 +Node: I18N Summary818859 +Node: Debugger820198 +Node: Debugging821220 +Node: Debugging Concepts821661 +Node: Debugging Terms823517 +Node: Awk Debugging826114 +Node: Sample Debugging Session827006 +Node: Debugger Invocation827526 +Node: Finding The Bug828859 +Node: List of Debugger Commands835341 +Node: Breakpoint Control836673 +Node: Debugger Execution Control840337 +Node: Viewing And Changing Data843697 +Node: Execution Stack847055 +Node: Debugger Info848568 +Node: Miscellaneous Debugger Commands852562 +Node: Readline Support857746 +Node: Limitations858638 +Node: Debugging Summary860912 +Node: Arbitrary Precision Arithmetic862080 +Node: Computer Arithmetic863567 +Ref: Computer Arithmetic-Footnote-1867954 +Node: Math Definitions868011 +Ref: table-ieee-formats871300 +Ref: Math Definitions-Footnote-1871840 +Node: MPFR features871943 +Node: FP Math Caution873560 +Ref: FP Math Caution-Footnote-1874610 +Node: Inexactness of computations874979 +Node: Inexact representation875927 +Node: Comparing FP Values877282 +Node: Errors accumulate878246 +Node: Getting Accuracy879679 +Node: Try To Round882338 +Node: Setting precision883237 +Ref: table-predefined-precision-strings883919 +Node: Setting the rounding mode885712 +Ref: table-gawk-rounding-modes886076 +Ref: Setting the rounding mode-Footnote-1889530 +Node: Arbitrary Precision Integers889709 +Ref: Arbitrary Precision Integers-Footnote-1893482 +Node: POSIX Floating Point Problems893631 +Ref: POSIX Floating Point Problems-Footnote-1897507 +Node: Floating point summary897545 +Node: Dynamic Extensions899749 +Node: Extension Intro901301 +Node: Plugin License902566 +Node: Extension Mechanism Outline903251 +Ref: figure-load-extension903675 +Ref: figure-load-new-function905160 +Ref: figure-call-new-function906162 +Node: Extension API Description908146 +Node: Extension API Functions Introduction909596 +Node: General Data Types914463 +Ref: General Data Types-Footnote-1920156 +Node: Requesting Values920455 +Ref: table-value-types-returned921192 +Node: Memory Allocation Functions922150 +Ref: Memory Allocation Functions-Footnote-1924897 +Node: Constructor Functions924993 +Node: Registration Functions926751 +Node: Extension Functions927436 +Node: Exit Callback Functions929738 +Node: Extension Version String930986 +Node: Input Parsers931636 +Node: Output Wrappers941450 +Node: Two-way processors945966 +Node: Printing Messages948170 +Ref: Printing Messages-Footnote-1949247 +Node: Updating `ERRNO'949399 +Node: Accessing Parameters950138 +Node: Symbol Table Access951368 +Node: Symbol table by name951882 +Node: Symbol table by cookie953858 +Ref: Symbol table by cookie-Footnote-1957991 +Node: Cached values958054 +Ref: Cached values-Footnote-1961558 +Node: Array Manipulation961649 +Ref: Array Manipulation-Footnote-1962747 +Node: Array Data Types962786 +Ref: Array Data Types-Footnote-1965489 +Node: Array Functions965581 +Node: Flattening Arrays969455 +Node: Creating Arrays976307 +Node: Extension API Variables981038 +Node: Extension Versioning981674 +Node: Extension API Informational Variables983575 +Node: Extension API Boilerplate984661 +Node: Finding Extensions988465 +Node: Extension Example989025 +Node: Internal File Description989755 +Node: Internal File Ops993846 +Ref: Internal File Ops-Footnote-11005278 +Node: Using Internal File Ops1005418 +Ref: Using Internal File Ops-Footnote-11007765 +Node: Extension Samples1008033 +Node: Extension Sample File Functions1009557 +Node: Extension Sample Fnmatch1017125 +Node: Extension Sample Fork1018607 +Node: Extension Sample Inplace1019820 +Node: Extension Sample Ord1021495 +Node: Extension Sample Readdir1022331 +Ref: table-readdir-file-types1023187 +Node: Extension Sample Revout1023986 +Node: Extension Sample Rev2way1024577 +Node: Extension Sample Read write array1025318 +Node: Extension Sample Readfile1027197 +Node: Extension Sample API Tests1028297 +Node: Extension Sample Time1028822 +Node: gawkextlib1030137 +Node: Extension summary1032950 +Node: Extension Exercises1036643 +Node: Language History1037365 +Node: V7/SVR3.11039008 +Node: SVR41041328 +Node: POSIX1042770 +Node: BTL1044156 +Node: POSIX/GNU1044890 +Node: Feature History1050631 +Node: Common Extensions1063761 +Node: Ranges and Locales1065073 +Ref: Ranges and Locales-Footnote-11069690 +Ref: Ranges and Locales-Footnote-21069717 +Ref: Ranges and Locales-Footnote-31069951 +Node: Contributors1070172 +Node: History summary1075597 +Node: Installation1076966 +Node: Gawk Distribution1077917 +Node: Getting1078401 +Node: Extracting1079225 +Node: Distribution contents1080867 +Node: Unix Installation1086637 +Node: Quick Installation1087254 +Node: Additional Configuration Options1089696 +Node: Configuration Philosophy1091434 +Node: Non-Unix Installation1093785 +Node: PC Installation1094243 +Node: PC Binary Installation1095554 +Node: PC Compiling1097402 +Ref: PC Compiling-Footnote-11100401 +Node: PC Testing1100506 +Node: PC Using1101682 +Node: Cygwin1105834 +Node: MSYS1106643 +Node: VMS Installation1107157 +Node: VMS Compilation1107953 +Ref: VMS Compilation-Footnote-11109175 +Node: VMS Dynamic Extensions1109233 +Node: VMS Installation Details1110606 +Node: VMS Running1112858 +Node: VMS GNV1115692 +Node: VMS Old Gawk1116415 +Node: Bugs1116885 +Node: Other Versions1120889 +Node: Installation summary1127144 +Node: Notes1128200 +Node: Compatibility Mode1129065 +Node: Additions1129847 +Node: Accessing The Source1130772 +Node: Adding Code1132208 +Node: New Ports1138386 +Node: Derived Files1142867 +Ref: Derived Files-Footnote-11147948 +Ref: Derived Files-Footnote-21147982 +Ref: Derived Files-Footnote-31148578 +Node: Future Extensions1148692 +Node: Implementation Limitations1149298 +Node: Extension Design1150546 +Node: Old Extension Problems1151700 +Ref: Old Extension Problems-Footnote-11153217 +Node: Extension New Mechanism Goals1153274 +Ref: Extension New Mechanism Goals-Footnote-11156634 +Node: Extension Other Design Decisions1156823 +Node: Extension Future Growth1158929 +Node: Old Extension Mechanism1159765 +Node: Notes summary1161527 +Node: Basic Concepts1162713 +Node: Basic High Level1163394 +Ref: figure-general-flow1163666 +Ref: figure-process-flow1164265 +Ref: Basic High Level-Footnote-11167494 +Node: Basic Data Typing1167679 +Node: Glossary1171007 +Node: Copying1196159 +Node: GNU Free Documentation License1233715 +Node: Index1258851  End Tag Table -- cgit v1.2.3 From f215e2b823693103796cd71493b90300f54adba4 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 22 Aug 2014 16:02:18 +0300 Subject: More reviewer comments. --- doc/gawk.info | 1304 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 662 insertions(+), 642 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 7c97a5c9..39da4897 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -1102,6 +1102,10 @@ key and another key, at the same time. For example, a `Ctrl-d' is typed by first pressing and holding the `CONTROL' key, next pressing the `d' key and finally releasing both keys. + For the sake of brevity, throughout this Info file, we refer to +Brian Kernighan's version of `awk' as "BWK `awk'." (*Note Other +Versions::, for information on his and other versions.) + Dark Corners ------------ @@ -1305,8 +1309,8 @@ have done nearly as good a job on either `gawk' or its documentation without his help. Brian is in a class by himself as a programmer and technical author. -I have to thank him (yet again) for his ongoing friendship and the -role-model he has been for me for close to 30 years! Having him as a +I have to thank him (yet again) for his ongoing friendship and the role +model he has been for me for close to 30 years! Having him as a reviewer is an exciting privilege. It has also been extremely humbling... @@ -1503,8 +1507,8 @@ tell `awk' to use that file for its program, you type: awk -f SOURCE-FILE INPUT-FILE1 INPUT-FILE2 ... The `-f' instructs the `awk' utility to get the `awk' program from -the file SOURCE-FILE. Any file name can be used for SOURCE-FILE. For -example, you could put the program: +the file SOURCE-FILE (*note Options::). Any file name can be used for +SOURCE-FILE. For example, you could put the program: BEGIN { print "Don't Panic!" } @@ -1582,8 +1586,8 @@ the name of your script (`advice'). (d.c.) Don't rely on the value of and commercial Unix systems. (2) The line beginning with `#!' lists the full file name of an -interpreter to run and an optional initial command-line argument to -pass to that interpreter. The operating system then runs the +interpreter to run and a single optional initial command-line argument +to pass to that interpreter. The operating system then runs the interpreter with the given argument and the full argument list of the executed program. The first argument in the list is the full file name of the `awk' program. The rest of the argument list contains either @@ -2240,8 +2244,8 @@ retargetable assembler for eight-bit microprocessors (*note Glossary::, for more information), and a microcode assembler for a special-purpose Prolog computer. While the original `awk''s capabilities were strained by tasks of such complexity, modern versions are more capable. Even -Brian Kernighan's version of `awk' has fewer predefined limits, and -those that it has are much larger than they used to be. +BWK `awk' has fewer predefined limits, and those that it has are much +larger than they used to be. If you find yourself writing `awk' scripts of more than, say, a few hundred lines, you might consider using a different programming @@ -2416,9 +2420,9 @@ The following list describes options mandated by the POSIX standard: `-c' `--traditional' Specify "compatibility mode", in which the GNU extensions to the - `awk' language are disabled, so that `gawk' behaves just like - Brian Kernighan's version `awk'. *Note POSIX/GNU::, which - summarizes the extensions. Also see *note Compatibility Mode::. + `awk' language are disabled, so that `gawk' behaves just like BWK + `awk'. *Note POSIX/GNU::, which summarizes the extensions. Also + see *note Compatibility Mode::. `-C' `--copyright' @@ -3401,12 +3405,12 @@ is not one of the characters previously listed, POSIX `awk' purposely leaves what happens as undefined. There are two choices: Strip the backslash out - This is what Brian Kernighan's `awk' and `gawk' both do. For - example, `"a\qc"' is the same as `"aqc"'. (Because this is such - an easy bug both to introduce and to miss, `gawk' warns you about - it.) Consider `FS = "[ \t]+\|[ \t]+"' to use vertical bars - surrounded by whitespace as the field separator. There should be - two backslashes in the string: `FS = "[ \t]+\\|[ \t]+"'.) + This is what BWK `awk' and `gawk' both do. For example, `"a\qc"' + is the same as `"aqc"'. (Because this is such an easy bug both to + introduce and to miss, `gawk' warns you about it.) Consider `FS = + "[ \t]+\|[ \t]+"' to use vertical bars surrounded by whitespace as + the field separator. There should be two backslashes in the + string: `FS = "[ \t]+\\|[ \t]+"'.) Leave the backslash alone Some other `awk' implementations do this. In such @@ -3794,9 +3798,9 @@ No options Traditional Unix `awk' regexps are matched. The GNU operators are not special, and interval expressions are not available. The POSIX character classes (`[[:alnum:]]', etc.) are supported, as - Brian Kernighan's `awk' does support them. Characters described - by octal and hexadecimal escape sequences are treated literally, - even if they represent regexp metacharacters. + BWK `awk' does support them. Characters described by octal and + hexadecimal escape sequences are treated literally, even if they + represent regexp metacharacters. `--re-interval' Allow interval expressions in regexps, if `--traditional' has been @@ -4740,9 +4744,8 @@ field separator a new string? It turns out that different `awk' versions answer this question differently, and you should not rely on any specific behavior in your programs. (d.c.) - As a point of information, Brian Kernighan's `awk' allows `^' to -match only at the beginning of the record. `gawk' also works this way. -For example: + As a point of information, BWK `awk' allows `^' to match only at the +beginning of the record. `gawk' also works this way. For example: $ echo 'xxAA xxBxx C' | > gawk -F '(^x+)|( +)' '{ for (i = 1; i <= NF; i++) @@ -5599,10 +5602,10 @@ all `awk' implementations. NOTE: Unfortunately, `gawk' has not been consistent in its treatment of a construct like `"echo " "date" | getline'. Most versions, including the current version, treat it at as `("echo " - "date") | getline'. (This how Brian Kernighan's `awk' behaves.) - Some versions changed and treated it as `"echo " ("date" | - getline)'. (This is how `mawk' behaves.) In short, _always_ use - explicit parentheses, and then you won't have to worry. + "date") | getline'. (This how BWK `awk' behaves.) Some versions + changed and treated it as `"echo " ("date" | getline)'. (This is + how `mawk' behaves.) In short, _always_ use explicit parentheses, + and then you won't have to worry.  File: gawk.info, Node: Getline/Variable/Pipe, Next: Getline/Coprocess, Prev: Getline/Pipe, Up: Getline @@ -6039,6 +6042,10 @@ you forget to use the double-quote characters, your text is taken as an `awk' expression, and you will probably get an error. Keep in mind that a space is printed between any two items. + Note that the `print' statement is a statement and not an +expression--you can't use it the pattern part of a pattern-action +statement, for example. +  File: gawk.info, Node: Print Examples, Next: Output Separators, Prev: Print, Up: Printing @@ -7820,8 +7827,8 @@ you'll get. ---------- Footnotes ---------- - (1) It happens that Brian Kernighan's `awk', `gawk' and `mawk' all -"get it right," but you should not rely on this. + (1) It happens that BWK `awk', `gawk' and `mawk' all "get it right," +but you should not rely on this.  File: gawk.info, Node: Assignment Ops, Next: Increment Ops, Prev: Concatenation, Up: All Operators @@ -7985,8 +7992,8 @@ A workaround is: awk '/[=]=/' /dev/null - `gawk' does not have this problem; Brian Kernighan's `awk' and -`mawk' also do not (*note Other Versions::). + `gawk' does not have this problem; BWK `awk' and `mawk' also do not +(*note Other Versions::).  File: gawk.info, Node: Increment Ops, Prev: Assignment Ops, Up: All Operators @@ -9133,8 +9140,7 @@ number of fields from the last input record. Most probably due to an oversight, the standard does not say that `$0' is also preserved, although logically one would think that it should be. In fact, `gawk' does preserve the value of `$0' for use in `END' rules. Be aware, -however, that Brian Kernighan's `awk', and possibly other -implementations, do not. +however, that BWK `awk', and possibly other implementations, do not. The third point follows from the first two. The meaning of `print' inside a `BEGIN' or `END' rule is the same as always: `print $0'. If @@ -9702,8 +9708,8 @@ statement. This is discussed in *note Switch Statement::. loop or `switch'. However, although it was never documented, historical implementations of `awk' treated the `break' statement outside of a loop as if it were a `next' statement (*note Next -Statement::). (d.c.) Recent versions of Brian Kernighan's `awk' no -longer allow this usage, nor does `gawk'. +Statement::). (d.c.) Recent versions of BWK `awk' no longer allow +this usage, nor does `gawk'.  File: gawk.info, Node: Continue Statement, Next: Next Statement, Prev: Break Statement, Up: Statements @@ -9754,8 +9760,8 @@ This program loops forever once `x' reaches 5, since the increment body of a loop. Historical versions of `awk' treated a `continue' statement outside a loop the same way they treated a `break' statement outside a loop: as if it were a `next' statement (*note Next -Statement::). (d.c.) Recent versions of Brian Kernighan's `awk' no -longer work this way, nor does `gawk'. +Statement::). (d.c.) Recent versions of BWK `awk' no longer work this +way, nor does `gawk'.  File: gawk.info, Node: Next Statement, Next: Nextfile Statement, Prev: Continue Statement, Up: Statements @@ -9857,12 +9863,12 @@ listed in `ARGV'. standard. See the Austin Group website (http://austingroupbugs.net/view.php?id=607). - The current version of the Brian Kernighan's `awk', and `mawk' -(*note Other Versions::) also support `nextfile'. However, they don't -allow the `nextfile' statement inside function bodies (*note -User-defined::). `gawk' does; a `nextfile' inside a function body -reads the next record and starts processing it with the first rule in -the program, just as any other `nextfile' statement. + The current version of BWK `awk', and `mawk' (*note Other +Versions::) also support `nextfile'. However, they don't allow the +`nextfile' statement inside function bodies (*note User-defined::). +`gawk' does; a `nextfile' inside a function body reads the next record +and starts processing it with the first rule in the program, just as +any other `nextfile' statement.  File: gawk.info, Node: Exit Statement, Prev: Nextfile Statement, Up: Statements @@ -10960,7 +10966,7 @@ all `awk' versions do so. Consider this program, named `loopcheck.awk': -| a -| is - Contrast this to Brian Kernighan's `awk': + Contrast this to BWK `awk': $ nawk -f loopcheck.awk -| loop @@ -11166,9 +11172,9 @@ at a time. `gawk' extension. As of September, 2012, it was accepted for inclusion into the POSIX standard. See the Austin Group website (http://austingroupbugs.net/view.php?id=544). This form of the - `delete' statement is also supported by Brian Kernighan's `awk' - and `mawk', as well as by a number of other implementations (*note - Other Versions::). + `delete' statement is also supported by BWK `awk' and `mawk', as + well as by a number of other implementations (*note Other + Versions::). The following statement provides a portable but nonobvious way to clear out an array:(1) @@ -12292,11 +12298,11 @@ Options::): remaining in the string, counting from character START. If START is less than one, `substr()' treats it as if it was one. - (POSIX doesn't specify what to do in this case: Brian Kernighan's - `awk' acts this way, and therefore `gawk' does too.) If START is - greater than the number of characters in the string, `substr()' - returns the null string. Similarly, if LENGTH is present but less - than or equal to zero, the null string is returned. + (POSIX doesn't specify what to do in this case: BWK `awk' acts + this way, and therefore `gawk' does too.) If START is greater + than the number of characters in the string, `substr()' returns + the null string. Similarly, if LENGTH is present but less than or + equal to zero, the null string is returned. The string returned by `substr()' _cannot_ be assigned. Thus, it is a mistake to attempt to change a portion of a string, as shown @@ -12370,9 +12376,9 @@ come after a backslash. At the lexical level, it looks for the escape sequences listed in *note Escape Sequences::. Thus, for every `\' that `awk' processes at the runtime level, you must type two backslashes at the lexical level. When a character that is not valid for an escape -sequence follows the `\', Brian Kernighan's `awk' and `gawk' both -simply remove the initial `\' and put the next character into the -string. Thus, for example, `"a\qb"' is treated as `"aqb"'. +sequence follows the `\', BWK `awk' and `gawk' both simply remove the +initial `\' and put the next character into the string. Thus, for +example, `"a\qb"' is treated as `"aqb"'. At the runtime level, the various functions handle sequences of `\' and `&' differently. The situation is (sadly) somewhat complex. @@ -12547,10 +12553,10 @@ parameters are enclosed in square brackets ([ ]): function--`gawk' also buffers its output and the `fflush()' function forces `gawk' to flush its buffers. - `fflush()' was added to Brian Kernighan's `awk' in April of 1992. - For two decades, it was not part of the POSIX standard. As of - December, 2012, it was accepted for inclusion into the POSIX - standard. See the Austin Group website + `fflush()' was added to BWK `awk' in April of 1992. For two + decades, it was not part of the POSIX standard. As of December, + 2012, it was accepted for inclusion into the POSIX standard. See + the Austin Group website (http://austingroupbugs.net/view.php?id=634). POSIX standardizes `fflush()' as follows: If there is no argument, @@ -19814,9 +19820,9 @@ are: `LC_CTYPE' Character-type information (alphabetic, digit, upper- or - lowercase, and so on). This information is accessed via the POSIX - character classes in regular expressions, such as `/[[:alnum:]]/' - (*note Regexp Operators::). + lowercase, and so on) as well as character encoding. This + information is accessed via the POSIX character classes in regular + expressions, such as `/[[:alnum:]]/' (*note Regexp Operators::). `LC_MONETARY' Monetary information, such as the currency symbol, and whether the @@ -19826,10 +19832,6 @@ are: Numeric information, such as which characters to use for the decimal point and the thousands separator.(2) -`LC_RESPONSE' - Response information, such as how "yes" and "no" appear in the - local language, and possibly other information as well. - `LC_TIME' Time- and date-related information, such as 12- or 24-hour clock, month printed before or after the day in a date, local month @@ -19926,16 +19928,27 @@ outlined in *note Explaining gettext::, like so: printf(_"Number of users is %d\n", nusers) 3. If you are creating strings dynamically, you can still translate - them, using the `dcgettext()' built-in function: + them, using the `dcgettext()' built-in function:(1) - message = nusers " users logged in" - message = dcgettext(message, "adminprog") - print message + if (groggy) + message = dcgettext("%d customers disturbing me\n", "adminprog") + else + message = dcgettext("enjoying %d customers\n", "adminprog") + printf(message, ncustomers) Here, the call to `dcgettext()' supplies a different text domain (`"adminprog"') in which to find the message, but it uses the default `"LC_MESSAGES"' category. + The previous example only works if `ncustomers' is greater than + one. This example would be better done with `dcngettext()': + + if (groggy) + message = dcngettext("%d customer disturbing me\n", "%d customers disturbing me\n", "adminprog") + else + message = dcngettext("enjoying %d customer\n", "enjoying %d customers\n", "adminprog") + printf(message, ncustomers) + 4. During development, you might want to put the `.gmo' file in a private directory for testing. This is done with the `bindtextdomain()' built-in function: @@ -19955,6 +19968,10 @@ outlined in *note Explaining gettext::, like so: *Note I18N Example::, for an example program showing the steps to create and use translations from `awk'. + ---------- Footnotes ---------- + + (1) Thanks to Bruno Haible for this example. +  File: gawk.info, Node: Translator i18n, Next: I18N Example, Prev: Programmer i18n, Up: Internationalization @@ -19994,8 +20011,11 @@ Instead, it parses it as usual and prints all marked strings to standard output in the format of a GNU `gettext' Portable Object file. Also included in the output are any constant strings that appear as the first argument to `dcgettext()' or as the first and second argument to -`dcngettext()'.(1) *Note I18N Example::, for the full list of steps to -go through to create and test translations for `guide'. +`dcngettext()'.(1) You should distribute the generated `.pot' file with +your `awk' program; translators will eventually use it to provide you +translations that you can also then distribute. *Note I18N Example::, +for the full list of steps to go through to create and test +translations for `guide'. ---------- Footnotes ---------- @@ -20212,8 +20232,7 @@ file to machine-readable `.mo' file. By default, `msgfmt' creates a file named `messages'. This file must be renamed and placed in the proper directory so that `gawk' can find it: - $ msgfmt guide-mellow.po - $ mv messages en_US.UTF-8/LC_MESSAGES/guide.mo + $ msgfmt guide-mellow.po -o en_US.UTF-8/LC_MESSAGES/guide.mo Finally, we run the program to test it: @@ -26048,8 +26067,8 @@ the current version of `gawk'. - The `bindtextdomain()', `dcgettext()' and `dcngettext()' functions for internationalization (*note Programmer i18n::). - - The `fflush()' function from Brian Kernighan's version of - `awk' (*note I/O Functions::). + - The `fflush()' function from BWK `awk' (*note I/O + Functions::). - The `gensub()', `patsplit()', and `strtonum()' functions for more powerful text manipulation (*note String Functions::). @@ -26203,8 +26222,8 @@ in POSIX `awk', in the order they were added to `gawk'. * The `next file' statement became `nextfile' (*note Nextfile Statement::). - * The `fflush()' function from Brian Kernighan's `awk' (then at Bell - Laboratories; *note I/O Functions::). + * The `fflush()' function from BWK `awk' (then at Bell Laboratories; + *note I/O Functions::). * New command-line options: @@ -26212,9 +26231,9 @@ in POSIX `awk', in the order they were added to `gawk'. available in the original Version 7 Unix version of `awk' (*note V7/SVR3.1::). - - The `-m' option from Brian Kernighan's `awk'. (He was still - at Bell Laboratories at the time.) This was later removed - from both his `awk' and from `gawk'. + - The `-m' option from BWK `awk'. (Brian was still at Bell + Laboratories at the time.) This was later removed from both + his `awk' and from `gawk'. - The `--re-interval' option to provide interval expressions in regexps (*note Regexp Operators::). @@ -26374,9 +26393,9 @@ in POSIX `awk', in the order they were added to `gawk'. * An optional third argument to `asort()' and `asorti()', specifying how to sort (*note String Functions::). - * The behavior of `fflush()' changed to match Brian Kernighan's `awk' - and for POSIX; now both `fflush()' and `fflush("")' flush all open - output redirections (*note I/O Functions::). + * The behavior of `fflush()' changed to match BWK `awk' and for + POSIX; now both `fflush()' and `fflush("")' flush all open output + redirections (*note I/O Functions::). * The `isarray()' function which distinguishes if an item is an array or not, to make it possible to traverse arrays of arrays (*note @@ -27984,11 +28003,11 @@ Unix `awk' since approximately 2003. `pawk' - Nelson H.F. Beebe at the University of Utah has modified Brian - Kernighan's `awk' to provide timing and profiling information. It - is different from `gawk' with the `--profile' option. (*note - Profiling::), in that it uses CPU-based profiling, not line-count - profiling. You may find it at either + Nelson H.F. Beebe at the University of Utah has modified BWK `awk' + to provide timing and profiling information. It is different from + `gawk' with the `--profile' option. (*note Profiling::), in that + it uses CPU-based profiling, not line-count profiling. You may + find it at either `ftp://ftp.math.utah.edu/pub/pawk/pawk-20030606.tar.gz' or `http://www.math.utah.edu/pub/pawk/pawk-20030606.tar.gz'. @@ -28033,7 +28052,7 @@ Libmawk This is a Python module that claims to bring `awk'-like features to Python. See `https://github.com/alecthomas/pawk' for more information. (This is not related to Nelson Beebe's modified - version of Brian Kernighan's `awk', described earlier.) + version of BWK `awk', described earlier.) QSE Awk This is an embeddable `awk' interpreter. For more information see @@ -31445,7 +31464,7 @@ Index * BEGIN pattern, next/nextfile statements and <1>: Next Statement. (line 45) * BEGIN pattern, next/nextfile statements and: I/O And BEGIN/END. - (line 37) + (line 36) * BEGIN pattern, OFS/ORS variables, assigning values to: Output Separators. (line 20) * BEGIN pattern, operators and: Using BEGIN/END. (line 17) @@ -31514,6 +31533,7 @@ Index * Brennan, Michael <1>: Other Versions. (line 6) * Brennan, Michael <2>: Simple Sed. (line 25) * Brennan, Michael <3>: Delete. (line 56) +* Brennan, Michael <4>: Acknowledgments. (line 76) * Brennan, Michael: Foreword. (line 83) * Brian Kernighan's awk <1>: I/O Functions. (line 43) * Brian Kernighan's awk <2>: Gory Details. (line 19) @@ -31530,8 +31550,7 @@ Index * Brian Kernighan's awk <12>: GNU Regexp Operators. (line 83) * Brian Kernighan's awk <13>: Escape Sequences. (line 120) -* Brian Kernighan's awk <14>: When. (line 21) -* Brian Kernighan's awk: Preface. (line 13) +* Brian Kernighan's awk: When. (line 21) * Brian Kernighan's awk, extensions: BTL. (line 6) * Brian Kernighan's awk, source code: Other Versions. (line 13) * Brini, Davide: Signature Program. (line 6) @@ -31740,9 +31759,9 @@ Index * cut utility: Cut Program. (line 6) * cut.awk program: Cut Program. (line 45) * d debugger command (alias for delete): Breakpoint Control. (line 64) -* d.c., See dark corner: Conventions. (line 38) +* d.c., See dark corner: Conventions. (line 42) * dark corner <1>: Glossary. (line 188) -* dark corner: Conventions. (line 38) +* dark corner: Conventions. (line 42) * dark corner, "0" is actually true: Truth Values. (line 24) * dark corner, /= operator vs. /=.../ regexp constant: Assignment Ops. (line 148) @@ -31793,9 +31812,10 @@ Index * date utility, POSIX: Time Functions. (line 254) * dates, converting to timestamps: Time Functions. (line 76) * dates, information related to, localization: Explaining gettext. - (line 116) + (line 112) * Davies, Stephen <1>: Contributors. (line 74) * Davies, Stephen: Acknowledgments. (line 60) +* Day, Robert P.J.: Acknowledgments. (line 76) * dcgettext <1>: Programmer i18n. (line 19) * dcgettext: I18N Functions. (line 22) * dcgettext() function (gawk), portability and: I18N Portability. @@ -32070,7 +32090,7 @@ Index * END pattern, next/nextfile statements and <1>: Next Statement. (line 45) * END pattern, next/nextfile statements and: I/O And BEGIN/END. - (line 37) + (line 36) * END pattern, operators and: Using BEGIN/END. (line 17) * END pattern, print statement and: I/O And BEGIN/END. (line 16) * ENDFILE pattern: BEGINFILE/ENDFILE. (line 6) @@ -32724,8 +32744,8 @@ Index * Kernighan, Brian <6>: Library Functions. (line 12) * Kernighan, Brian <7>: Concatenation. (line 6) * Kernighan, Brian <8>: Getline/Pipe. (line 6) -* Kernighan, Brian <9>: Acknowledgments. (line 80) -* Kernighan, Brian <10>: Conventions. (line 34) +* Kernighan, Brian <9>: Acknowledgments. (line 76) +* Kernighan, Brian <10>: Conventions. (line 38) * Kernighan, Brian: History. (line 17) * kill command, dynamic profiling: Profiling. (line 188) * Knights, jedi: Undocumented. (line 6) @@ -32735,16 +32755,15 @@ Index * labels.awk program: Labels Program. (line 51) * Langston, Peter: Advanced Features. (line 6) * languages, data-driven: Basic High Level. (line 85) -* LC_ALL locale category: Explaining gettext. (line 121) +* LC_ALL locale category: Explaining gettext. (line 117) * LC_COLLATE locale category: Explaining gettext. (line 94) * LC_CTYPE locale category: Explaining gettext. (line 98) * LC_MESSAGES locale category: Explaining gettext. (line 88) * LC_MESSAGES locale category, bindtextdomain() function (gawk): Programmer i18n. - (line 88) + (line 99) * LC_MONETARY locale category: Explaining gettext. (line 104) * LC_NUMERIC locale category: Explaining gettext. (line 108) -* LC_RESPONSE locale category: Explaining gettext. (line 112) -* LC_TIME locale category: Explaining gettext. (line 116) +* LC_TIME locale category: Explaining gettext. (line 112) * left angle bracket (<), < operator <1>: Precedence. (line 65) * left angle bracket (<), < operator: Comparison Operators. (line 11) @@ -32914,13 +32933,13 @@ Index * next file statement: Feature History. (line 169) * next statement <1>: Next Statement. (line 6) * next statement: Boolean Ops. (line 85) -* next statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 37) +* next statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 36) * next statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE. (line 49) * next statement, user-defined functions and: Next Statement. (line 45) * nextfile statement: Nextfile Statement. (line 6) * nextfile statement, BEGIN/END patterns and: I/O And BEGIN/END. - (line 37) + (line 36) * nextfile statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE. (line 26) * nextfile statement, user-defined functions and: Nextfile Statement. @@ -33734,7 +33753,7 @@ Index * tilde (~), ~ operator: Regexp Usage. (line 19) * time functions: Time Functions. (line 6) * time, alarm clock example program: Alarm Program. (line 11) -* time, localization and: Explaining gettext. (line 116) +* time, localization and: Explaining gettext. (line 112) * time, managing: Getlocaltime Function. (line 6) * time, retrieving: Time Functions. (line 17) @@ -33968,541 +33987,542 @@ Ref: Names-Footnote-153403 Node: This Manual53476 Ref: This Manual-Footnote-159255 Node: Conventions59355 -Node: Manual History61511 -Ref: Manual History-Footnote-164587 -Ref: Manual History-Footnote-264628 -Node: How To Contribute64702 -Node: Acknowledgments65941 -Node: Getting Started70689 -Node: Running gawk73123 -Node: One-shot74313 -Node: Read Terminal75538 -Ref: Read Terminal-Footnote-177501 -Node: Long77672 -Node: Executable Scripts79048 -Ref: Executable Scripts-Footnote-180881 -Ref: Executable Scripts-Footnote-280983 -Node: Comments81530 -Node: Quoting84003 -Node: DOS Quoting89316 -Node: Sample Data Files89991 -Node: Very Simple92545 -Node: Two Rules97318 -Node: More Complex99212 -Ref: More Complex-Footnote-1102144 -Node: Statements/Lines102229 -Ref: Statements/Lines-Footnote-1106685 -Node: Other Features106950 -Node: When107878 -Ref: When-Footnote-1109764 -Node: Intro Summary109829 -Node: Invoking Gawk110595 -Node: Command Line112110 -Node: Options112901 -Ref: Options-Footnote-1128699 -Node: Other Arguments128724 -Node: Naming Standard Input131386 -Node: Environment Variables132479 -Node: AWKPATH Variable133037 -Ref: AWKPATH Variable-Footnote-1135903 -Ref: AWKPATH Variable-Footnote-2135948 -Node: AWKLIBPATH Variable136208 -Node: Other Environment Variables136967 -Node: Exit Status140624 -Node: Include Files141299 -Node: Loading Shared Libraries144877 -Node: Obsolete146261 -Node: Undocumented146958 -Node: Invoking Summary147225 -Node: Regexp148825 -Node: Regexp Usage150275 -Node: Escape Sequences152308 -Node: Regexp Operators158139 -Ref: Regexp Operators-Footnote-1165619 -Ref: Regexp Operators-Footnote-2165766 -Node: Bracket Expressions165864 -Ref: table-char-classes167754 -Node: GNU Regexp Operators170694 -Node: Case-sensitivity174417 -Ref: Case-sensitivity-Footnote-1177309 -Ref: Case-sensitivity-Footnote-2177544 -Node: Leftmost Longest177652 -Node: Computed Regexps178853 -Node: Regexp Summary182225 -Node: Reading Files183694 -Node: Records185786 -Node: awk split records186529 -Node: gawk split records191387 -Ref: gawk split records-Footnote-1195908 -Node: Fields195945 -Ref: Fields-Footnote-1198909 -Node: Nonconstant Fields198995 -Ref: Nonconstant Fields-Footnote-1201225 -Node: Changing Fields201427 -Node: Field Separators207381 -Node: Default Field Splitting210083 -Node: Regexp Field Splitting211200 -Node: Single Character Fields214541 -Node: Command Line Field Separator215600 -Node: Full Line Fields219026 -Ref: Full Line Fields-Footnote-1219534 -Node: Field Splitting Summary219580 -Ref: Field Splitting Summary-Footnote-1222712 -Node: Constant Size222813 -Node: Splitting By Content227419 -Ref: Splitting By Content-Footnote-1231492 -Node: Multiple Line231532 -Ref: Multiple Line-Footnote-1237388 -Node: Getline237567 -Node: Plain Getline239783 -Node: Getline/Variable241878 -Node: Getline/File243025 -Node: Getline/Variable/File244409 -Ref: Getline/Variable/File-Footnote-1246008 -Node: Getline/Pipe246095 -Node: Getline/Variable/Pipe248794 -Node: Getline/Coprocess249901 -Node: Getline/Variable/Coprocess251153 -Node: Getline Notes251890 -Node: Getline Summary254694 -Ref: table-getline-variants255102 -Node: Read Timeout256014 -Ref: Read Timeout-Footnote-1259841 -Node: Command-line directories259899 -Node: Input Summary260803 -Node: Input Exercises263940 -Node: Printing264673 -Node: Print266395 -Node: Print Examples267736 -Node: Output Separators270515 -Node: OFMT272531 -Node: Printf273889 -Node: Basic Printf274795 -Node: Control Letters276334 -Node: Format Modifiers280325 -Node: Printf Examples286352 -Node: Redirection288816 -Node: Special Files295788 -Node: Special FD296321 -Ref: Special FD-Footnote-1299918 -Node: Special Network299992 -Node: Special Caveats300842 -Node: Close Files And Pipes301638 -Ref: Close Files And Pipes-Footnote-1308799 -Ref: Close Files And Pipes-Footnote-2308947 -Node: Output Summary309097 -Node: Output exercises310094 -Node: Expressions310774 -Node: Values311959 -Node: Constants312635 -Node: Scalar Constants313315 -Ref: Scalar Constants-Footnote-1314174 -Node: Nondecimal-numbers314424 -Node: Regexp Constants317424 -Node: Using Constant Regexps317899 -Node: Variables320971 -Node: Using Variables321626 -Node: Assignment Options323350 -Node: Conversion325225 -Node: Strings And Numbers325749 -Ref: Strings And Numbers-Footnote-1328811 -Node: Locale influences conversions328920 -Ref: table-locale-affects331637 -Node: All Operators332225 -Node: Arithmetic Ops332855 -Node: Concatenation335360 -Ref: Concatenation-Footnote-1338179 -Node: Assignment Ops338299 -Ref: table-assign-ops343282 -Node: Increment Ops344599 -Node: Truth Values and Conditions348037 -Node: Truth Values349120 -Node: Typing and Comparison350169 -Node: Variable Typing350962 -Node: Comparison Operators354614 -Ref: table-relational-ops355024 -Node: POSIX String Comparison358574 -Ref: POSIX String Comparison-Footnote-1359658 -Node: Boolean Ops359796 -Ref: Boolean Ops-Footnote-1363866 -Node: Conditional Exp363957 -Node: Function Calls365684 -Node: Precedence369564 -Node: Locales373233 -Node: Expressions Summary374864 -Node: Patterns and Actions377405 -Node: Pattern Overview378521 -Node: Regexp Patterns380198 -Node: Expression Patterns380741 -Node: Ranges384522 -Node: BEGIN/END387628 -Node: Using BEGIN/END388390 -Ref: Using BEGIN/END-Footnote-1391126 -Node: I/O And BEGIN/END391232 -Node: BEGINFILE/ENDFILE393517 -Node: Empty396448 -Node: Using Shell Variables396765 -Node: Action Overview399048 -Node: Statements401375 -Node: If Statement403223 -Node: While Statement404721 -Node: Do Statement406765 -Node: For Statement407921 -Node: Switch Statement411073 -Node: Break Statement413461 -Node: Continue Statement415516 -Node: Next Statement417355 -Node: Nextfile Statement419745 -Node: Exit Statement422400 -Node: Built-in Variables424804 -Node: User-modified425931 -Ref: User-modified-Footnote-1433620 -Node: Auto-set433682 -Ref: Auto-set-Footnote-1446264 -Ref: Auto-set-Footnote-2446469 -Node: ARGC and ARGV446525 -Node: Pattern Action Summary450429 -Node: Arrays452652 -Node: Array Basics454201 -Node: Array Intro455027 -Ref: figure-array-elements457000 -Node: Reference to Elements459407 -Node: Assigning Elements461786 -Node: Array Example462277 -Node: Scanning an Array464009 -Node: Controlling Scanning467024 -Ref: Controlling Scanning-Footnote-1472197 -Node: Delete472513 -Ref: Delete-Footnote-1475278 -Node: Numeric Array Subscripts475335 -Node: Uninitialized Subscripts477518 -Node: Multidimensional479143 -Node: Multiscanning482256 -Node: Arrays of Arrays483845 -Node: Arrays Summary488508 -Node: Functions490613 -Node: Built-in491486 -Node: Calling Built-in492564 -Node: Numeric Functions494552 -Ref: Numeric Functions-Footnote-1498586 -Ref: Numeric Functions-Footnote-2498943 -Ref: Numeric Functions-Footnote-3498991 -Node: String Functions499260 -Ref: String Functions-Footnote-1522271 -Ref: String Functions-Footnote-2522400 -Ref: String Functions-Footnote-3522648 -Node: Gory Details522735 -Ref: table-sub-escapes524522 -Ref: table-sub-proposed526042 -Ref: table-posix-sub527406 -Ref: table-gensub-escapes528946 -Ref: Gory Details-Footnote-1530122 -Node: I/O Functions530273 -Ref: I/O Functions-Footnote-1537396 -Node: Time Functions537543 -Ref: Time Functions-Footnote-1548007 -Ref: Time Functions-Footnote-2548075 -Ref: Time Functions-Footnote-3548233 -Ref: Time Functions-Footnote-4548344 -Ref: Time Functions-Footnote-5548456 -Ref: Time Functions-Footnote-6548683 -Node: Bitwise Functions548949 -Ref: table-bitwise-ops549511 -Ref: Bitwise Functions-Footnote-1553756 -Node: Type Functions553940 -Node: I18N Functions555082 -Node: User-defined556727 -Node: Definition Syntax557531 -Ref: Definition Syntax-Footnote-1562710 -Node: Function Example562779 -Ref: Function Example-Footnote-1565419 -Node: Function Caveats565441 -Node: Calling A Function565959 -Node: Variable Scope566914 -Node: Pass By Value/Reference569902 -Node: Return Statement573412 -Node: Dynamic Typing576396 -Node: Indirect Calls577325 -Node: Functions Summary587038 -Node: Library Functions589577 -Ref: Library Functions-Footnote-1593195 -Ref: Library Functions-Footnote-2593338 -Node: Library Names593509 -Ref: Library Names-Footnote-1596982 -Ref: Library Names-Footnote-2597202 -Node: General Functions597288 -Node: Strtonum Function598316 -Node: Assert Function601096 -Node: Round Function604422 -Node: Cliff Random Function605963 -Node: Ordinal Functions606979 -Ref: Ordinal Functions-Footnote-1610056 -Ref: Ordinal Functions-Footnote-2610308 -Node: Join Function610519 -Ref: Join Function-Footnote-1612290 -Node: Getlocaltime Function612490 -Node: Readfile Function616226 -Node: Data File Management618065 -Node: Filetrans Function618697 -Node: Rewind Function622766 -Node: File Checking624324 -Ref: File Checking-Footnote-1625456 -Node: Empty Files625657 -Node: Ignoring Assigns627636 -Node: Getopt Function629190 -Ref: Getopt Function-Footnote-1640493 -Node: Passwd Functions640696 -Ref: Passwd Functions-Footnote-1649675 -Node: Group Functions649763 -Ref: Group Functions-Footnote-1657704 -Node: Walking Arrays657917 -Node: Library Functions Summary659520 -Node: Library exercises660908 -Node: Sample Programs662188 -Node: Running Examples662958 -Node: Clones663686 -Node: Cut Program664910 -Node: Egrep Program674778 -Ref: Egrep Program-Footnote-1682749 -Node: Id Program682859 -Node: Split Program686523 -Ref: Split Program-Footnote-1690061 -Node: Tee Program690189 -Node: Uniq Program692996 -Node: Wc Program700426 -Ref: Wc Program-Footnote-1704691 -Node: Miscellaneous Programs704783 -Node: Dupword Program705996 -Node: Alarm Program708027 -Node: Translate Program712841 -Ref: Translate Program-Footnote-1717232 -Ref: Translate Program-Footnote-2717502 -Node: Labels Program717636 -Ref: Labels Program-Footnote-1721007 -Node: Word Sorting721091 -Node: History Sorting725134 -Node: Extract Program726970 -Node: Simple Sed734506 -Node: Igawk Program737568 -Ref: Igawk Program-Footnote-1751872 -Ref: Igawk Program-Footnote-2752073 -Node: Anagram Program752211 -Node: Signature Program755279 -Node: Programs Summary756526 -Node: Programs Exercises757741 -Node: Advanced Features761392 -Node: Nondecimal Data763340 -Node: Array Sorting764917 -Node: Controlling Array Traversal765614 -Node: Array Sorting Functions773894 -Ref: Array Sorting Functions-Footnote-1777801 -Node: Two-way I/O777995 -Ref: Two-way I/O-Footnote-1782939 -Ref: Two-way I/O-Footnote-2783118 -Node: TCP/IP Networking783200 -Node: Profiling786045 -Node: Advanced Features Summary793587 -Node: Internationalization795451 -Node: I18N and L10N796931 -Node: Explaining gettext797617 -Ref: Explaining gettext-Footnote-1802757 -Ref: Explaining gettext-Footnote-2802941 -Node: Programmer i18n803106 -Node: Translator i18n807331 -Node: String Extraction808125 -Ref: String Extraction-Footnote-1809086 -Node: Printf Ordering809172 -Ref: Printf Ordering-Footnote-1811954 -Node: I18N Portability812018 -Ref: I18N Portability-Footnote-1814467 -Node: I18N Example814530 -Ref: I18N Example-Footnote-1817252 -Node: Gawk I18N817324 -Node: I18N Summary817962 -Node: Debugger819301 -Node: Debugging820323 -Node: Debugging Concepts820764 -Node: Debugging Terms822620 -Node: Awk Debugging825217 -Node: Sample Debugging Session826109 -Node: Debugger Invocation826629 -Node: Finding The Bug827962 -Node: List of Debugger Commands834444 -Node: Breakpoint Control835776 -Node: Debugger Execution Control839440 -Node: Viewing And Changing Data842800 -Node: Execution Stack846158 -Node: Debugger Info847671 -Node: Miscellaneous Debugger Commands851665 -Node: Readline Support856849 -Node: Limitations857741 -Node: Debugging Summary860015 -Node: Arbitrary Precision Arithmetic861183 -Node: Computer Arithmetic862670 -Ref: Computer Arithmetic-Footnote-1867057 -Node: Math Definitions867114 -Ref: table-ieee-formats870403 -Ref: Math Definitions-Footnote-1870943 -Node: MPFR features871046 -Node: FP Math Caution872663 -Ref: FP Math Caution-Footnote-1873713 -Node: Inexactness of computations874082 -Node: Inexact representation875030 -Node: Comparing FP Values876385 -Node: Errors accumulate877349 -Node: Getting Accuracy878782 -Node: Try To Round881441 -Node: Setting precision882340 -Ref: table-predefined-precision-strings883022 -Node: Setting the rounding mode884815 -Ref: table-gawk-rounding-modes885179 -Ref: Setting the rounding mode-Footnote-1888633 -Node: Arbitrary Precision Integers888812 -Ref: Arbitrary Precision Integers-Footnote-1891793 -Node: POSIX Floating Point Problems891942 -Ref: POSIX Floating Point Problems-Footnote-1895818 -Node: Floating point summary895856 -Node: Dynamic Extensions898060 -Node: Extension Intro899612 -Node: Plugin License900877 -Node: Extension Mechanism Outline901562 -Ref: figure-load-extension901986 -Ref: figure-load-new-function903471 -Ref: figure-call-new-function904473 -Node: Extension API Description906457 -Node: Extension API Functions Introduction907907 -Node: General Data Types912774 -Ref: General Data Types-Footnote-1918467 -Node: Requesting Values918766 -Ref: table-value-types-returned919503 -Node: Memory Allocation Functions920461 -Ref: Memory Allocation Functions-Footnote-1923208 -Node: Constructor Functions923304 -Node: Registration Functions925062 -Node: Extension Functions925747 -Node: Exit Callback Functions928049 -Node: Extension Version String929297 -Node: Input Parsers929947 -Node: Output Wrappers939761 -Node: Two-way processors944277 -Node: Printing Messages946481 -Ref: Printing Messages-Footnote-1947558 -Node: Updating `ERRNO'947710 -Node: Accessing Parameters948449 -Node: Symbol Table Access949679 -Node: Symbol table by name950193 -Node: Symbol table by cookie952169 -Ref: Symbol table by cookie-Footnote-1956302 -Node: Cached values956365 -Ref: Cached values-Footnote-1959869 -Node: Array Manipulation959960 -Ref: Array Manipulation-Footnote-1961058 -Node: Array Data Types961097 -Ref: Array Data Types-Footnote-1963800 -Node: Array Functions963892 -Node: Flattening Arrays967766 -Node: Creating Arrays974618 -Node: Extension API Variables979349 -Node: Extension Versioning979985 -Node: Extension API Informational Variables981886 -Node: Extension API Boilerplate982972 -Node: Finding Extensions986776 -Node: Extension Example987336 -Node: Internal File Description988066 -Node: Internal File Ops992157 -Ref: Internal File Ops-Footnote-11003589 -Node: Using Internal File Ops1003729 -Ref: Using Internal File Ops-Footnote-11006076 -Node: Extension Samples1006344 -Node: Extension Sample File Functions1007868 -Node: Extension Sample Fnmatch1015436 -Node: Extension Sample Fork1016918 -Node: Extension Sample Inplace1018131 -Node: Extension Sample Ord1019806 -Node: Extension Sample Readdir1020642 -Ref: table-readdir-file-types1021498 -Node: Extension Sample Revout1022297 -Node: Extension Sample Rev2way1022888 -Node: Extension Sample Read write array1023629 -Node: Extension Sample Readfile1025508 -Node: Extension Sample API Tests1026608 -Node: Extension Sample Time1027133 -Node: gawkextlib1028448 -Node: Extension summary1031261 -Node: Extension Exercises1034954 -Node: Language History1035676 -Node: V7/SVR3.11037319 -Node: SVR41039639 -Node: POSIX1041081 -Node: BTL1042467 -Node: POSIX/GNU1043201 -Node: Feature History1048942 -Node: Common Extensions1062072 -Node: Ranges and Locales1063384 -Ref: Ranges and Locales-Footnote-11068001 -Ref: Ranges and Locales-Footnote-21068028 -Ref: Ranges and Locales-Footnote-31068262 -Node: Contributors1068483 -Node: History summary1073908 -Node: Installation1075277 -Node: Gawk Distribution1076228 -Node: Getting1076712 -Node: Extracting1077536 -Node: Distribution contents1079178 -Node: Unix Installation1084895 -Node: Quick Installation1085512 -Node: Additional Configuration Options1087954 -Node: Configuration Philosophy1089692 -Node: Non-Unix Installation1092043 -Node: PC Installation1092501 -Node: PC Binary Installation1093812 -Node: PC Compiling1095660 -Ref: PC Compiling-Footnote-11098659 -Node: PC Testing1098764 -Node: PC Using1099940 -Node: Cygwin1104092 -Node: MSYS1104901 -Node: VMS Installation1105415 -Node: VMS Compilation1106211 -Ref: VMS Compilation-Footnote-11107433 -Node: VMS Dynamic Extensions1107491 -Node: VMS Installation Details1108864 -Node: VMS Running1111116 -Node: VMS GNV1113950 -Node: VMS Old Gawk1114673 -Node: Bugs1115143 -Node: Other Versions1119147 -Node: Installation summary1125402 -Node: Notes1126458 -Node: Compatibility Mode1127323 -Node: Additions1128105 -Node: Accessing The Source1129030 -Node: Adding Code1130466 -Node: New Ports1136644 -Node: Derived Files1141125 -Ref: Derived Files-Footnote-11146206 -Ref: Derived Files-Footnote-21146240 -Ref: Derived Files-Footnote-31146836 -Node: Future Extensions1146950 -Node: Implementation Limitations1147556 -Node: Extension Design1148804 -Node: Old Extension Problems1149958 -Ref: Old Extension Problems-Footnote-11151475 -Node: Extension New Mechanism Goals1151532 -Ref: Extension New Mechanism Goals-Footnote-11154892 -Node: Extension Other Design Decisions1155081 -Node: Extension Future Growth1157187 -Node: Old Extension Mechanism1158023 -Node: Notes summary1159785 -Node: Basic Concepts1160971 -Node: Basic High Level1161652 -Ref: figure-general-flow1161924 -Ref: figure-process-flow1162523 -Ref: Basic High Level-Footnote-11165752 -Node: Basic Data Typing1165937 -Node: Glossary1169265 -Node: Copying1194417 -Node: GNU Free Documentation License1231973 -Node: Index1257109 +Node: Manual History61700 +Ref: Manual History-Footnote-164776 +Ref: Manual History-Footnote-264817 +Node: How To Contribute64891 +Node: Acknowledgments66130 +Node: Getting Started70878 +Node: Running gawk73312 +Node: One-shot74502 +Node: Read Terminal75727 +Ref: Read Terminal-Footnote-177690 +Node: Long77861 +Node: Executable Scripts79255 +Ref: Executable Scripts-Footnote-181088 +Ref: Executable Scripts-Footnote-281190 +Node: Comments81743 +Node: Quoting84216 +Node: DOS Quoting89529 +Node: Sample Data Files90204 +Node: Very Simple92758 +Node: Two Rules97531 +Node: More Complex99425 +Ref: More Complex-Footnote-1102357 +Node: Statements/Lines102442 +Ref: Statements/Lines-Footnote-1106898 +Node: Other Features107163 +Node: When108091 +Ref: When-Footnote-1109952 +Node: Intro Summary110017 +Node: Invoking Gawk110783 +Node: Command Line112298 +Node: Options113089 +Ref: Options-Footnote-1128865 +Node: Other Arguments128890 +Node: Naming Standard Input131552 +Node: Environment Variables132645 +Node: AWKPATH Variable133203 +Ref: AWKPATH Variable-Footnote-1136069 +Ref: AWKPATH Variable-Footnote-2136114 +Node: AWKLIBPATH Variable136374 +Node: Other Environment Variables137133 +Node: Exit Status140790 +Node: Include Files141465 +Node: Loading Shared Libraries145043 +Node: Obsolete146427 +Node: Undocumented147124 +Node: Invoking Summary147391 +Node: Regexp148991 +Node: Regexp Usage150441 +Node: Escape Sequences152474 +Node: Regexp Operators158291 +Ref: Regexp Operators-Footnote-1165771 +Ref: Regexp Operators-Footnote-2165918 +Node: Bracket Expressions166016 +Ref: table-char-classes167906 +Node: GNU Regexp Operators170846 +Node: Case-sensitivity174555 +Ref: Case-sensitivity-Footnote-1177447 +Ref: Case-sensitivity-Footnote-2177682 +Node: Leftmost Longest177790 +Node: Computed Regexps178991 +Node: Regexp Summary182363 +Node: Reading Files183832 +Node: Records185924 +Node: awk split records186667 +Node: gawk split records191525 +Ref: gawk split records-Footnote-1196046 +Node: Fields196083 +Ref: Fields-Footnote-1199047 +Node: Nonconstant Fields199133 +Ref: Nonconstant Fields-Footnote-1201363 +Node: Changing Fields201565 +Node: Field Separators207519 +Node: Default Field Splitting210221 +Node: Regexp Field Splitting211338 +Node: Single Character Fields214665 +Node: Command Line Field Separator215724 +Node: Full Line Fields219150 +Ref: Full Line Fields-Footnote-1219658 +Node: Field Splitting Summary219704 +Ref: Field Splitting Summary-Footnote-1222836 +Node: Constant Size222937 +Node: Splitting By Content227543 +Ref: Splitting By Content-Footnote-1231616 +Node: Multiple Line231656 +Ref: Multiple Line-Footnote-1237512 +Node: Getline237691 +Node: Plain Getline239907 +Node: Getline/Variable242002 +Node: Getline/File243149 +Node: Getline/Variable/File244533 +Ref: Getline/Variable/File-Footnote-1246132 +Node: Getline/Pipe246219 +Node: Getline/Variable/Pipe248905 +Node: Getline/Coprocess250012 +Node: Getline/Variable/Coprocess251264 +Node: Getline Notes252001 +Node: Getline Summary254805 +Ref: table-getline-variants255213 +Node: Read Timeout256125 +Ref: Read Timeout-Footnote-1259952 +Node: Command-line directories260010 +Node: Input Summary260914 +Node: Input Exercises264051 +Node: Printing264784 +Node: Print266506 +Node: Print Examples267999 +Node: Output Separators270778 +Node: OFMT272794 +Node: Printf274152 +Node: Basic Printf275058 +Node: Control Letters276597 +Node: Format Modifiers280588 +Node: Printf Examples286615 +Node: Redirection289079 +Node: Special Files296051 +Node: Special FD296584 +Ref: Special FD-Footnote-1300181 +Node: Special Network300255 +Node: Special Caveats301105 +Node: Close Files And Pipes301901 +Ref: Close Files And Pipes-Footnote-1309062 +Ref: Close Files And Pipes-Footnote-2309210 +Node: Output Summary309360 +Node: Output exercises310357 +Node: Expressions311037 +Node: Values312222 +Node: Constants312898 +Node: Scalar Constants313578 +Ref: Scalar Constants-Footnote-1314437 +Node: Nondecimal-numbers314687 +Node: Regexp Constants317687 +Node: Using Constant Regexps318162 +Node: Variables321234 +Node: Using Variables321889 +Node: Assignment Options323613 +Node: Conversion325488 +Node: Strings And Numbers326012 +Ref: Strings And Numbers-Footnote-1329074 +Node: Locale influences conversions329183 +Ref: table-locale-affects331900 +Node: All Operators332488 +Node: Arithmetic Ops333118 +Node: Concatenation335623 +Ref: Concatenation-Footnote-1338442 +Node: Assignment Ops338548 +Ref: table-assign-ops343531 +Node: Increment Ops344834 +Node: Truth Values and Conditions348272 +Node: Truth Values349355 +Node: Typing and Comparison350404 +Node: Variable Typing351197 +Node: Comparison Operators354849 +Ref: table-relational-ops355259 +Node: POSIX String Comparison358809 +Ref: POSIX String Comparison-Footnote-1359893 +Node: Boolean Ops360031 +Ref: Boolean Ops-Footnote-1364101 +Node: Conditional Exp364192 +Node: Function Calls365919 +Node: Precedence369799 +Node: Locales373468 +Node: Expressions Summary375099 +Node: Patterns and Actions377640 +Node: Pattern Overview378756 +Node: Regexp Patterns380433 +Node: Expression Patterns380976 +Node: Ranges384757 +Node: BEGIN/END387863 +Node: Using BEGIN/END388625 +Ref: Using BEGIN/END-Footnote-1391361 +Node: I/O And BEGIN/END391467 +Node: BEGINFILE/ENDFILE393738 +Node: Empty396669 +Node: Using Shell Variables396986 +Node: Action Overview399269 +Node: Statements401596 +Node: If Statement403444 +Node: While Statement404942 +Node: Do Statement406986 +Node: For Statement408142 +Node: Switch Statement411294 +Node: Break Statement413682 +Node: Continue Statement415723 +Node: Next Statement417548 +Node: Nextfile Statement419938 +Node: Exit Statement422574 +Node: Built-in Variables424978 +Node: User-modified426105 +Ref: User-modified-Footnote-1433794 +Node: Auto-set433856 +Ref: Auto-set-Footnote-1446438 +Ref: Auto-set-Footnote-2446643 +Node: ARGC and ARGV446699 +Node: Pattern Action Summary450603 +Node: Arrays452826 +Node: Array Basics454375 +Node: Array Intro455201 +Ref: figure-array-elements457174 +Node: Reference to Elements459581 +Node: Assigning Elements461960 +Node: Array Example462451 +Node: Scanning an Array464183 +Node: Controlling Scanning467184 +Ref: Controlling Scanning-Footnote-1472357 +Node: Delete472673 +Ref: Delete-Footnote-1475424 +Node: Numeric Array Subscripts475481 +Node: Uninitialized Subscripts477664 +Node: Multidimensional479289 +Node: Multiscanning482402 +Node: Arrays of Arrays483991 +Node: Arrays Summary488654 +Node: Functions490759 +Node: Built-in491632 +Node: Calling Built-in492710 +Node: Numeric Functions494698 +Ref: Numeric Functions-Footnote-1498732 +Ref: Numeric Functions-Footnote-2499089 +Ref: Numeric Functions-Footnote-3499137 +Node: String Functions499406 +Ref: String Functions-Footnote-1522403 +Ref: String Functions-Footnote-2522532 +Ref: String Functions-Footnote-3522780 +Node: Gory Details522867 +Ref: table-sub-escapes524640 +Ref: table-sub-proposed526160 +Ref: table-posix-sub527524 +Ref: table-gensub-escapes529064 +Ref: Gory Details-Footnote-1530240 +Node: I/O Functions530391 +Ref: I/O Functions-Footnote-1537501 +Node: Time Functions537648 +Ref: Time Functions-Footnote-1548112 +Ref: Time Functions-Footnote-2548180 +Ref: Time Functions-Footnote-3548338 +Ref: Time Functions-Footnote-4548449 +Ref: Time Functions-Footnote-5548561 +Ref: Time Functions-Footnote-6548788 +Node: Bitwise Functions549054 +Ref: table-bitwise-ops549616 +Ref: Bitwise Functions-Footnote-1553861 +Node: Type Functions554045 +Node: I18N Functions555187 +Node: User-defined556832 +Node: Definition Syntax557636 +Ref: Definition Syntax-Footnote-1562815 +Node: Function Example562884 +Ref: Function Example-Footnote-1565524 +Node: Function Caveats565546 +Node: Calling A Function566064 +Node: Variable Scope567019 +Node: Pass By Value/Reference570007 +Node: Return Statement573517 +Node: Dynamic Typing576501 +Node: Indirect Calls577430 +Node: Functions Summary587143 +Node: Library Functions589682 +Ref: Library Functions-Footnote-1593300 +Ref: Library Functions-Footnote-2593443 +Node: Library Names593614 +Ref: Library Names-Footnote-1597087 +Ref: Library Names-Footnote-2597307 +Node: General Functions597393 +Node: Strtonum Function598421 +Node: Assert Function601201 +Node: Round Function604527 +Node: Cliff Random Function606068 +Node: Ordinal Functions607084 +Ref: Ordinal Functions-Footnote-1610161 +Ref: Ordinal Functions-Footnote-2610413 +Node: Join Function610624 +Ref: Join Function-Footnote-1612395 +Node: Getlocaltime Function612595 +Node: Readfile Function616331 +Node: Data File Management618170 +Node: Filetrans Function618802 +Node: Rewind Function622871 +Node: File Checking624429 +Ref: File Checking-Footnote-1625561 +Node: Empty Files625762 +Node: Ignoring Assigns627741 +Node: Getopt Function629295 +Ref: Getopt Function-Footnote-1640598 +Node: Passwd Functions640801 +Ref: Passwd Functions-Footnote-1649780 +Node: Group Functions649868 +Ref: Group Functions-Footnote-1657809 +Node: Walking Arrays658022 +Node: Library Functions Summary659625 +Node: Library exercises661013 +Node: Sample Programs662293 +Node: Running Examples663063 +Node: Clones663791 +Node: Cut Program665015 +Node: Egrep Program674883 +Ref: Egrep Program-Footnote-1682854 +Node: Id Program682964 +Node: Split Program686628 +Ref: Split Program-Footnote-1690166 +Node: Tee Program690294 +Node: Uniq Program693101 +Node: Wc Program700531 +Ref: Wc Program-Footnote-1704796 +Node: Miscellaneous Programs704888 +Node: Dupword Program706101 +Node: Alarm Program708132 +Node: Translate Program712946 +Ref: Translate Program-Footnote-1717337 +Ref: Translate Program-Footnote-2717607 +Node: Labels Program717741 +Ref: Labels Program-Footnote-1721112 +Node: Word Sorting721196 +Node: History Sorting725239 +Node: Extract Program727075 +Node: Simple Sed734611 +Node: Igawk Program737673 +Ref: Igawk Program-Footnote-1751977 +Ref: Igawk Program-Footnote-2752178 +Node: Anagram Program752316 +Node: Signature Program755384 +Node: Programs Summary756631 +Node: Programs Exercises757846 +Node: Advanced Features761497 +Node: Nondecimal Data763445 +Node: Array Sorting765022 +Node: Controlling Array Traversal765719 +Node: Array Sorting Functions773999 +Ref: Array Sorting Functions-Footnote-1777906 +Node: Two-way I/O778100 +Ref: Two-way I/O-Footnote-1783044 +Ref: Two-way I/O-Footnote-2783223 +Node: TCP/IP Networking783305 +Node: Profiling786150 +Node: Advanced Features Summary793692 +Node: Internationalization795556 +Node: I18N and L10N797036 +Node: Explaining gettext797722 +Ref: Explaining gettext-Footnote-1802748 +Ref: Explaining gettext-Footnote-2802932 +Node: Programmer i18n803097 +Ref: Programmer i18n-Footnote-1807891 +Node: Translator i18n807940 +Node: String Extraction808734 +Ref: String Extraction-Footnote-1809867 +Node: Printf Ordering809953 +Ref: Printf Ordering-Footnote-1812735 +Node: I18N Portability812799 +Ref: I18N Portability-Footnote-1815248 +Node: I18N Example815311 +Ref: I18N Example-Footnote-1818017 +Node: Gawk I18N818089 +Node: I18N Summary818727 +Node: Debugger820066 +Node: Debugging821088 +Node: Debugging Concepts821529 +Node: Debugging Terms823385 +Node: Awk Debugging825982 +Node: Sample Debugging Session826874 +Node: Debugger Invocation827394 +Node: Finding The Bug828727 +Node: List of Debugger Commands835209 +Node: Breakpoint Control836541 +Node: Debugger Execution Control840205 +Node: Viewing And Changing Data843565 +Node: Execution Stack846923 +Node: Debugger Info848436 +Node: Miscellaneous Debugger Commands852430 +Node: Readline Support857614 +Node: Limitations858506 +Node: Debugging Summary860780 +Node: Arbitrary Precision Arithmetic861948 +Node: Computer Arithmetic863435 +Ref: Computer Arithmetic-Footnote-1867822 +Node: Math Definitions867879 +Ref: table-ieee-formats871168 +Ref: Math Definitions-Footnote-1871708 +Node: MPFR features871811 +Node: FP Math Caution873428 +Ref: FP Math Caution-Footnote-1874478 +Node: Inexactness of computations874847 +Node: Inexact representation875795 +Node: Comparing FP Values877150 +Node: Errors accumulate878114 +Node: Getting Accuracy879547 +Node: Try To Round882206 +Node: Setting precision883105 +Ref: table-predefined-precision-strings883787 +Node: Setting the rounding mode885580 +Ref: table-gawk-rounding-modes885944 +Ref: Setting the rounding mode-Footnote-1889398 +Node: Arbitrary Precision Integers889577 +Ref: Arbitrary Precision Integers-Footnote-1892558 +Node: POSIX Floating Point Problems892707 +Ref: POSIX Floating Point Problems-Footnote-1896583 +Node: Floating point summary896621 +Node: Dynamic Extensions898825 +Node: Extension Intro900377 +Node: Plugin License901642 +Node: Extension Mechanism Outline902327 +Ref: figure-load-extension902751 +Ref: figure-load-new-function904236 +Ref: figure-call-new-function905238 +Node: Extension API Description907222 +Node: Extension API Functions Introduction908672 +Node: General Data Types913539 +Ref: General Data Types-Footnote-1919232 +Node: Requesting Values919531 +Ref: table-value-types-returned920268 +Node: Memory Allocation Functions921226 +Ref: Memory Allocation Functions-Footnote-1923973 +Node: Constructor Functions924069 +Node: Registration Functions925827 +Node: Extension Functions926512 +Node: Exit Callback Functions928814 +Node: Extension Version String930062 +Node: Input Parsers930712 +Node: Output Wrappers940526 +Node: Two-way processors945042 +Node: Printing Messages947246 +Ref: Printing Messages-Footnote-1948323 +Node: Updating `ERRNO'948475 +Node: Accessing Parameters949214 +Node: Symbol Table Access950444 +Node: Symbol table by name950958 +Node: Symbol table by cookie952934 +Ref: Symbol table by cookie-Footnote-1957067 +Node: Cached values957130 +Ref: Cached values-Footnote-1960634 +Node: Array Manipulation960725 +Ref: Array Manipulation-Footnote-1961823 +Node: Array Data Types961862 +Ref: Array Data Types-Footnote-1964565 +Node: Array Functions964657 +Node: Flattening Arrays968531 +Node: Creating Arrays975383 +Node: Extension API Variables980114 +Node: Extension Versioning980750 +Node: Extension API Informational Variables982651 +Node: Extension API Boilerplate983737 +Node: Finding Extensions987541 +Node: Extension Example988101 +Node: Internal File Description988831 +Node: Internal File Ops992922 +Ref: Internal File Ops-Footnote-11004354 +Node: Using Internal File Ops1004494 +Ref: Using Internal File Ops-Footnote-11006841 +Node: Extension Samples1007109 +Node: Extension Sample File Functions1008633 +Node: Extension Sample Fnmatch1016201 +Node: Extension Sample Fork1017683 +Node: Extension Sample Inplace1018896 +Node: Extension Sample Ord1020571 +Node: Extension Sample Readdir1021407 +Ref: table-readdir-file-types1022263 +Node: Extension Sample Revout1023062 +Node: Extension Sample Rev2way1023653 +Node: Extension Sample Read write array1024394 +Node: Extension Sample Readfile1026273 +Node: Extension Sample API Tests1027373 +Node: Extension Sample Time1027898 +Node: gawkextlib1029213 +Node: Extension summary1032026 +Node: Extension Exercises1035719 +Node: Language History1036441 +Node: V7/SVR3.11038084 +Node: SVR41040404 +Node: POSIX1041846 +Node: BTL1043232 +Node: POSIX/GNU1043966 +Node: Feature History1049682 +Node: Common Extensions1062773 +Node: Ranges and Locales1064085 +Ref: Ranges and Locales-Footnote-11068702 +Ref: Ranges and Locales-Footnote-21068729 +Ref: Ranges and Locales-Footnote-31068963 +Node: Contributors1069184 +Node: History summary1074609 +Node: Installation1075978 +Node: Gawk Distribution1076929 +Node: Getting1077413 +Node: Extracting1078237 +Node: Distribution contents1079879 +Node: Unix Installation1085596 +Node: Quick Installation1086213 +Node: Additional Configuration Options1088655 +Node: Configuration Philosophy1090393 +Node: Non-Unix Installation1092744 +Node: PC Installation1093202 +Node: PC Binary Installation1094513 +Node: PC Compiling1096361 +Ref: PC Compiling-Footnote-11099360 +Node: PC Testing1099465 +Node: PC Using1100641 +Node: Cygwin1104793 +Node: MSYS1105602 +Node: VMS Installation1106116 +Node: VMS Compilation1106912 +Ref: VMS Compilation-Footnote-11108134 +Node: VMS Dynamic Extensions1108192 +Node: VMS Installation Details1109565 +Node: VMS Running1111817 +Node: VMS GNV1114651 +Node: VMS Old Gawk1115374 +Node: Bugs1115844 +Node: Other Versions1119848 +Node: Installation summary1126075 +Node: Notes1127131 +Node: Compatibility Mode1127996 +Node: Additions1128778 +Node: Accessing The Source1129703 +Node: Adding Code1131139 +Node: New Ports1137317 +Node: Derived Files1141798 +Ref: Derived Files-Footnote-11146879 +Ref: Derived Files-Footnote-21146913 +Ref: Derived Files-Footnote-31147509 +Node: Future Extensions1147623 +Node: Implementation Limitations1148229 +Node: Extension Design1149477 +Node: Old Extension Problems1150631 +Ref: Old Extension Problems-Footnote-11152148 +Node: Extension New Mechanism Goals1152205 +Ref: Extension New Mechanism Goals-Footnote-11155565 +Node: Extension Other Design Decisions1155754 +Node: Extension Future Growth1157860 +Node: Old Extension Mechanism1158696 +Node: Notes summary1160458 +Node: Basic Concepts1161644 +Node: Basic High Level1162325 +Ref: figure-general-flow1162597 +Ref: figure-process-flow1163196 +Ref: Basic High Level-Footnote-11166425 +Node: Basic Data Typing1166610 +Node: Glossary1169938 +Node: Copying1195090 +Node: GNU Free Documentation License1232646 +Node: Index1257782  End Tag Table -- cgit v1.2.3 From 3defec04e39c4ca6987a21f79686576d9823c653 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sat, 23 Aug 2014 22:40:59 +0300 Subject: More reviewer comments. --- doc/gawk.info | 1193 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 589 insertions(+), 604 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 39da4897..9e4f3ec7 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2243,9 +2243,7 @@ edit-compile-test-debug cycle of software development. retargetable assembler for eight-bit microprocessors (*note Glossary::, for more information), and a microcode assembler for a special-purpose Prolog computer. While the original `awk''s capabilities were strained -by tasks of such complexity, modern versions are more capable. Even -BWK `awk' has fewer predefined limits, and those that it has are much -larger than they used to be. +by tasks of such complexity, modern versions are more capable. If you find yourself writing `awk' scripts of more than, say, a few hundred lines, you might consider using a different programming @@ -2266,6 +2264,9 @@ File: gawk.info, Node: Intro Summary, Prev: When, Up: Getting Started * Programs in `awk' consist of PATTERN-ACTION pairs. + * An ACTION without a PATTERN always runs. The default ACTION for a + pattern without one is `{ print $0 }'. + * Use either `awk 'PROGRAM' FILES' or `awk -f PROGRAM-FILE FILES' to run `awk'. @@ -3207,7 +3208,7 @@ that matches every input record whose text belongs to that set. The simplest regular expression is a sequence of letters, numbers, or both. Such a regexp matches any string that contains that sequence. Thus, the regexp `foo' matches any string containing `foo'. Therefore, the -pattern `/foo/' matches any input record containing the three +pattern `/foo/' matches any input record containing the three adjacent characters `foo' _anywhere_ in the record. Other kinds of regexps let you specify more complicated classes of strings. @@ -3502,9 +3503,10 @@ sequences and that are not listed in the table stand for themselves: `|' This is the "alternation operator" and it is used to specify alternatives. The `|' has the lowest precedence of all the regular - expression operators. For example, `^P|[[:digit:]]' matches any - string that matches either `^P' or `[[:digit:]]'. This means it - matches any string that starts with `P' or contains a digit. + expression operators. For example, `^P|[aeiouy]' matches any + string that matches either `^P' or `[aeiouy]'. This means it + matches any string that starts with `P' or contains (anywhere + within it) a lowercase English vowel. The alternation applies to the largest possible regexps on either side. @@ -3630,7 +3632,9 @@ expression, put a `\' in front of it. For example: [d\]] -matches either `d' or `]'. +matches either `d' or `]'. Additionally, if you place `]' right after +the opening `[', the closing bracket is treated as one of the +characters to be matched. This treatment of `\' in bracket expressions is compatible with other `awk' implementations and is also mandated by POSIX. The regular @@ -4025,7 +4029,7 @@ File: gawk.info, Node: Regexp Summary, Prev: Computed Regexps, Up: Regexp extent of the match, such as for text substitution and when the record separator is a regexp. - * Matching expressions may use dynamic regexps; that is, string + * Matching expressions may use dynamic regexps, that is, string values treated as regular expressions. @@ -4078,13 +4082,13 @@ File: gawk.info, Node: Records, Next: Fields, Up: Reading Files 4.1 How Input Is Split into Records =================================== -The `awk' utility divides the input for your `awk' program into records -and fields. `awk' keeps track of the number of records that have been -read so far from the current input file. This value is stored in a -built-in variable called `FNR'. It is reset to zero when a new file is -started. Another built-in variable, `NR', records the total number of -input records read so far from all data files. It starts at zero, but -is never automatically reset to zero. +`awk' divides the input for your program into records and fields. It +keeps track of the number of records that have been read so far from +the current input file. This value is stored in a built-in variable +called `FNR' which is reset to zero when a new file is started. +Another built-in variable, `NR', records the total number of input +records read so far from all data files. It starts at zero, but is +never automatically reset to zero. * Menu: @@ -5339,8 +5343,8 @@ yet. Therefore, come back and study the `getline' command _after_ you have reviewed the rest of this Info file and have a good knowledge of how `awk' works. - The `getline' command returns one if it finds a record and zero if -it encounters the end of the file. If there is some error in getting a + The `getline' command returns 1 if it finds a record and 0 if it +encounters the end of the file. If there is some error in getting a record, such as a file that cannot be opened, then `getline' returns -1. In this case, `gawk' sets the variable `ERRNO' to a string describing the error that occurred. @@ -8441,9 +8445,9 @@ because of the way they work. Evaluation of the full expression is "short-circuited" if the result can be determined part way through its evaluation. - Statements that use `&&' or `||' can be continued simply by putting -a newline after them. But you cannot put a newline in front of either -of these operators without using backslash continuation (*note + Statements that end with `&&' or `||' can be continued simply by +putting a newline after them. But you cannot put a newline in front of +either of these operators without using backslash continuation (*note Statements/Lines::). The actual value of an expression using the `!' operator is either @@ -8919,7 +8923,7 @@ precisely `li': `li'.) Contrast this with the following regular expression match, which accepts any record with a first field that contains `li': - $ awk '$1 ~ /foo/ { print $2 }' mail-list + $ awk '$1 ~ /li/ { print $2 }' mail-list -| 555-5553 -| 555-6699 @@ -10802,7 +10806,8 @@ index, use the following expression: This expression tests whether the particular index INDX exists, without the side effect of creating that element if it is not present. The expression has the value one (true) if `ARRAY[INDX]' exists and zero -(false) if it does not exist. For example, this statement tests +(false) if it does not exist. (We use INDX here, since `index' is the +name of a built-in function.) For example, this statement tests whether the array `frequencies' contains the index `2': if (2 in frequencies) @@ -14651,8 +14656,7 @@ worrying about: } #### test code #### - # BEGIN \ - # { + # BEGIN { # for (;;) { # printf("enter a character: ") # if (getline var <= 0) @@ -15775,8 +15779,7 @@ the same names: # group.awk --- functions for dealing with the group file - BEGIN \ - { + BEGIN { # Change to suit your system _gr_awklib = "/usr/local/libexec/awk/" } @@ -16199,8 +16202,7 @@ through the command-line options. Exactly one of the variables should be done by fields or by characters, respectively. When cutting by characters, the output field separator is set to the null string: - BEGIN \ - { + BEGIN { FS = "\t" # default OFS = FS while ((c = getopt(ARGC, ARGV, "sf:c:d:")) != -1) { @@ -16585,8 +16587,7 @@ line is printed, with a leading file name and colon if necessary: The `END' rule takes care of producing the correct exit status. If there are no matches, the exit status is one; otherwise it is zero: - END \ - { + END { exit (total == 0) } @@ -16604,13 +16605,6 @@ options, and then exits: The variable `e' is used so that the function fits nicely on the printed page. - Just a note on programming style: you may have noticed that the `END' -rule uses backslash continuation, with the open brace on a line by -itself. This is so that it more closely resembles the way functions -are written. Many of the examples in this major node use this style. -You can decide for yourself if you like writing your `BEGIN' and `END' -rules this way or not. - ---------- Footnotes ---------- (1) It also introduces a subtle bug; if a match happens, we output @@ -16653,8 +16647,7 @@ and the group numbers: # uid=12(foo) euid=34(bar) gid=3(baz) \ # egid=5(blat) groups=9(nine),2(two),1(one) - BEGIN \ - { + BEGIN { uid = PROCINFO["uid"] euid = PROCINFO["euid"] gid = PROCINFO["gid"] @@ -16862,8 +16855,7 @@ input by setting `ARGV[1]' to `"-"' and `ARGC' to two: # Copy standard input to all named output files. # Append content if -a option is supplied. # - BEGIN \ - { + BEGIN { for (i = 1; i < ARGC; i++) copy[i] = ARGV[i] @@ -16913,8 +16905,7 @@ N input records and M output files, the first method only executes N Finally, the `END' rule cleans up by closing all the output files: - END \ - { + END { for (i in copy) close(copy[i]) } @@ -17001,8 +16992,7 @@ standard output, `/dev/stdout': # -n skip n fields # +n skip n characters, skip fields first - BEGIN \ - { + BEGIN { count = 1 outputfile = "/dev/stdout" opts = "udc0:1:2:3:4:5:6:7:8:9:" @@ -17390,8 +17380,7 @@ Statement::), but the processing could be done with a series of # Requires getlocaltime() library function # usage: alarm time [ "message" [ count [ delay ] ] ] - BEGIN \ - { + BEGIN { # Initial argument sanity checking usage1 = "usage: alarm time ['message' [count [delay]]]" usage2 = sprintf("\t(%s) time ::= hh:mm", ARGV[1]) @@ -17712,8 +17701,7 @@ not have been an even multiple of 20 labels in the data: Count++ } - END \ - { + END { printpage() } @@ -30962,11 +30950,11 @@ Index * ' (single quote), vs. apostrophe: Comments. (line 27) * ' (single quote), with double quotes: Quoting. (line 70) * () (parentheses), in a profile: Profiling. (line 146) -* () (parentheses), regexp operator: Regexp Operators. (line 80) +* () (parentheses), regexp operator: Regexp Operators. (line 81) * * (asterisk), * operator, as multiplication operator: Precedence. (line 55) * * (asterisk), * operator, as regexp operator: Regexp Operators. - (line 88) + (line 89) * * (asterisk), * operator, null strings, matching: Gory Details. (line 143) * * (asterisk), ** operator <1>: Precedence. (line 49) @@ -30980,7 +30968,7 @@ Index * + (plus sign), ++ operator: Increment Ops. (line 11) * + (plus sign), += operator <1>: Precedence. (line 95) * + (plus sign), += operator: Assignment Ops. (line 82) -* + (plus sign), regexp operator: Regexp Operators. (line 103) +* + (plus sign), regexp operator: Regexp Operators. (line 104) * , (comma), in range patterns: Ranges. (line 6) * - (hyphen), - operator: Precedence. (line 52) * - (hyphen), -- operator <1>: Precedence. (line 46) @@ -31123,7 +31111,7 @@ Index * ? (question mark), ?: operator: Precedence. (line 92) * ? (question mark), regexp operator <1>: GNU Regexp Operators. (line 59) -* ? (question mark), regexp operator: Regexp Operators. (line 112) +* ? (question mark), regexp operator: Regexp Operators. (line 113) * [] (square brackets), regexp operator: Regexp Operators. (line 56) * \ (backslash): Comments. (line 50) * \ (backslash) in shell commands: Read Terminal. (line 25) @@ -31160,7 +31148,6 @@ Index (line 38) * \ (backslash), as field separator: Command Line Field Separator. (line 27) -* \ (backslash), continuing lines and <1>: Egrep Program. (line 223) * \ (backslash), continuing lines and: Statements/Lines. (line 19) * \ (backslash), continuing lines and, comments and: Statements/Lines. (line 76) @@ -31326,7 +31313,7 @@ Index * asterisk (*), * operator, as multiplication operator: Precedence. (line 55) * asterisk (*), * operator, as regexp operator: Regexp Operators. - (line 88) + (line 89) * asterisk (*), * operator, null strings, matching: Gory Details. (line 143) * asterisk (*), ** operator <1>: Precedence. (line 49) @@ -31344,7 +31331,7 @@ Index * awk programs <1>: Two Rules. (line 6) * awk programs <2>: Executable Scripts. (line 6) * awk programs: Getting Started. (line 12) -* awk programs, complex: When. (line 29) +* awk programs, complex: When. (line 27) * awk programs, documenting <1>: Library Names. (line 6) * awk programs, documenting: Comments. (line 6) * awk programs, examples of: Sample Programs. (line 6) @@ -31433,7 +31420,6 @@ Index (line 38) * backslash (\), as field separator: Command Line Field Separator. (line 27) -* backslash (\), continuing lines and <1>: Egrep Program. (line 223) * backslash (\), continuing lines and: Statements/Lines. (line 19) * backslash (\), continuing lines and, comments and: Statements/Lines. (line 76) @@ -31509,15 +31495,15 @@ Index * bracket expressions <1>: Bracket Expressions. (line 6) * bracket expressions: Regexp Operators. (line 56) * bracket expressions, character classes: Bracket Expressions. - (line 30) + (line 32) * bracket expressions, collating elements: Bracket Expressions. - (line 77) + (line 79) * bracket expressions, collating symbols: Bracket Expressions. - (line 84) + (line 86) * bracket expressions, complemented: Regexp Operators. (line 64) * bracket expressions, equivalence classes: Bracket Expressions. - (line 90) -* bracket expressions, non-ASCII: Bracket Expressions. (line 77) + (line 92) +* bracket expressions, non-ASCII: Bracket Expressions. (line 79) * bracket expressions, range expressions: Bracket Expressions. (line 6) * break debugger command: Breakpoint Control. (line 11) @@ -31634,8 +31620,8 @@ Index * Close, Diane <1>: Contributors. (line 20) * Close, Diane: Manual History. (line 34) * Collado, Manuel: Acknowledgments. (line 60) -* collating elements: Bracket Expressions. (line 77) -* collating symbols: Bracket Expressions. (line 84) +* collating elements: Bracket Expressions. (line 79) +* collating symbols: Bracket Expressions. (line 86) * Colombo, Antonio <1>: Contributors. (line 137) * Colombo, Antonio: Acknowledgments. (line 60) * columns, aligning: Print Examples. (line 70) @@ -32058,7 +32044,7 @@ Index * effective group ID of gawk user: Auto-set. (line 133) * effective user ID of gawk user: Auto-set. (line 137) * egrep utility <1>: Egrep Program. (line 6) -* egrep utility: Bracket Expressions. (line 24) +* egrep utility: Bracket Expressions. (line 26) * egrep.awk program: Egrep Program. (line 54) * elements in arrays, assigning values: Assigning Elements. (line 6) * elements in arrays, deleting: Delete. (line 6) @@ -32084,7 +32070,6 @@ Index * END pattern, and profiling: Profiling. (line 62) * END pattern, assert() user-defined function and: Assert Function. (line 75) -* END pattern, backslash continuation and: Egrep Program. (line 223) * END pattern, Boolean patterns and: Expression Patterns. (line 70) * END pattern, exit statement and: Exit Statement. (line 12) * END pattern, next/nextfile statements and <1>: Next Statement. @@ -32096,8 +32081,8 @@ Index * ENDFILE pattern: BEGINFILE/ENDFILE. (line 6) * ENDFILE pattern, Boolean patterns and: Expression Patterns. (line 70) * endfile() user-defined function: Filetrans Function. (line 62) -* endgrent() function (C library): Group Functions. (line 213) -* endgrent() user-defined function: Group Functions. (line 216) +* endgrent() function (C library): Group Functions. (line 212) +* endgrent() user-defined function: Group Functions. (line 215) * endpwent() function (C library): Passwd Functions. (line 210) * endpwent() user-defined function: Passwd Functions. (line 213) * English, Steve: Advanced Features. (line 6) @@ -32110,7 +32095,7 @@ Index * equals sign (=), == operator <1>: Precedence. (line 65) * equals sign (=), == operator: Comparison Operators. (line 11) -* EREs (Extended Regular Expressions): Bracket Expressions. (line 24) +* EREs (Extended Regular Expressions): Bracket Expressions. (line 26) * ERRNO variable <1>: TCP/IP Networking. (line 54) * ERRNO variable: Auto-set. (line 74) * ERRNO variable, with BEGINFILE pattern: BEGINFILE/ENDFILE. (line 26) @@ -32165,7 +32150,7 @@ Index * expressions, matching, See comparison expressions: Typing and Comparison. (line 9) * expressions, selecting: Conditional Exp. (line 6) -* Extended Regular Expressions (EREs): Bracket Expressions. (line 24) +* Extended Regular Expressions (EREs): Bracket Expressions. (line 26) * extension API: Extension API Description. (line 6) * extension API informational variables: Extension API Informational Variables. @@ -32231,7 +32216,7 @@ Index (line 6) * field separators, regular expressions as: Field Separators. (line 51) * field separators, See Also OFS: Changing Fields. (line 64) -* field separators, spaces as: Cut Program. (line 109) +* field separators, spaces as: Cut Program. (line 108) * fields <1>: Basic High Level. (line 73) * fields <2>: Fields. (line 6) * fields: Reading Files. (line 14) @@ -32428,7 +32413,7 @@ Index * gawk, bitwise operations in: Bitwise Functions. (line 39) * gawk, break statement in: Break Statement. (line 51) * gawk, built-in variables and: Built-in Variables. (line 14) -* gawk, character classes and: Bracket Expressions. (line 98) +* gawk, character classes and: Bracket Expressions. (line 100) * gawk, coding style in: Adding Code. (line 39) * gawk, command-line options, and regular expressions: GNU Regexp Operators. (line 70) @@ -32479,7 +32464,7 @@ Index (line 13) * gawk, interpreter, adding code to: Using Internal File Ops. (line 6) -* gawk, interval expressions and: Regexp Operators. (line 140) +* gawk, interval expressions and: Regexp Operators. (line 141) * gawk, line continuation in: Conditional Exp. (line 34) * gawk, LINT variable in: User-modified. (line 88) * gawk, list of contributors to: Contributors. (line 6) @@ -32497,7 +32482,7 @@ Index (line 26) * gawk, regular expressions, operators: GNU Regexp Operators. (line 6) -* gawk, regular expressions, precedence: Regexp Operators. (line 162) +* gawk, regular expressions, precedence: Regexp Operators. (line 163) * gawk, RT variable in <1>: Auto-set. (line 257) * gawk, RT variable in <2>: Multiple Line. (line 129) * gawk, RT variable in: awk split records. (line 124) @@ -32525,12 +32510,12 @@ Index * getaddrinfo() function (C library): TCP/IP Networking. (line 38) * getgrent() function (C library): Group Functions. (line 6) * getgrent() user-defined function: Group Functions. (line 6) -* getgrgid() function (C library): Group Functions. (line 184) -* getgrgid() user-defined function: Group Functions. (line 187) -* getgrnam() function (C library): Group Functions. (line 173) -* getgrnam() user-defined function: Group Functions. (line 178) -* getgruser() function (C library): Group Functions. (line 193) -* getgruser() function, user-defined: Group Functions. (line 196) +* getgrgid() function (C library): Group Functions. (line 183) +* getgrgid() user-defined function: Group Functions. (line 186) +* getgrnam() function (C library): Group Functions. (line 172) +* getgrnam() user-defined function: Group Functions. (line 177) +* getgruser() function (C library): Group Functions. (line 192) +* getgruser() function, user-defined: Group Functions. (line 195) * getline command: Reading Files. (line 20) * getline command, _gr_init() user-defined function: Group Functions. (line 83) @@ -32704,7 +32689,7 @@ Index (line 13) * internationalization, localization: User-modified. (line 152) * internationalization, localization, character classes: Bracket Expressions. - (line 98) + (line 100) * internationalization, localization, gawk and: Internationalization. (line 13) * internationalization, localization, locale categories: Explaining gettext. @@ -32716,7 +32701,7 @@ Index * internationalizing a program: Explaining gettext. (line 6) * interpreted programs <1>: Glossary. (line 356) * interpreted programs: Basic High Level. (line 15) -* interval expressions, regexp operator: Regexp Operators. (line 117) +* interval expressions, regexp operator: Regexp Operators. (line 118) * inventory-shipped file: Sample Data Files. (line 32) * invoke shell command: I/O Functions. (line 75) * isarray: Type Functions. (line 11) @@ -33074,7 +33059,7 @@ Index * Papadopoulos, Panos: Contributors. (line 128) * parent process ID of gawk process: Auto-set. (line 181) * parentheses (), in a profile: Profiling. (line 146) -* parentheses (), regexp operator: Regexp Operators. (line 80) +* parentheses (), regexp operator: Regexp Operators. (line 81) * password file: Passwd Functions. (line 16) * patsplit: String Functions. (line 294) * patterns: Patterns and Actions. @@ -33112,7 +33097,7 @@ Index * plus sign (+), ++ operator: Increment Ops. (line 11) * plus sign (+), += operator <1>: Precedence. (line 95) * plus sign (+), += operator: Assignment Ops. (line 82) -* plus sign (+), regexp operator: Regexp Operators. (line 103) +* plus sign (+), regexp operator: Regexp Operators. (line 104) * pointers to functions: Indirect Calls. (line 6) * portability: Escape Sequences. (line 98) * portability, #! (executable scripts): Executable Scripts. (line 33) @@ -33162,9 +33147,9 @@ Index * POSIX awk, backslashes in string constants: Escape Sequences. (line 116) * POSIX awk, BEGIN/END patterns: I/O And BEGIN/END. (line 16) -* POSIX awk, bracket expressions and: Bracket Expressions. (line 24) +* POSIX awk, bracket expressions and: Bracket Expressions. (line 26) * POSIX awk, bracket expressions and, character classes: Bracket Expressions. - (line 30) + (line 32) * POSIX awk, break statement and: Break Statement. (line 51) * POSIX awk, changes in awk versions: POSIX. (line 6) * POSIX awk, continue statement and: Continue Statement. (line 44) @@ -33178,14 +33163,14 @@ Index * POSIX awk, functions and, gsub()/sub(): Gory Details. (line 90) * POSIX awk, functions and, length(): String Functions. (line 176) * POSIX awk, GNU long options and: Options. (line 15) -* POSIX awk, interval expressions in: Regexp Operators. (line 136) +* POSIX awk, interval expressions in: Regexp Operators. (line 137) * POSIX awk, next/nextfile statements and: Next Statement. (line 45) * POSIX awk, numeric strings and: Variable Typing. (line 6) * POSIX awk, OFMT variable and <1>: Strings And Numbers. (line 57) * POSIX awk, OFMT variable and: OFMT. (line 27) * POSIX awk, period (.), using: Regexp Operators. (line 51) * POSIX awk, printf format strings and: Format Modifiers. (line 159) -* POSIX awk, regular expressions and: Regexp Operators. (line 162) +* POSIX awk, regular expressions and: Regexp Operators. (line 163) * POSIX awk, timestamps and: Time Functions. (line 6) * POSIX awk, | I/O operator and: Getline/Pipe. (line 55) * POSIX mode: Options. (line 254) @@ -33196,7 +33181,7 @@ Index * PREC variable: User-modified. (line 124) * precedence <1>: Precedence. (line 6) * precedence: Increment Ops. (line 60) -* precedence, regexp operators: Regexp Operators. (line 157) +* precedence, regexp operators: Regexp Operators. (line 158) * print debugger command: Viewing And Changing Data. (line 36) * print statement: Printing. (line 16) @@ -33283,7 +33268,7 @@ Index * question mark (?), ?: operator: Precedence. (line 92) * question mark (?), regexp operator <1>: GNU Regexp Operators. (line 59) -* question mark (?), regexp operator: Regexp Operators. (line 112) +* question mark (?), regexp operator: Regexp Operators. (line 113) * QuikTrim Awk: Other Versions. (line 135) * quit debugger command: Miscellaneous Debugger Commands. (line 99) @@ -33383,7 +33368,7 @@ Index * regular expressions, operators, gawk: GNU Regexp Operators. (line 6) * regular expressions, operators, precedence of: Regexp Operators. - (line 157) + (line 158) * regular expressions, searching for: Egrep Program. (line 6) * relational operators, See comparison operators: Typing and Comparison. (line 9) @@ -33593,7 +33578,7 @@ Index * single-step execution, in the debugger: Debugger Execution Control. (line 43) * Skywalker, Luke: Undocumented. (line 6) -* sleep utility: Alarm Program. (line 111) +* sleep utility: Alarm Program. (line 110) * sleep() extension function: Extension Sample Time. (line 22) * Solaris, POSIX-compliant awk: Other Versions. (line 96) @@ -34013,516 +33998,516 @@ Node: Statements/Lines102442 Ref: Statements/Lines-Footnote-1106898 Node: Other Features107163 Node: When108091 -Ref: When-Footnote-1109952 -Node: Intro Summary110017 -Node: Invoking Gawk110783 -Node: Command Line112298 -Node: Options113089 -Ref: Options-Footnote-1128865 -Node: Other Arguments128890 -Node: Naming Standard Input131552 -Node: Environment Variables132645 -Node: AWKPATH Variable133203 -Ref: AWKPATH Variable-Footnote-1136069 -Ref: AWKPATH Variable-Footnote-2136114 -Node: AWKLIBPATH Variable136374 -Node: Other Environment Variables137133 -Node: Exit Status140790 -Node: Include Files141465 -Node: Loading Shared Libraries145043 -Node: Obsolete146427 -Node: Undocumented147124 -Node: Invoking Summary147391 -Node: Regexp148991 -Node: Regexp Usage150441 -Node: Escape Sequences152474 -Node: Regexp Operators158291 -Ref: Regexp Operators-Footnote-1165771 -Ref: Regexp Operators-Footnote-2165918 -Node: Bracket Expressions166016 -Ref: table-char-classes167906 -Node: GNU Regexp Operators170846 -Node: Case-sensitivity174555 -Ref: Case-sensitivity-Footnote-1177447 -Ref: Case-sensitivity-Footnote-2177682 -Node: Leftmost Longest177790 -Node: Computed Regexps178991 -Node: Regexp Summary182363 -Node: Reading Files183832 -Node: Records185924 -Node: awk split records186667 -Node: gawk split records191525 -Ref: gawk split records-Footnote-1196046 -Node: Fields196083 -Ref: Fields-Footnote-1199047 -Node: Nonconstant Fields199133 -Ref: Nonconstant Fields-Footnote-1201363 -Node: Changing Fields201565 -Node: Field Separators207519 -Node: Default Field Splitting210221 -Node: Regexp Field Splitting211338 -Node: Single Character Fields214665 -Node: Command Line Field Separator215724 -Node: Full Line Fields219150 -Ref: Full Line Fields-Footnote-1219658 -Node: Field Splitting Summary219704 -Ref: Field Splitting Summary-Footnote-1222836 -Node: Constant Size222937 -Node: Splitting By Content227543 -Ref: Splitting By Content-Footnote-1231616 -Node: Multiple Line231656 -Ref: Multiple Line-Footnote-1237512 -Node: Getline237691 -Node: Plain Getline239907 -Node: Getline/Variable242002 -Node: Getline/File243149 -Node: Getline/Variable/File244533 -Ref: Getline/Variable/File-Footnote-1246132 -Node: Getline/Pipe246219 -Node: Getline/Variable/Pipe248905 -Node: Getline/Coprocess250012 -Node: Getline/Variable/Coprocess251264 -Node: Getline Notes252001 -Node: Getline Summary254805 -Ref: table-getline-variants255213 -Node: Read Timeout256125 -Ref: Read Timeout-Footnote-1259952 -Node: Command-line directories260010 -Node: Input Summary260914 -Node: Input Exercises264051 -Node: Printing264784 -Node: Print266506 -Node: Print Examples267999 -Node: Output Separators270778 -Node: OFMT272794 -Node: Printf274152 -Node: Basic Printf275058 -Node: Control Letters276597 -Node: Format Modifiers280588 -Node: Printf Examples286615 -Node: Redirection289079 -Node: Special Files296051 -Node: Special FD296584 -Ref: Special FD-Footnote-1300181 -Node: Special Network300255 -Node: Special Caveats301105 -Node: Close Files And Pipes301901 -Ref: Close Files And Pipes-Footnote-1309062 -Ref: Close Files And Pipes-Footnote-2309210 -Node: Output Summary309360 -Node: Output exercises310357 -Node: Expressions311037 -Node: Values312222 -Node: Constants312898 -Node: Scalar Constants313578 -Ref: Scalar Constants-Footnote-1314437 -Node: Nondecimal-numbers314687 -Node: Regexp Constants317687 -Node: Using Constant Regexps318162 -Node: Variables321234 -Node: Using Variables321889 -Node: Assignment Options323613 -Node: Conversion325488 -Node: Strings And Numbers326012 -Ref: Strings And Numbers-Footnote-1329074 -Node: Locale influences conversions329183 -Ref: table-locale-affects331900 -Node: All Operators332488 -Node: Arithmetic Ops333118 -Node: Concatenation335623 -Ref: Concatenation-Footnote-1338442 -Node: Assignment Ops338548 -Ref: table-assign-ops343531 -Node: Increment Ops344834 -Node: Truth Values and Conditions348272 -Node: Truth Values349355 -Node: Typing and Comparison350404 -Node: Variable Typing351197 -Node: Comparison Operators354849 -Ref: table-relational-ops355259 -Node: POSIX String Comparison358809 -Ref: POSIX String Comparison-Footnote-1359893 -Node: Boolean Ops360031 -Ref: Boolean Ops-Footnote-1364101 -Node: Conditional Exp364192 -Node: Function Calls365919 -Node: Precedence369799 -Node: Locales373468 -Node: Expressions Summary375099 -Node: Patterns and Actions377640 -Node: Pattern Overview378756 -Node: Regexp Patterns380433 -Node: Expression Patterns380976 -Node: Ranges384757 -Node: BEGIN/END387863 -Node: Using BEGIN/END388625 -Ref: Using BEGIN/END-Footnote-1391361 -Node: I/O And BEGIN/END391467 -Node: BEGINFILE/ENDFILE393738 -Node: Empty396669 -Node: Using Shell Variables396986 -Node: Action Overview399269 -Node: Statements401596 -Node: If Statement403444 -Node: While Statement404942 -Node: Do Statement406986 -Node: For Statement408142 -Node: Switch Statement411294 -Node: Break Statement413682 -Node: Continue Statement415723 -Node: Next Statement417548 -Node: Nextfile Statement419938 -Node: Exit Statement422574 -Node: Built-in Variables424978 -Node: User-modified426105 -Ref: User-modified-Footnote-1433794 -Node: Auto-set433856 -Ref: Auto-set-Footnote-1446438 -Ref: Auto-set-Footnote-2446643 -Node: ARGC and ARGV446699 -Node: Pattern Action Summary450603 -Node: Arrays452826 -Node: Array Basics454375 -Node: Array Intro455201 -Ref: figure-array-elements457174 -Node: Reference to Elements459581 -Node: Assigning Elements461960 -Node: Array Example462451 -Node: Scanning an Array464183 -Node: Controlling Scanning467184 -Ref: Controlling Scanning-Footnote-1472357 -Node: Delete472673 -Ref: Delete-Footnote-1475424 -Node: Numeric Array Subscripts475481 -Node: Uninitialized Subscripts477664 -Node: Multidimensional479289 -Node: Multiscanning482402 -Node: Arrays of Arrays483991 -Node: Arrays Summary488654 -Node: Functions490759 -Node: Built-in491632 -Node: Calling Built-in492710 -Node: Numeric Functions494698 -Ref: Numeric Functions-Footnote-1498732 -Ref: Numeric Functions-Footnote-2499089 -Ref: Numeric Functions-Footnote-3499137 -Node: String Functions499406 -Ref: String Functions-Footnote-1522403 -Ref: String Functions-Footnote-2522532 -Ref: String Functions-Footnote-3522780 -Node: Gory Details522867 -Ref: table-sub-escapes524640 -Ref: table-sub-proposed526160 -Ref: table-posix-sub527524 -Ref: table-gensub-escapes529064 -Ref: Gory Details-Footnote-1530240 -Node: I/O Functions530391 -Ref: I/O Functions-Footnote-1537501 -Node: Time Functions537648 -Ref: Time Functions-Footnote-1548112 -Ref: Time Functions-Footnote-2548180 -Ref: Time Functions-Footnote-3548338 -Ref: Time Functions-Footnote-4548449 -Ref: Time Functions-Footnote-5548561 -Ref: Time Functions-Footnote-6548788 -Node: Bitwise Functions549054 -Ref: table-bitwise-ops549616 -Ref: Bitwise Functions-Footnote-1553861 -Node: Type Functions554045 -Node: I18N Functions555187 -Node: User-defined556832 -Node: Definition Syntax557636 -Ref: Definition Syntax-Footnote-1562815 -Node: Function Example562884 -Ref: Function Example-Footnote-1565524 -Node: Function Caveats565546 -Node: Calling A Function566064 -Node: Variable Scope567019 -Node: Pass By Value/Reference570007 -Node: Return Statement573517 -Node: Dynamic Typing576501 -Node: Indirect Calls577430 -Node: Functions Summary587143 -Node: Library Functions589682 -Ref: Library Functions-Footnote-1593300 -Ref: Library Functions-Footnote-2593443 -Node: Library Names593614 -Ref: Library Names-Footnote-1597087 -Ref: Library Names-Footnote-2597307 -Node: General Functions597393 -Node: Strtonum Function598421 -Node: Assert Function601201 -Node: Round Function604527 -Node: Cliff Random Function606068 -Node: Ordinal Functions607084 -Ref: Ordinal Functions-Footnote-1610161 -Ref: Ordinal Functions-Footnote-2610413 -Node: Join Function610624 -Ref: Join Function-Footnote-1612395 -Node: Getlocaltime Function612595 -Node: Readfile Function616331 -Node: Data File Management618170 -Node: Filetrans Function618802 -Node: Rewind Function622871 -Node: File Checking624429 -Ref: File Checking-Footnote-1625561 -Node: Empty Files625762 -Node: Ignoring Assigns627741 -Node: Getopt Function629295 -Ref: Getopt Function-Footnote-1640598 -Node: Passwd Functions640801 -Ref: Passwd Functions-Footnote-1649780 -Node: Group Functions649868 -Ref: Group Functions-Footnote-1657809 -Node: Walking Arrays658022 -Node: Library Functions Summary659625 -Node: Library exercises661013 -Node: Sample Programs662293 -Node: Running Examples663063 -Node: Clones663791 -Node: Cut Program665015 -Node: Egrep Program674883 -Ref: Egrep Program-Footnote-1682854 -Node: Id Program682964 -Node: Split Program686628 -Ref: Split Program-Footnote-1690166 -Node: Tee Program690294 -Node: Uniq Program693101 -Node: Wc Program700531 -Ref: Wc Program-Footnote-1704796 -Node: Miscellaneous Programs704888 -Node: Dupword Program706101 -Node: Alarm Program708132 -Node: Translate Program712946 -Ref: Translate Program-Footnote-1717337 -Ref: Translate Program-Footnote-2717607 -Node: Labels Program717741 -Ref: Labels Program-Footnote-1721112 -Node: Word Sorting721196 -Node: History Sorting725239 -Node: Extract Program727075 -Node: Simple Sed734611 -Node: Igawk Program737673 -Ref: Igawk Program-Footnote-1751977 -Ref: Igawk Program-Footnote-2752178 -Node: Anagram Program752316 -Node: Signature Program755384 -Node: Programs Summary756631 -Node: Programs Exercises757846 -Node: Advanced Features761497 -Node: Nondecimal Data763445 -Node: Array Sorting765022 -Node: Controlling Array Traversal765719 -Node: Array Sorting Functions773999 -Ref: Array Sorting Functions-Footnote-1777906 -Node: Two-way I/O778100 -Ref: Two-way I/O-Footnote-1783044 -Ref: Two-way I/O-Footnote-2783223 -Node: TCP/IP Networking783305 -Node: Profiling786150 -Node: Advanced Features Summary793692 -Node: Internationalization795556 -Node: I18N and L10N797036 -Node: Explaining gettext797722 -Ref: Explaining gettext-Footnote-1802748 -Ref: Explaining gettext-Footnote-2802932 -Node: Programmer i18n803097 -Ref: Programmer i18n-Footnote-1807891 -Node: Translator i18n807940 -Node: String Extraction808734 -Ref: String Extraction-Footnote-1809867 -Node: Printf Ordering809953 -Ref: Printf Ordering-Footnote-1812735 -Node: I18N Portability812799 -Ref: I18N Portability-Footnote-1815248 -Node: I18N Example815311 -Ref: I18N Example-Footnote-1818017 -Node: Gawk I18N818089 -Node: I18N Summary818727 -Node: Debugger820066 -Node: Debugging821088 -Node: Debugging Concepts821529 -Node: Debugging Terms823385 -Node: Awk Debugging825982 -Node: Sample Debugging Session826874 -Node: Debugger Invocation827394 -Node: Finding The Bug828727 -Node: List of Debugger Commands835209 -Node: Breakpoint Control836541 -Node: Debugger Execution Control840205 -Node: Viewing And Changing Data843565 -Node: Execution Stack846923 -Node: Debugger Info848436 -Node: Miscellaneous Debugger Commands852430 -Node: Readline Support857614 -Node: Limitations858506 -Node: Debugging Summary860780 -Node: Arbitrary Precision Arithmetic861948 -Node: Computer Arithmetic863435 -Ref: Computer Arithmetic-Footnote-1867822 -Node: Math Definitions867879 -Ref: table-ieee-formats871168 -Ref: Math Definitions-Footnote-1871708 -Node: MPFR features871811 -Node: FP Math Caution873428 -Ref: FP Math Caution-Footnote-1874478 -Node: Inexactness of computations874847 -Node: Inexact representation875795 -Node: Comparing FP Values877150 -Node: Errors accumulate878114 -Node: Getting Accuracy879547 -Node: Try To Round882206 -Node: Setting precision883105 -Ref: table-predefined-precision-strings883787 -Node: Setting the rounding mode885580 -Ref: table-gawk-rounding-modes885944 -Ref: Setting the rounding mode-Footnote-1889398 -Node: Arbitrary Precision Integers889577 -Ref: Arbitrary Precision Integers-Footnote-1892558 -Node: POSIX Floating Point Problems892707 -Ref: POSIX Floating Point Problems-Footnote-1896583 -Node: Floating point summary896621 -Node: Dynamic Extensions898825 -Node: Extension Intro900377 -Node: Plugin License901642 -Node: Extension Mechanism Outline902327 -Ref: figure-load-extension902751 -Ref: figure-load-new-function904236 -Ref: figure-call-new-function905238 -Node: Extension API Description907222 -Node: Extension API Functions Introduction908672 -Node: General Data Types913539 -Ref: General Data Types-Footnote-1919232 -Node: Requesting Values919531 -Ref: table-value-types-returned920268 -Node: Memory Allocation Functions921226 -Ref: Memory Allocation Functions-Footnote-1923973 -Node: Constructor Functions924069 -Node: Registration Functions925827 -Node: Extension Functions926512 -Node: Exit Callback Functions928814 -Node: Extension Version String930062 -Node: Input Parsers930712 -Node: Output Wrappers940526 -Node: Two-way processors945042 -Node: Printing Messages947246 -Ref: Printing Messages-Footnote-1948323 -Node: Updating `ERRNO'948475 -Node: Accessing Parameters949214 -Node: Symbol Table Access950444 -Node: Symbol table by name950958 -Node: Symbol table by cookie952934 -Ref: Symbol table by cookie-Footnote-1957067 -Node: Cached values957130 -Ref: Cached values-Footnote-1960634 -Node: Array Manipulation960725 -Ref: Array Manipulation-Footnote-1961823 -Node: Array Data Types961862 -Ref: Array Data Types-Footnote-1964565 -Node: Array Functions964657 -Node: Flattening Arrays968531 -Node: Creating Arrays975383 -Node: Extension API Variables980114 -Node: Extension Versioning980750 -Node: Extension API Informational Variables982651 -Node: Extension API Boilerplate983737 -Node: Finding Extensions987541 -Node: Extension Example988101 -Node: Internal File Description988831 -Node: Internal File Ops992922 -Ref: Internal File Ops-Footnote-11004354 -Node: Using Internal File Ops1004494 -Ref: Using Internal File Ops-Footnote-11006841 -Node: Extension Samples1007109 -Node: Extension Sample File Functions1008633 -Node: Extension Sample Fnmatch1016201 -Node: Extension Sample Fork1017683 -Node: Extension Sample Inplace1018896 -Node: Extension Sample Ord1020571 -Node: Extension Sample Readdir1021407 -Ref: table-readdir-file-types1022263 -Node: Extension Sample Revout1023062 -Node: Extension Sample Rev2way1023653 -Node: Extension Sample Read write array1024394 -Node: Extension Sample Readfile1026273 -Node: Extension Sample API Tests1027373 -Node: Extension Sample Time1027898 -Node: gawkextlib1029213 -Node: Extension summary1032026 -Node: Extension Exercises1035719 -Node: Language History1036441 -Node: V7/SVR3.11038084 -Node: SVR41040404 -Node: POSIX1041846 -Node: BTL1043232 -Node: POSIX/GNU1043966 -Node: Feature History1049682 -Node: Common Extensions1062773 -Node: Ranges and Locales1064085 -Ref: Ranges and Locales-Footnote-11068702 -Ref: Ranges and Locales-Footnote-21068729 -Ref: Ranges and Locales-Footnote-31068963 -Node: Contributors1069184 -Node: History summary1074609 -Node: Installation1075978 -Node: Gawk Distribution1076929 -Node: Getting1077413 -Node: Extracting1078237 -Node: Distribution contents1079879 -Node: Unix Installation1085596 -Node: Quick Installation1086213 -Node: Additional Configuration Options1088655 -Node: Configuration Philosophy1090393 -Node: Non-Unix Installation1092744 -Node: PC Installation1093202 -Node: PC Binary Installation1094513 -Node: PC Compiling1096361 -Ref: PC Compiling-Footnote-11099360 -Node: PC Testing1099465 -Node: PC Using1100641 -Node: Cygwin1104793 -Node: MSYS1105602 -Node: VMS Installation1106116 -Node: VMS Compilation1106912 -Ref: VMS Compilation-Footnote-11108134 -Node: VMS Dynamic Extensions1108192 -Node: VMS Installation Details1109565 -Node: VMS Running1111817 -Node: VMS GNV1114651 -Node: VMS Old Gawk1115374 -Node: Bugs1115844 -Node: Other Versions1119848 -Node: Installation summary1126075 -Node: Notes1127131 -Node: Compatibility Mode1127996 -Node: Additions1128778 -Node: Accessing The Source1129703 -Node: Adding Code1131139 -Node: New Ports1137317 -Node: Derived Files1141798 -Ref: Derived Files-Footnote-11146879 -Ref: Derived Files-Footnote-21146913 -Ref: Derived Files-Footnote-31147509 -Node: Future Extensions1147623 -Node: Implementation Limitations1148229 -Node: Extension Design1149477 -Node: Old Extension Problems1150631 -Ref: Old Extension Problems-Footnote-11152148 -Node: Extension New Mechanism Goals1152205 -Ref: Extension New Mechanism Goals-Footnote-11155565 -Node: Extension Other Design Decisions1155754 -Node: Extension Future Growth1157860 -Node: Old Extension Mechanism1158696 -Node: Notes summary1160458 -Node: Basic Concepts1161644 -Node: Basic High Level1162325 -Ref: figure-general-flow1162597 -Ref: figure-process-flow1163196 -Ref: Basic High Level-Footnote-11166425 -Node: Basic Data Typing1166610 -Node: Glossary1169938 -Node: Copying1195090 -Node: GNU Free Documentation License1232646 -Node: Index1257782 +Ref: When-Footnote-1109847 +Node: Intro Summary109912 +Node: Invoking Gawk110795 +Node: Command Line112310 +Node: Options113101 +Ref: Options-Footnote-1128877 +Node: Other Arguments128902 +Node: Naming Standard Input131564 +Node: Environment Variables132657 +Node: AWKPATH Variable133215 +Ref: AWKPATH Variable-Footnote-1136081 +Ref: AWKPATH Variable-Footnote-2136126 +Node: AWKLIBPATH Variable136386 +Node: Other Environment Variables137145 +Node: Exit Status140802 +Node: Include Files141477 +Node: Loading Shared Libraries145055 +Node: Obsolete146439 +Node: Undocumented147136 +Node: Invoking Summary147403 +Node: Regexp149003 +Node: Regexp Usage150462 +Node: Escape Sequences152495 +Node: Regexp Operators158312 +Ref: Regexp Operators-Footnote-1165830 +Ref: Regexp Operators-Footnote-2165977 +Node: Bracket Expressions166075 +Ref: table-char-classes168097 +Node: GNU Regexp Operators171037 +Node: Case-sensitivity174746 +Ref: Case-sensitivity-Footnote-1177638 +Ref: Case-sensitivity-Footnote-2177873 +Node: Leftmost Longest177981 +Node: Computed Regexps179182 +Node: Regexp Summary182554 +Node: Reading Files184023 +Node: Records186115 +Node: awk split records186837 +Node: gawk split records191695 +Ref: gawk split records-Footnote-1196216 +Node: Fields196253 +Ref: Fields-Footnote-1199217 +Node: Nonconstant Fields199303 +Ref: Nonconstant Fields-Footnote-1201533 +Node: Changing Fields201735 +Node: Field Separators207689 +Node: Default Field Splitting210391 +Node: Regexp Field Splitting211508 +Node: Single Character Fields214835 +Node: Command Line Field Separator215894 +Node: Full Line Fields219320 +Ref: Full Line Fields-Footnote-1219828 +Node: Field Splitting Summary219874 +Ref: Field Splitting Summary-Footnote-1223006 +Node: Constant Size223107 +Node: Splitting By Content227713 +Ref: Splitting By Content-Footnote-1231786 +Node: Multiple Line231826 +Ref: Multiple Line-Footnote-1237682 +Node: Getline237861 +Node: Plain Getline240072 +Node: Getline/Variable242167 +Node: Getline/File243314 +Node: Getline/Variable/File244698 +Ref: Getline/Variable/File-Footnote-1246297 +Node: Getline/Pipe246384 +Node: Getline/Variable/Pipe249070 +Node: Getline/Coprocess250177 +Node: Getline/Variable/Coprocess251429 +Node: Getline Notes252166 +Node: Getline Summary254970 +Ref: table-getline-variants255378 +Node: Read Timeout256290 +Ref: Read Timeout-Footnote-1260117 +Node: Command-line directories260175 +Node: Input Summary261079 +Node: Input Exercises264216 +Node: Printing264949 +Node: Print266671 +Node: Print Examples268164 +Node: Output Separators270943 +Node: OFMT272959 +Node: Printf274317 +Node: Basic Printf275223 +Node: Control Letters276762 +Node: Format Modifiers280753 +Node: Printf Examples286780 +Node: Redirection289244 +Node: Special Files296216 +Node: Special FD296749 +Ref: Special FD-Footnote-1300346 +Node: Special Network300420 +Node: Special Caveats301270 +Node: Close Files And Pipes302066 +Ref: Close Files And Pipes-Footnote-1309227 +Ref: Close Files And Pipes-Footnote-2309375 +Node: Output Summary309525 +Node: Output exercises310522 +Node: Expressions311202 +Node: Values312387 +Node: Constants313063 +Node: Scalar Constants313743 +Ref: Scalar Constants-Footnote-1314602 +Node: Nondecimal-numbers314852 +Node: Regexp Constants317852 +Node: Using Constant Regexps318327 +Node: Variables321399 +Node: Using Variables322054 +Node: Assignment Options323778 +Node: Conversion325653 +Node: Strings And Numbers326177 +Ref: Strings And Numbers-Footnote-1329239 +Node: Locale influences conversions329348 +Ref: table-locale-affects332065 +Node: All Operators332653 +Node: Arithmetic Ops333283 +Node: Concatenation335788 +Ref: Concatenation-Footnote-1338607 +Node: Assignment Ops338713 +Ref: table-assign-ops343696 +Node: Increment Ops344999 +Node: Truth Values and Conditions348437 +Node: Truth Values349520 +Node: Typing and Comparison350569 +Node: Variable Typing351362 +Node: Comparison Operators355014 +Ref: table-relational-ops355424 +Node: POSIX String Comparison358974 +Ref: POSIX String Comparison-Footnote-1360058 +Node: Boolean Ops360196 +Ref: Boolean Ops-Footnote-1364271 +Node: Conditional Exp364362 +Node: Function Calls366089 +Node: Precedence369969 +Node: Locales373638 +Node: Expressions Summary375269 +Node: Patterns and Actions377810 +Node: Pattern Overview378926 +Node: Regexp Patterns380603 +Node: Expression Patterns381146 +Node: Ranges384926 +Node: BEGIN/END388032 +Node: Using BEGIN/END388794 +Ref: Using BEGIN/END-Footnote-1391530 +Node: I/O And BEGIN/END391636 +Node: BEGINFILE/ENDFILE393907 +Node: Empty396838 +Node: Using Shell Variables397155 +Node: Action Overview399438 +Node: Statements401765 +Node: If Statement403613 +Node: While Statement405111 +Node: Do Statement407155 +Node: For Statement408311 +Node: Switch Statement411463 +Node: Break Statement413851 +Node: Continue Statement415892 +Node: Next Statement417717 +Node: Nextfile Statement420107 +Node: Exit Statement422743 +Node: Built-in Variables425147 +Node: User-modified426274 +Ref: User-modified-Footnote-1433963 +Node: Auto-set434025 +Ref: Auto-set-Footnote-1446607 +Ref: Auto-set-Footnote-2446812 +Node: ARGC and ARGV446868 +Node: Pattern Action Summary450772 +Node: Arrays452995 +Node: Array Basics454544 +Node: Array Intro455370 +Ref: figure-array-elements457343 +Node: Reference to Elements459750 +Node: Assigning Elements462200 +Node: Array Example462691 +Node: Scanning an Array464423 +Node: Controlling Scanning467424 +Ref: Controlling Scanning-Footnote-1472597 +Node: Delete472913 +Ref: Delete-Footnote-1475664 +Node: Numeric Array Subscripts475721 +Node: Uninitialized Subscripts477904 +Node: Multidimensional479529 +Node: Multiscanning482642 +Node: Arrays of Arrays484231 +Node: Arrays Summary488894 +Node: Functions490999 +Node: Built-in491872 +Node: Calling Built-in492950 +Node: Numeric Functions494938 +Ref: Numeric Functions-Footnote-1498972 +Ref: Numeric Functions-Footnote-2499329 +Ref: Numeric Functions-Footnote-3499377 +Node: String Functions499646 +Ref: String Functions-Footnote-1522643 +Ref: String Functions-Footnote-2522772 +Ref: String Functions-Footnote-3523020 +Node: Gory Details523107 +Ref: table-sub-escapes524880 +Ref: table-sub-proposed526400 +Ref: table-posix-sub527764 +Ref: table-gensub-escapes529304 +Ref: Gory Details-Footnote-1530480 +Node: I/O Functions530631 +Ref: I/O Functions-Footnote-1537741 +Node: Time Functions537888 +Ref: Time Functions-Footnote-1548352 +Ref: Time Functions-Footnote-2548420 +Ref: Time Functions-Footnote-3548578 +Ref: Time Functions-Footnote-4548689 +Ref: Time Functions-Footnote-5548801 +Ref: Time Functions-Footnote-6549028 +Node: Bitwise Functions549294 +Ref: table-bitwise-ops549856 +Ref: Bitwise Functions-Footnote-1554101 +Node: Type Functions554285 +Node: I18N Functions555427 +Node: User-defined557072 +Node: Definition Syntax557876 +Ref: Definition Syntax-Footnote-1563055 +Node: Function Example563124 +Ref: Function Example-Footnote-1565764 +Node: Function Caveats565786 +Node: Calling A Function566304 +Node: Variable Scope567259 +Node: Pass By Value/Reference570247 +Node: Return Statement573757 +Node: Dynamic Typing576741 +Node: Indirect Calls577670 +Node: Functions Summary587383 +Node: Library Functions589922 +Ref: Library Functions-Footnote-1593540 +Ref: Library Functions-Footnote-2593683 +Node: Library Names593854 +Ref: Library Names-Footnote-1597327 +Ref: Library Names-Footnote-2597547 +Node: General Functions597633 +Node: Strtonum Function598661 +Node: Assert Function601441 +Node: Round Function604767 +Node: Cliff Random Function606308 +Node: Ordinal Functions607324 +Ref: Ordinal Functions-Footnote-1610389 +Ref: Ordinal Functions-Footnote-2610641 +Node: Join Function610852 +Ref: Join Function-Footnote-1612623 +Node: Getlocaltime Function612823 +Node: Readfile Function616559 +Node: Data File Management618398 +Node: Filetrans Function619030 +Node: Rewind Function623099 +Node: File Checking624657 +Ref: File Checking-Footnote-1625789 +Node: Empty Files625990 +Node: Ignoring Assigns627969 +Node: Getopt Function629523 +Ref: Getopt Function-Footnote-1640826 +Node: Passwd Functions641029 +Ref: Passwd Functions-Footnote-1650008 +Node: Group Functions650096 +Ref: Group Functions-Footnote-1658027 +Node: Walking Arrays658240 +Node: Library Functions Summary659843 +Node: Library exercises661231 +Node: Sample Programs662511 +Node: Running Examples663281 +Node: Clones664009 +Node: Cut Program665233 +Node: Egrep Program675091 +Ref: Egrep Program-Footnote-1682678 +Node: Id Program682788 +Node: Split Program686442 +Ref: Split Program-Footnote-1689980 +Node: Tee Program690108 +Node: Uniq Program692895 +Node: Wc Program700316 +Ref: Wc Program-Footnote-1704581 +Node: Miscellaneous Programs704673 +Node: Dupword Program705886 +Node: Alarm Program707917 +Node: Translate Program712721 +Ref: Translate Program-Footnote-1717112 +Ref: Translate Program-Footnote-2717382 +Node: Labels Program717516 +Ref: Labels Program-Footnote-1720877 +Node: Word Sorting720961 +Node: History Sorting725004 +Node: Extract Program726840 +Node: Simple Sed734376 +Node: Igawk Program737438 +Ref: Igawk Program-Footnote-1751742 +Ref: Igawk Program-Footnote-2751943 +Node: Anagram Program752081 +Node: Signature Program755149 +Node: Programs Summary756396 +Node: Programs Exercises757611 +Node: Advanced Features761262 +Node: Nondecimal Data763210 +Node: Array Sorting764787 +Node: Controlling Array Traversal765484 +Node: Array Sorting Functions773764 +Ref: Array Sorting Functions-Footnote-1777671 +Node: Two-way I/O777865 +Ref: Two-way I/O-Footnote-1782809 +Ref: Two-way I/O-Footnote-2782988 +Node: TCP/IP Networking783070 +Node: Profiling785915 +Node: Advanced Features Summary793457 +Node: Internationalization795321 +Node: I18N and L10N796801 +Node: Explaining gettext797487 +Ref: Explaining gettext-Footnote-1802513 +Ref: Explaining gettext-Footnote-2802697 +Node: Programmer i18n802862 +Ref: Programmer i18n-Footnote-1807656 +Node: Translator i18n807705 +Node: String Extraction808499 +Ref: String Extraction-Footnote-1809632 +Node: Printf Ordering809718 +Ref: Printf Ordering-Footnote-1812500 +Node: I18N Portability812564 +Ref: I18N Portability-Footnote-1815013 +Node: I18N Example815076 +Ref: I18N Example-Footnote-1817782 +Node: Gawk I18N817854 +Node: I18N Summary818492 +Node: Debugger819831 +Node: Debugging820853 +Node: Debugging Concepts821294 +Node: Debugging Terms823150 +Node: Awk Debugging825747 +Node: Sample Debugging Session826639 +Node: Debugger Invocation827159 +Node: Finding The Bug828492 +Node: List of Debugger Commands834974 +Node: Breakpoint Control836306 +Node: Debugger Execution Control839970 +Node: Viewing And Changing Data843330 +Node: Execution Stack846688 +Node: Debugger Info848201 +Node: Miscellaneous Debugger Commands852195 +Node: Readline Support857379 +Node: Limitations858271 +Node: Debugging Summary860545 +Node: Arbitrary Precision Arithmetic861713 +Node: Computer Arithmetic863200 +Ref: Computer Arithmetic-Footnote-1867587 +Node: Math Definitions867644 +Ref: table-ieee-formats870933 +Ref: Math Definitions-Footnote-1871473 +Node: MPFR features871576 +Node: FP Math Caution873193 +Ref: FP Math Caution-Footnote-1874243 +Node: Inexactness of computations874612 +Node: Inexact representation875560 +Node: Comparing FP Values876915 +Node: Errors accumulate877879 +Node: Getting Accuracy879312 +Node: Try To Round881971 +Node: Setting precision882870 +Ref: table-predefined-precision-strings883552 +Node: Setting the rounding mode885345 +Ref: table-gawk-rounding-modes885709 +Ref: Setting the rounding mode-Footnote-1889163 +Node: Arbitrary Precision Integers889342 +Ref: Arbitrary Precision Integers-Footnote-1892323 +Node: POSIX Floating Point Problems892472 +Ref: POSIX Floating Point Problems-Footnote-1896348 +Node: Floating point summary896386 +Node: Dynamic Extensions898590 +Node: Extension Intro900142 +Node: Plugin License901407 +Node: Extension Mechanism Outline902092 +Ref: figure-load-extension902516 +Ref: figure-load-new-function904001 +Ref: figure-call-new-function905003 +Node: Extension API Description906987 +Node: Extension API Functions Introduction908437 +Node: General Data Types913304 +Ref: General Data Types-Footnote-1918997 +Node: Requesting Values919296 +Ref: table-value-types-returned920033 +Node: Memory Allocation Functions920991 +Ref: Memory Allocation Functions-Footnote-1923738 +Node: Constructor Functions923834 +Node: Registration Functions925592 +Node: Extension Functions926277 +Node: Exit Callback Functions928579 +Node: Extension Version String929827 +Node: Input Parsers930477 +Node: Output Wrappers940291 +Node: Two-way processors944807 +Node: Printing Messages947011 +Ref: Printing Messages-Footnote-1948088 +Node: Updating `ERRNO'948240 +Node: Accessing Parameters948979 +Node: Symbol Table Access950209 +Node: Symbol table by name950723 +Node: Symbol table by cookie952699 +Ref: Symbol table by cookie-Footnote-1956832 +Node: Cached values956895 +Ref: Cached values-Footnote-1960399 +Node: Array Manipulation960490 +Ref: Array Manipulation-Footnote-1961588 +Node: Array Data Types961627 +Ref: Array Data Types-Footnote-1964330 +Node: Array Functions964422 +Node: Flattening Arrays968296 +Node: Creating Arrays975148 +Node: Extension API Variables979879 +Node: Extension Versioning980515 +Node: Extension API Informational Variables982416 +Node: Extension API Boilerplate983502 +Node: Finding Extensions987306 +Node: Extension Example987866 +Node: Internal File Description988596 +Node: Internal File Ops992687 +Ref: Internal File Ops-Footnote-11004119 +Node: Using Internal File Ops1004259 +Ref: Using Internal File Ops-Footnote-11006606 +Node: Extension Samples1006874 +Node: Extension Sample File Functions1008398 +Node: Extension Sample Fnmatch1015966 +Node: Extension Sample Fork1017448 +Node: Extension Sample Inplace1018661 +Node: Extension Sample Ord1020336 +Node: Extension Sample Readdir1021172 +Ref: table-readdir-file-types1022028 +Node: Extension Sample Revout1022827 +Node: Extension Sample Rev2way1023418 +Node: Extension Sample Read write array1024159 +Node: Extension Sample Readfile1026038 +Node: Extension Sample API Tests1027138 +Node: Extension Sample Time1027663 +Node: gawkextlib1028978 +Node: Extension summary1031791 +Node: Extension Exercises1035484 +Node: Language History1036206 +Node: V7/SVR3.11037849 +Node: SVR41040169 +Node: POSIX1041611 +Node: BTL1042997 +Node: POSIX/GNU1043731 +Node: Feature History1049447 +Node: Common Extensions1062538 +Node: Ranges and Locales1063850 +Ref: Ranges and Locales-Footnote-11068467 +Ref: Ranges and Locales-Footnote-21068494 +Ref: Ranges and Locales-Footnote-31068728 +Node: Contributors1068949 +Node: History summary1074374 +Node: Installation1075743 +Node: Gawk Distribution1076694 +Node: Getting1077178 +Node: Extracting1078002 +Node: Distribution contents1079644 +Node: Unix Installation1085361 +Node: Quick Installation1085978 +Node: Additional Configuration Options1088420 +Node: Configuration Philosophy1090158 +Node: Non-Unix Installation1092509 +Node: PC Installation1092967 +Node: PC Binary Installation1094278 +Node: PC Compiling1096126 +Ref: PC Compiling-Footnote-11099125 +Node: PC Testing1099230 +Node: PC Using1100406 +Node: Cygwin1104558 +Node: MSYS1105367 +Node: VMS Installation1105881 +Node: VMS Compilation1106677 +Ref: VMS Compilation-Footnote-11107899 +Node: VMS Dynamic Extensions1107957 +Node: VMS Installation Details1109330 +Node: VMS Running1111582 +Node: VMS GNV1114416 +Node: VMS Old Gawk1115139 +Node: Bugs1115609 +Node: Other Versions1119613 +Node: Installation summary1125840 +Node: Notes1126896 +Node: Compatibility Mode1127761 +Node: Additions1128543 +Node: Accessing The Source1129468 +Node: Adding Code1130904 +Node: New Ports1137082 +Node: Derived Files1141563 +Ref: Derived Files-Footnote-11146644 +Ref: Derived Files-Footnote-21146678 +Ref: Derived Files-Footnote-31147274 +Node: Future Extensions1147388 +Node: Implementation Limitations1147994 +Node: Extension Design1149242 +Node: Old Extension Problems1150396 +Ref: Old Extension Problems-Footnote-11151913 +Node: Extension New Mechanism Goals1151970 +Ref: Extension New Mechanism Goals-Footnote-11155330 +Node: Extension Other Design Decisions1155519 +Node: Extension Future Growth1157625 +Node: Old Extension Mechanism1158461 +Node: Notes summary1160223 +Node: Basic Concepts1161409 +Node: Basic High Level1162090 +Ref: figure-general-flow1162362 +Ref: figure-process-flow1162961 +Ref: Basic High Level-Footnote-11166190 +Node: Basic Data Typing1166375 +Node: Glossary1169703 +Node: Copying1194855 +Node: GNU Free Documentation License1232411 +Node: Index1257547  End Tag Table -- cgit v1.2.3 From cd3f4b04ef1a3a0027e72ed6d7af2fcab5ca64df Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 24 Aug 2014 22:16:12 +0300 Subject: More reviewer comments. This is getting harder. --- doc/gawk.info | 1276 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 644 insertions(+), 632 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 9e4f3ec7..caf36e31 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -905,23 +905,19 @@ A Rose by Any Other Name The `awk' language has evolved over the years. Full details are provided in *note Language History::. The language described in this -Info file is often referred to as "new `awk'" (`nawk'). +Info file is often referred to as "new `awk'". By analogy, the +original version of `awk' is referred to as "old `awk'." - For some time after new `awk' was introduced, there were systems -with multiple versions of `awk'. Some systems had an `awk' utility -that implemented the original version of the `awk' language and a -`nawk' utility for the new version. Others had an `oawk' version for -the "old `awk'" language and plain `awk' for the new one. Still others -only had one version, which is usually the new one. + Today, on most systems, when you run the `awk' utility, you get some +version of new `awk'.(1) If your system's standard `awk' is the old +one, you will see something like this if you try the test program: - Today, only Solaris systems still use an old `awk' for the default -`awk' utility. (A more modern `awk' lives in `/usr/xpg6/bin' on these -systems.) All other modern systems use some version of new `awk'.(1) + $ awk 1 /dev/null + error--> awk: syntax error near line 1 + error--> awk: bailing out near line 1 - It is likely that you already have some version of new `awk' on your -system, which is what you should use when running your programs. (Of -course, if you're reading this Info file, chances are good that you -have `gawk'!) +In this case, you should find a version of new `awk', or just install +`gawk'! Throughout this Info file, whenever we refer to a language feature that should be available in any complete implementation of POSIX `awk', @@ -930,7 +926,9 @@ specific to the GNU implementation, we use the term `gawk'. ---------- Footnotes ---------- - (1) Many of these systems use `gawk' for their `awk' implementation! + (1) Only Solaris systems still use an old `awk' for the default +`awk' utility. A more modern `awk' lives in `/usr/xpg6/bin' on these +systems.  File: gawk.info, Node: This Manual, Next: Conventions, Prev: Names, Up: Preface @@ -1548,8 +1546,8 @@ like this: BEGIN { print "Don't Panic!" } After making this file executable (with the `chmod' utility), simply -type `advice' at the shell and the system arranges to run `awk'(2) as -if you had typed `awk -f advice': +type `advice' at the shell and the system arranges to run `awk' as if +you had typed `awk -f advice': $ chmod +x advice $ advice @@ -1563,7 +1561,24 @@ at the shell.) program that users can invoke without their having to know that the program is written in `awk'. - Portability Issues with `#!' + Understanding `#!' + + `awk' is an "interpreted" language. This means that the `awk' +utility reads your program and then processes your data according to +the instructions in your program. (This is different from a "compiled" +language such as C, where your program is first compiled into machine +code that is executed directly by your system's hardware.) The `awk' +utility is thus termed an "interpreter". Many modern languages are +interperted. + + The line beginning with `#!' lists the full file name of an +interpreter to run and a single optional initial command-line argument +to pass to that interpreter. The operating system then runs the +interpreter with the given argument and the full argument list of the +executed program. The first argument in the list is the full file name +of the `awk' program. The rest of the argument list contains either +options to `awk', or data files, or both. Note that on many systems +`awk' may be found in `/usr/bin' instead of in `/bin'. Caveat Emptor. Some systems limit the length of the interpreter name to 32 characters. Often, this can be dealt with by using a symbolic link. @@ -1585,15 +1600,6 @@ the name of your script (`advice'). (d.c.) Don't rely on the value of (1) The `#!' mechanism works on GNU/Linux systems, BSD-based systems and commercial Unix systems. - (2) The line beginning with `#!' lists the full file name of an -interpreter to run and a single optional initial command-line argument -to pass to that interpreter. The operating system then runs the -interpreter with the given argument and the full argument list of the -executed program. The first argument in the list is the full file name -of the `awk' program. The rest of the argument list contains either -options to `awk', or data files, or both. Note that on many systems -`awk' may be found in `/usr/bin' instead of in `/bin'. Caveat Emptor. -  File: gawk.info, Node: Comments, Next: Quoting, Prev: Executable Scripts, Up: Running gawk @@ -1838,7 +1844,8 @@ shipments during the year. Each record contains the month, the number of green crates shipped, the number of red boxes shipped, the number of orange bags shipped, and the number of blue packages shipped, respectively. There are 16 entries, covering the 12 months of last year -and the first four months of the current year. +and the first four months of the current year. An empty line separates +the data for the two years. Jan 13 25 15 115 Feb 15 32 24 226 @@ -1918,11 +1925,6 @@ often more than one way to do things in `awk'. At some point, you may want to look back at these examples and see if you can come up with different ways to do the same things shown here: - * Print the length of the longest input line: - - awk '{ if (length($0) > max) max = length($0) } - END { print max }' data - * Print every line that is longer than 80 characters: awk 'length($0) > 80' data @@ -1930,15 +1932,20 @@ different ways to do the same things shown here: The sole rule has a relational expression as its pattern and it has no action--so it uses the default action, printing the record. + * Print the length of the longest input line: + + awk '{ if (length($0) > max) max = length($0) } + END { print max }' data + * Print the length of the longest line in `data': expand data | awk '{ if (x < length($0)) x = length($0) } END { print "maximum line length is " x }' - This example differs slightly from the first example in this list: - The input is processed by the `expand' utility to change TABs into - spaces, so the widths compared are actually the right-margin - columns, as opposed to the number of input characters on each line. + This example differs slightly from the previous one: The input is + processed by the `expand' utility to change TABs into spaces, so + the widths compared are actually the right-margin columns, as + opposed to the number of input characters on each line. * Print every line that has at least one field: @@ -3526,22 +3533,20 @@ sequences and that are not listed in the table stand for themselves: matches of one `p' followed by any number of `h's. This also matches just `p' if no `h's are present. - The `*' repeats the _smallest_ possible preceding expression. - (Use parentheses if you want to repeat a larger expression.) It - finds as many repetitions as possible. For example, `awk - '/\(c[ad][ad]*r x\)/ { print }' sample' prints every record in - `sample' containing a string of the form `(car x)', `(cdr x)', - `(cadr x)', and so on. Notice the escaping of the parentheses by - preceding them with backslashes. + There are two subtle points to understand about how `*' works. + First, the `*' applies only to the single preceding regular + expression component (e.g., in `ph*', it applies just to the `h'). + To cause `*' to apply to a larger sub-expression, use parentheses: + `(ph)*' matches `ph', `phph', `phphph' and so on. + + Second, `*' finds as many repetititons as possible. If the text to + be matched is `phhhhhhhhhhhhhhooey', `ph*' matches all of the `h's. `+' This symbol is similar to `*', except that the preceding expression must be matched at least once. This means that `wh+y' would match `why' and `whhy', but not `wy', whereas `wh*y' would - match all three. The following is a simpler way of writing the - last `*' example: - - awk '/\(c[ad]+r x\)/ { print }' sample + match all three. `?' This symbol is similar to `*', except that the preceding @@ -10718,7 +10723,8 @@ array element value: Index 0 Value 8 Index 2 Value "" -The pairs are shown in jumbled order because their order is irrelevant. +The pairs are shown in jumbled order because their order is +irrelevant.(1) One advantage of associative arrays is that new pairs can be added at any time. For example, suppose a tenth element is added to the array @@ -10747,9 +10753,10 @@ from English to French: Here we decided to translate the number one in both spelled-out and numeric form--thus illustrating that a single array can have both numbers and strings as indices. (In fact, array subscripts are always -strings; this is discussed in more detail in *note Numeric Array -Subscripts::.) Here, the number `1' isn't double-quoted, since `awk' -automatically converts it to a string. +strings. There are some subtleties to how numbers work when used as +array subscripts; this is discussed in more detail in *note Numeric +Array Subscripts::.) Here, the number `1' isn't double-quoted, since +`awk' automatically converts it to a string. The value of `IGNORECASE' has no effect upon array subscripting. The identical string value used to store an array element must be used @@ -10760,6 +10767,11 @@ starting at one. (*Note String Functions::.) `awk''s arrays are efficient--the time to access an element is independent of the number of elements in the array. + ---------- Footnotes ---------- + + (1) The ordering will vary among `awk' implementations, which +typically use hash tables to store array elements and values. +  File: gawk.info, Node: Reference to Elements, Next: Assigning Elements, Prev: Array Intro, Up: Array Basics @@ -13240,7 +13252,10 @@ File: gawk.info, Node: Definition Syntax, Next: Function Example, Up: User-de 9.2.1 Function Definition Syntax -------------------------------- -Definitions of functions can appear anywhere between the rules of an + It's entirely fair to say that the `awk' syntax for local variable + definitions is appallingly awful -- Brian Kernighan + + Definitions of functions can appear anywhere between the rules of an `awk' program. Thus, the general form of an `awk' program is extended to include sequences of rules _and_ user-defined function definitions. There is no need to put the definition of a function before all uses of @@ -13270,7 +13285,7 @@ have a parameter with the same name as the function itself. In addition, according to the POSIX standard, function parameters cannot have the same name as one of the special built-in variables (*note Built-in Variables::). Not all versions of `awk' enforce this -restriction.) +restriction. Local variables act like the empty string if referenced where a string value is required, and like zero if referenced where a numeric @@ -30968,7 +30983,7 @@ Index * + (plus sign), ++ operator: Increment Ops. (line 11) * + (plus sign), += operator <1>: Precedence. (line 95) * + (plus sign), += operator: Assignment Ops. (line 82) -* + (plus sign), regexp operator: Regexp Operators. (line 104) +* + (plus sign), regexp operator: Regexp Operators. (line 105) * , (comma), in range patterns: Ranges. (line 6) * - (hyphen), - operator: Precedence. (line 52) * - (hyphen), -- operator <1>: Precedence. (line 46) @@ -31111,7 +31126,7 @@ Index * ? (question mark), ?: operator: Precedence. (line 92) * ? (question mark), regexp operator <1>: GNU Regexp Operators. (line 59) -* ? (question mark), regexp operator: Regexp Operators. (line 113) +* ? (question mark), regexp operator: Regexp Operators. (line 111) * [] (square brackets), regexp operator: Regexp Operators. (line 56) * \ (backslash): Comments. (line 50) * \ (backslash) in shell commands: Read Terminal. (line 25) @@ -31233,7 +31248,7 @@ Index * ARGC/ARGV variables, command-line arguments: Other Arguments. (line 12) * ARGC/ARGV variables, how to use: ARGC and ARGV. (line 6) -* ARGC/ARGV variables, portability and: Executable Scripts. (line 42) +* ARGC/ARGV variables, portability and: Executable Scripts. (line 59) * ARGIND variable: Auto-set. (line 44) * ARGIND variable, command-line arguments: Other Arguments. (line 12) * arguments, command-line <1>: ARGC and ARGV. (line 6) @@ -31253,7 +31268,7 @@ Index * arrays: Arrays. (line 6) * arrays of arrays: Arrays of Arrays. (line 6) * arrays, an example of using: Array Example. (line 6) -* arrays, and IGNORECASE variable: Array Intro. (line 92) +* arrays, and IGNORECASE variable: Array Intro. (line 94) * arrays, as parameters to functions: Pass By Value/Reference. (line 47) * arrays, associative: Array Intro. (line 50) @@ -31281,7 +31296,7 @@ Index (line 6) * arrays, sorting, and IGNORECASE variable: Array Sorting Functions. (line 83) -* arrays, sparse: Array Intro. (line 71) +* arrays, sparse: Array Intro. (line 72) * arrays, subscripts, uninitialized variables as: Uninitialized Subscripts. (line 6) * arrays, unassigned elements: Reference to Elements. @@ -31368,8 +31383,7 @@ Index * awk, uses for <1>: When. (line 6) * awk, uses for <2>: Getting Started. (line 12) * awk, uses for: Preface. (line 21) -* awk, versions of <1>: V7/SVR3.1. (line 6) -* awk, versions of: Names. (line 10) +* awk, versions of: V7/SVR3.1. (line 6) * awk, versions of, changes between SVR3.1 and SVR4: SVR4. (line 6) * awk, versions of, changes between SVR4 and POSIX awk: POSIX. (line 6) @@ -31578,7 +31592,7 @@ Index * case keyword: Switch Statement. (line 6) * case sensitivity, and regexps: User-modified. (line 76) * case sensitivity, and string comparisons: User-modified. (line 76) -* case sensitivity, array indices and: Array Intro. (line 92) +* case sensitivity, array indices and: Array Intro. (line 94) * case sensitivity, converting case: String Functions. (line 520) * case sensitivity, example programs: Library Functions. (line 53) * case sensitivity, gawk: Case-sensitivity. (line 26) @@ -31657,7 +31671,7 @@ Index * common extensions, \x escape sequence: Escape Sequences. (line 61) * common extensions, BINMODE variable: PC Using. (line 33) * common extensions, delete to delete entire arrays: Delete. (line 39) -* common extensions, func keyword: Definition Syntax. (line 89) +* common extensions, func keyword: Definition Syntax. (line 92) * common extensions, length() applied to an array: String Functions. (line 197) * common extensions, RS as a regexp: gawk split records. (line 6) @@ -32176,7 +32190,7 @@ Index * extensions, common, BINMODE variable: PC Using. (line 33) * extensions, common, delete to delete entire arrays: Delete. (line 39) * extensions, common, fflush() function: I/O Functions. (line 43) -* extensions, common, func keyword: Definition Syntax. (line 89) +* extensions, common, func keyword: Definition Syntax. (line 92) * extensions, common, length() applied to an array: String Functions. (line 197) * extensions, common, RS as a regexp: gawk split records. (line 6) @@ -32366,7 +32380,7 @@ Index * functions, built-in <1>: Functions. (line 6) * functions, built-in: Function Calls. (line 10) * functions, built-in, evaluation order: Calling Built-in. (line 30) -* functions, defining: Definition Syntax. (line 6) +* functions, defining: Definition Syntax. (line 9) * functions, library: Library Functions. (line 6) * functions, library, assertions: Assert Function. (line 6) * functions, library, associative arrays and: Library Names. (line 57) @@ -32389,9 +32403,9 @@ Index * functions, library, rounding numbers: Round Function. (line 6) * functions, library, user database, reading: Passwd Functions. (line 6) -* functions, names of <1>: Definition Syntax. (line 20) +* functions, names of <1>: Definition Syntax. (line 23) * functions, names of: Arrays. (line 18) -* functions, recursive: Definition Syntax. (line 79) +* functions, recursive: Definition Syntax. (line 82) * functions, string-translation: I18N Functions. (line 6) * functions, undefined: Pass By Value/Reference. (line 71) @@ -32450,7 +32464,7 @@ Index * gawk, IGNORECASE variable in <1>: Array Sorting Functions. (line 83) * gawk, IGNORECASE variable in <2>: String Functions. (line 58) -* gawk, IGNORECASE variable in <3>: Array Intro. (line 92) +* gawk, IGNORECASE variable in <3>: Array Intro. (line 94) * gawk, IGNORECASE variable in <4>: User-modified. (line 76) * gawk, IGNORECASE variable in: Case-sensitivity. (line 26) * gawk, implementation issues: Notes. (line 6) @@ -32464,7 +32478,7 @@ Index (line 13) * gawk, interpreter, adding code to: Using Internal File Ops. (line 6) -* gawk, interval expressions and: Regexp Operators. (line 141) +* gawk, interval expressions and: Regexp Operators. (line 139) * gawk, line continuation in: Conditional Exp. (line 34) * gawk, LINT variable in: User-modified. (line 88) * gawk, list of contributors to: Contributors. (line 6) @@ -32482,7 +32496,7 @@ Index (line 26) * gawk, regular expressions, operators: GNU Regexp Operators. (line 6) -* gawk, regular expressions, precedence: Regexp Operators. (line 163) +* gawk, regular expressions, precedence: Regexp Operators. (line 161) * gawk, RT variable in <1>: Auto-set. (line 257) * gawk, RT variable in <2>: Multiple Line. (line 129) * gawk, RT variable in: awk split records. (line 124) @@ -32616,7 +32630,7 @@ Index * ignore breakpoint: Breakpoint Control. (line 87) * ignore debugger command: Breakpoint Control. (line 87) * IGNORECASE variable: User-modified. (line 76) -* IGNORECASE variable, and array indices: Array Intro. (line 92) +* IGNORECASE variable, and array indices: Array Intro. (line 94) * IGNORECASE variable, and array sorting functions: Array Sorting Functions. (line 83) * IGNORECASE variable, in example programs: Library Functions. @@ -32701,7 +32715,7 @@ Index * internationalizing a program: Explaining gettext. (line 6) * interpreted programs <1>: Glossary. (line 356) * interpreted programs: Basic High Level. (line 15) -* interval expressions, regexp operator: Regexp Operators. (line 118) +* interval expressions, regexp operator: Regexp Operators. (line 116) * inventory-shipped file: Sample Data Files. (line 32) * invoke shell command: I/O Functions. (line 75) * isarray: Type Functions. (line 11) @@ -32893,11 +32907,10 @@ Index * names, arrays/variables <1>: Library Names. (line 6) * names, arrays/variables: Arrays. (line 18) * names, functions <1>: Library Names. (line 6) -* names, functions: Definition Syntax. (line 20) +* names, functions: Definition Syntax. (line 23) * namespace issues <1>: Library Names. (line 6) * namespace issues: Arrays. (line 18) -* namespace issues, functions: Definition Syntax. (line 20) -* nawk utility: Names. (line 10) +* namespace issues, functions: Definition Syntax. (line 23) * NetBSD: Glossary. (line 611) * networks, programming: TCP/IP Networking. (line 6) * networks, support for: Special Network. (line 6) @@ -32976,7 +32989,6 @@ Index * numeric, output format: OFMT. (line 6) * numeric, strings: Variable Typing. (line 6) * o debugger command (alias for option): Debugger Info. (line 57) -* oawk utility: Names. (line 10) * obsolete features: Obsolete. (line 6) * octal numbers: Nondecimal-numbers. (line 6) * octal values, enabling interpretation of: Options. (line 211) @@ -33097,13 +33109,13 @@ Index * plus sign (+), ++ operator: Increment Ops. (line 11) * plus sign (+), += operator <1>: Precedence. (line 95) * plus sign (+), += operator: Assignment Ops. (line 82) -* plus sign (+), regexp operator: Regexp Operators. (line 104) +* plus sign (+), regexp operator: Regexp Operators. (line 105) * pointers to functions: Indirect Calls. (line 6) * portability: Escape Sequences. (line 98) * portability, #! (executable scripts): Executable Scripts. (line 33) * portability, ** operator and: Arithmetic Ops. (line 81) * portability, **= operator and: Assignment Ops. (line 143) -* portability, ARGV variable: Executable Scripts. (line 42) +* portability, ARGV variable: Executable Scripts. (line 59) * portability, backslash continuation and: Statements/Lines. (line 30) * portability, backslash in escape sequences: Escape Sequences. (line 116) @@ -33113,7 +33125,7 @@ Index (line 65) * portability, deleting array elements: Delete. (line 56) * portability, example programs: Library Functions. (line 42) -* portability, functions, defining: Definition Syntax. (line 105) +* portability, functions, defining: Definition Syntax. (line 108) * portability, gawk: New Ports. (line 6) * portability, gettext library and: Explaining gettext. (line 11) * portability, internationalization and: I18N Portability. (line 6) @@ -33159,18 +33171,18 @@ Index (line 40) * POSIX awk, field separators and: Fields. (line 6) * POSIX awk, FS variable and: User-modified. (line 60) -* POSIX awk, function keyword in: Definition Syntax. (line 89) +* POSIX awk, function keyword in: Definition Syntax. (line 92) * POSIX awk, functions and, gsub()/sub(): Gory Details. (line 90) * POSIX awk, functions and, length(): String Functions. (line 176) * POSIX awk, GNU long options and: Options. (line 15) -* POSIX awk, interval expressions in: Regexp Operators. (line 137) +* POSIX awk, interval expressions in: Regexp Operators. (line 135) * POSIX awk, next/nextfile statements and: Next Statement. (line 45) * POSIX awk, numeric strings and: Variable Typing. (line 6) * POSIX awk, OFMT variable and <1>: Strings And Numbers. (line 57) * POSIX awk, OFMT variable and: OFMT. (line 27) * POSIX awk, period (.), using: Regexp Operators. (line 51) * POSIX awk, printf format strings and: Format Modifiers. (line 159) -* POSIX awk, regular expressions and: Regexp Operators. (line 163) +* POSIX awk, regular expressions and: Regexp Operators. (line 161) * POSIX awk, timestamps and: Time Functions. (line 6) * POSIX awk, | I/O operator and: Getline/Pipe. (line 55) * POSIX mode: Options. (line 254) @@ -33181,7 +33193,7 @@ Index * PREC variable: User-modified. (line 124) * precedence <1>: Precedence. (line 6) * precedence: Increment Ops. (line 60) -* precedence, regexp operators: Regexp Operators. (line 158) +* precedence, regexp operators: Regexp Operators. (line 156) * print debugger command: Viewing And Changing Data. (line 36) * print statement: Printing. (line 16) @@ -33248,7 +33260,7 @@ Index * programming conventions, functions, calling: Calling Built-in. (line 10) * programming conventions, functions, writing: Definition Syntax. - (line 61) + (line 64) * programming conventions, gawk extensions: Internal File Ops. (line 45) * programming conventions, private variable names: Library Names. @@ -33268,7 +33280,7 @@ Index * question mark (?), ?: operator: Precedence. (line 92) * question mark (?), regexp operator <1>: GNU Regexp Operators. (line 59) -* question mark (?), regexp operator: Regexp Operators. (line 113) +* question mark (?), regexp operator: Regexp Operators. (line 111) * QuikTrim Awk: Other Versions. (line 135) * quit debugger command: Miscellaneous Debugger Commands. (line 99) @@ -33318,7 +33330,7 @@ Index * records, splitting input into: Records. (line 6) * records, terminating: awk split records. (line 124) * records, treating files as: gawk split records. (line 92) -* recursive functions: Definition Syntax. (line 79) +* recursive functions: Definition Syntax. (line 82) * redirect gawk output, in debugger: Debugger Info. (line 72) * redirection of input: Getline/File. (line 6) * redirection of output: Redirection. (line 6) @@ -33368,7 +33380,7 @@ Index * regular expressions, operators, gawk: GNU Regexp Operators. (line 6) * regular expressions, operators, precedence of: Regexp Operators. - (line 158) + (line 156) * regular expressions, searching for: Egrep Program. (line 6) * relational operators, See comparison operators: Typing and Comparison. (line 9) @@ -33488,7 +33500,7 @@ Index * set directory of message catalogs: I18N Functions. (line 12) * set watchpoint: Viewing And Changing Data. (line 67) -* shadowing of variable values: Definition Syntax. (line 67) +* shadowing of variable values: Definition Syntax. (line 70) * shell quoting, double quote: Read Terminal. (line 25) * shell quoting, rules for: Quoting. (line 6) * shells, piping commands into: Redirection. (line 142) @@ -33541,7 +33553,6 @@ Index * sidebar, Matching the Null String: Gory Details. (line 141) * sidebar, Operator Evaluation Order: Increment Ops. (line 58) * sidebar, Piping into sh: Redirection. (line 140) -* sidebar, Portability Issues with #!: Executable Scripts. (line 31) * sidebar, Pre-POSIX awk Used OFMT For String Conversion: Strings And Numbers. (line 55) * sidebar, Recipe For A Programming Language: History. (line 6) @@ -33550,6 +33561,7 @@ Index (line 83) * sidebar, Syntactic Ambiguities Between /= and Regular Expressions: Assignment Ops. (line 146) +* sidebar, Understanding #!: Executable Scripts. (line 31) * sidebar, Understanding $0: Changing Fields. (line 134) * sidebar, Using \n in Bracket Expressions of Dynamic Regexps: Computed Regexps. (line 57) @@ -33605,7 +33617,7 @@ Index * source code, QuikTrim Awk: Other Versions. (line 135) * source code, Solaris awk: Other Versions. (line 96) * source files, search path for: Programs Exercises. (line 63) -* sparse arrays: Array Intro. (line 71) +* sparse arrays: Array Intro. (line 72) * Spencer, Henry: Glossary. (line 11) * split: String Functions. (line 313) * split string into array: String Functions. (line 294) @@ -33865,7 +33877,7 @@ Index * variables, names of: Arrays. (line 18) * variables, private: Library Names. (line 11) * variables, setting: Options. (line 32) -* variables, shadowing: Definition Syntax. (line 67) +* variables, shadowing: Definition Syntax. (line 70) * variables, types of: Assignment Ops. (line 40) * variables, types of, comparison expressions and: Typing and Comparison. (line 9) @@ -33968,546 +33980,546 @@ Ref: Preface-Footnote-149226 Ref: Preface-Footnote-249333 Node: History49565 Node: Names51939 -Ref: Names-Footnote-153403 -Node: This Manual53476 -Ref: This Manual-Footnote-159255 -Node: Conventions59355 -Node: Manual History61700 -Ref: Manual History-Footnote-164776 -Ref: Manual History-Footnote-264817 -Node: How To Contribute64891 -Node: Acknowledgments66130 -Node: Getting Started70878 -Node: Running gawk73312 -Node: One-shot74502 -Node: Read Terminal75727 -Ref: Read Terminal-Footnote-177690 -Node: Long77861 -Node: Executable Scripts79255 -Ref: Executable Scripts-Footnote-181088 -Ref: Executable Scripts-Footnote-281190 -Node: Comments81743 -Node: Quoting84216 -Node: DOS Quoting89529 -Node: Sample Data Files90204 -Node: Very Simple92758 -Node: Two Rules97531 -Node: More Complex99425 -Ref: More Complex-Footnote-1102357 -Node: Statements/Lines102442 -Ref: Statements/Lines-Footnote-1106898 -Node: Other Features107163 -Node: When108091 -Ref: When-Footnote-1109847 -Node: Intro Summary109912 -Node: Invoking Gawk110795 -Node: Command Line112310 -Node: Options113101 -Ref: Options-Footnote-1128877 -Node: Other Arguments128902 -Node: Naming Standard Input131564 -Node: Environment Variables132657 -Node: AWKPATH Variable133215 -Ref: AWKPATH Variable-Footnote-1136081 -Ref: AWKPATH Variable-Footnote-2136126 -Node: AWKLIBPATH Variable136386 -Node: Other Environment Variables137145 -Node: Exit Status140802 -Node: Include Files141477 -Node: Loading Shared Libraries145055 -Node: Obsolete146439 -Node: Undocumented147136 -Node: Invoking Summary147403 -Node: Regexp149003 -Node: Regexp Usage150462 -Node: Escape Sequences152495 -Node: Regexp Operators158312 -Ref: Regexp Operators-Footnote-1165830 -Ref: Regexp Operators-Footnote-2165977 -Node: Bracket Expressions166075 -Ref: table-char-classes168097 -Node: GNU Regexp Operators171037 -Node: Case-sensitivity174746 -Ref: Case-sensitivity-Footnote-1177638 -Ref: Case-sensitivity-Footnote-2177873 -Node: Leftmost Longest177981 -Node: Computed Regexps179182 -Node: Regexp Summary182554 -Node: Reading Files184023 -Node: Records186115 -Node: awk split records186837 -Node: gawk split records191695 -Ref: gawk split records-Footnote-1196216 -Node: Fields196253 -Ref: Fields-Footnote-1199217 -Node: Nonconstant Fields199303 -Ref: Nonconstant Fields-Footnote-1201533 -Node: Changing Fields201735 -Node: Field Separators207689 -Node: Default Field Splitting210391 -Node: Regexp Field Splitting211508 -Node: Single Character Fields214835 -Node: Command Line Field Separator215894 -Node: Full Line Fields219320 -Ref: Full Line Fields-Footnote-1219828 -Node: Field Splitting Summary219874 -Ref: Field Splitting Summary-Footnote-1223006 -Node: Constant Size223107 -Node: Splitting By Content227713 -Ref: Splitting By Content-Footnote-1231786 -Node: Multiple Line231826 -Ref: Multiple Line-Footnote-1237682 -Node: Getline237861 -Node: Plain Getline240072 -Node: Getline/Variable242167 -Node: Getline/File243314 -Node: Getline/Variable/File244698 -Ref: Getline/Variable/File-Footnote-1246297 -Node: Getline/Pipe246384 -Node: Getline/Variable/Pipe249070 -Node: Getline/Coprocess250177 -Node: Getline/Variable/Coprocess251429 -Node: Getline Notes252166 -Node: Getline Summary254970 -Ref: table-getline-variants255378 -Node: Read Timeout256290 -Ref: Read Timeout-Footnote-1260117 -Node: Command-line directories260175 -Node: Input Summary261079 -Node: Input Exercises264216 -Node: Printing264949 -Node: Print266671 -Node: Print Examples268164 -Node: Output Separators270943 -Node: OFMT272959 -Node: Printf274317 -Node: Basic Printf275223 -Node: Control Letters276762 -Node: Format Modifiers280753 -Node: Printf Examples286780 -Node: Redirection289244 -Node: Special Files296216 -Node: Special FD296749 -Ref: Special FD-Footnote-1300346 -Node: Special Network300420 -Node: Special Caveats301270 -Node: Close Files And Pipes302066 -Ref: Close Files And Pipes-Footnote-1309227 -Ref: Close Files And Pipes-Footnote-2309375 -Node: Output Summary309525 -Node: Output exercises310522 -Node: Expressions311202 -Node: Values312387 -Node: Constants313063 -Node: Scalar Constants313743 -Ref: Scalar Constants-Footnote-1314602 -Node: Nondecimal-numbers314852 -Node: Regexp Constants317852 -Node: Using Constant Regexps318327 -Node: Variables321399 -Node: Using Variables322054 -Node: Assignment Options323778 -Node: Conversion325653 -Node: Strings And Numbers326177 -Ref: Strings And Numbers-Footnote-1329239 -Node: Locale influences conversions329348 -Ref: table-locale-affects332065 -Node: All Operators332653 -Node: Arithmetic Ops333283 -Node: Concatenation335788 -Ref: Concatenation-Footnote-1338607 -Node: Assignment Ops338713 -Ref: table-assign-ops343696 -Node: Increment Ops344999 -Node: Truth Values and Conditions348437 -Node: Truth Values349520 -Node: Typing and Comparison350569 -Node: Variable Typing351362 -Node: Comparison Operators355014 -Ref: table-relational-ops355424 -Node: POSIX String Comparison358974 -Ref: POSIX String Comparison-Footnote-1360058 -Node: Boolean Ops360196 -Ref: Boolean Ops-Footnote-1364271 -Node: Conditional Exp364362 -Node: Function Calls366089 -Node: Precedence369969 -Node: Locales373638 -Node: Expressions Summary375269 -Node: Patterns and Actions377810 -Node: Pattern Overview378926 -Node: Regexp Patterns380603 -Node: Expression Patterns381146 -Node: Ranges384926 -Node: BEGIN/END388032 -Node: Using BEGIN/END388794 -Ref: Using BEGIN/END-Footnote-1391530 -Node: I/O And BEGIN/END391636 -Node: BEGINFILE/ENDFILE393907 -Node: Empty396838 -Node: Using Shell Variables397155 -Node: Action Overview399438 -Node: Statements401765 -Node: If Statement403613 -Node: While Statement405111 -Node: Do Statement407155 -Node: For Statement408311 -Node: Switch Statement411463 -Node: Break Statement413851 -Node: Continue Statement415892 -Node: Next Statement417717 -Node: Nextfile Statement420107 -Node: Exit Statement422743 -Node: Built-in Variables425147 -Node: User-modified426274 -Ref: User-modified-Footnote-1433963 -Node: Auto-set434025 -Ref: Auto-set-Footnote-1446607 -Ref: Auto-set-Footnote-2446812 -Node: ARGC and ARGV446868 -Node: Pattern Action Summary450772 -Node: Arrays452995 -Node: Array Basics454544 -Node: Array Intro455370 -Ref: figure-array-elements457343 -Node: Reference to Elements459750 -Node: Assigning Elements462200 -Node: Array Example462691 -Node: Scanning an Array464423 -Node: Controlling Scanning467424 -Ref: Controlling Scanning-Footnote-1472597 -Node: Delete472913 -Ref: Delete-Footnote-1475664 -Node: Numeric Array Subscripts475721 -Node: Uninitialized Subscripts477904 -Node: Multidimensional479529 -Node: Multiscanning482642 -Node: Arrays of Arrays484231 -Node: Arrays Summary488894 -Node: Functions490999 -Node: Built-in491872 -Node: Calling Built-in492950 -Node: Numeric Functions494938 -Ref: Numeric Functions-Footnote-1498972 -Ref: Numeric Functions-Footnote-2499329 -Ref: Numeric Functions-Footnote-3499377 -Node: String Functions499646 -Ref: String Functions-Footnote-1522643 -Ref: String Functions-Footnote-2522772 -Ref: String Functions-Footnote-3523020 -Node: Gory Details523107 -Ref: table-sub-escapes524880 -Ref: table-sub-proposed526400 -Ref: table-posix-sub527764 -Ref: table-gensub-escapes529304 -Ref: Gory Details-Footnote-1530480 -Node: I/O Functions530631 -Ref: I/O Functions-Footnote-1537741 -Node: Time Functions537888 -Ref: Time Functions-Footnote-1548352 -Ref: Time Functions-Footnote-2548420 -Ref: Time Functions-Footnote-3548578 -Ref: Time Functions-Footnote-4548689 -Ref: Time Functions-Footnote-5548801 -Ref: Time Functions-Footnote-6549028 -Node: Bitwise Functions549294 -Ref: table-bitwise-ops549856 -Ref: Bitwise Functions-Footnote-1554101 -Node: Type Functions554285 -Node: I18N Functions555427 -Node: User-defined557072 -Node: Definition Syntax557876 -Ref: Definition Syntax-Footnote-1563055 -Node: Function Example563124 -Ref: Function Example-Footnote-1565764 -Node: Function Caveats565786 -Node: Calling A Function566304 -Node: Variable Scope567259 -Node: Pass By Value/Reference570247 -Node: Return Statement573757 -Node: Dynamic Typing576741 -Node: Indirect Calls577670 -Node: Functions Summary587383 -Node: Library Functions589922 -Ref: Library Functions-Footnote-1593540 -Ref: Library Functions-Footnote-2593683 -Node: Library Names593854 -Ref: Library Names-Footnote-1597327 -Ref: Library Names-Footnote-2597547 -Node: General Functions597633 -Node: Strtonum Function598661 -Node: Assert Function601441 -Node: Round Function604767 -Node: Cliff Random Function606308 -Node: Ordinal Functions607324 -Ref: Ordinal Functions-Footnote-1610389 -Ref: Ordinal Functions-Footnote-2610641 -Node: Join Function610852 -Ref: Join Function-Footnote-1612623 -Node: Getlocaltime Function612823 -Node: Readfile Function616559 -Node: Data File Management618398 -Node: Filetrans Function619030 -Node: Rewind Function623099 -Node: File Checking624657 -Ref: File Checking-Footnote-1625789 -Node: Empty Files625990 -Node: Ignoring Assigns627969 -Node: Getopt Function629523 -Ref: Getopt Function-Footnote-1640826 -Node: Passwd Functions641029 -Ref: Passwd Functions-Footnote-1650008 -Node: Group Functions650096 -Ref: Group Functions-Footnote-1658027 -Node: Walking Arrays658240 -Node: Library Functions Summary659843 -Node: Library exercises661231 -Node: Sample Programs662511 -Node: Running Examples663281 -Node: Clones664009 -Node: Cut Program665233 -Node: Egrep Program675091 -Ref: Egrep Program-Footnote-1682678 -Node: Id Program682788 -Node: Split Program686442 -Ref: Split Program-Footnote-1689980 -Node: Tee Program690108 -Node: Uniq Program692895 -Node: Wc Program700316 -Ref: Wc Program-Footnote-1704581 -Node: Miscellaneous Programs704673 -Node: Dupword Program705886 -Node: Alarm Program707917 -Node: Translate Program712721 -Ref: Translate Program-Footnote-1717112 -Ref: Translate Program-Footnote-2717382 -Node: Labels Program717516 -Ref: Labels Program-Footnote-1720877 -Node: Word Sorting720961 -Node: History Sorting725004 -Node: Extract Program726840 -Node: Simple Sed734376 -Node: Igawk Program737438 -Ref: Igawk Program-Footnote-1751742 -Ref: Igawk Program-Footnote-2751943 -Node: Anagram Program752081 -Node: Signature Program755149 -Node: Programs Summary756396 -Node: Programs Exercises757611 -Node: Advanced Features761262 -Node: Nondecimal Data763210 -Node: Array Sorting764787 -Node: Controlling Array Traversal765484 -Node: Array Sorting Functions773764 -Ref: Array Sorting Functions-Footnote-1777671 -Node: Two-way I/O777865 -Ref: Two-way I/O-Footnote-1782809 -Ref: Two-way I/O-Footnote-2782988 -Node: TCP/IP Networking783070 -Node: Profiling785915 -Node: Advanced Features Summary793457 -Node: Internationalization795321 -Node: I18N and L10N796801 -Node: Explaining gettext797487 -Ref: Explaining gettext-Footnote-1802513 -Ref: Explaining gettext-Footnote-2802697 -Node: Programmer i18n802862 -Ref: Programmer i18n-Footnote-1807656 -Node: Translator i18n807705 -Node: String Extraction808499 -Ref: String Extraction-Footnote-1809632 -Node: Printf Ordering809718 -Ref: Printf Ordering-Footnote-1812500 -Node: I18N Portability812564 -Ref: I18N Portability-Footnote-1815013 -Node: I18N Example815076 -Ref: I18N Example-Footnote-1817782 -Node: Gawk I18N817854 -Node: I18N Summary818492 -Node: Debugger819831 -Node: Debugging820853 -Node: Debugging Concepts821294 -Node: Debugging Terms823150 -Node: Awk Debugging825747 -Node: Sample Debugging Session826639 -Node: Debugger Invocation827159 -Node: Finding The Bug828492 -Node: List of Debugger Commands834974 -Node: Breakpoint Control836306 -Node: Debugger Execution Control839970 -Node: Viewing And Changing Data843330 -Node: Execution Stack846688 -Node: Debugger Info848201 -Node: Miscellaneous Debugger Commands852195 -Node: Readline Support857379 -Node: Limitations858271 -Node: Debugging Summary860545 -Node: Arbitrary Precision Arithmetic861713 -Node: Computer Arithmetic863200 -Ref: Computer Arithmetic-Footnote-1867587 -Node: Math Definitions867644 -Ref: table-ieee-formats870933 -Ref: Math Definitions-Footnote-1871473 -Node: MPFR features871576 -Node: FP Math Caution873193 -Ref: FP Math Caution-Footnote-1874243 -Node: Inexactness of computations874612 -Node: Inexact representation875560 -Node: Comparing FP Values876915 -Node: Errors accumulate877879 -Node: Getting Accuracy879312 -Node: Try To Round881971 -Node: Setting precision882870 -Ref: table-predefined-precision-strings883552 -Node: Setting the rounding mode885345 -Ref: table-gawk-rounding-modes885709 -Ref: Setting the rounding mode-Footnote-1889163 -Node: Arbitrary Precision Integers889342 -Ref: Arbitrary Precision Integers-Footnote-1892323 -Node: POSIX Floating Point Problems892472 -Ref: POSIX Floating Point Problems-Footnote-1896348 -Node: Floating point summary896386 -Node: Dynamic Extensions898590 -Node: Extension Intro900142 -Node: Plugin License901407 -Node: Extension Mechanism Outline902092 -Ref: figure-load-extension902516 -Ref: figure-load-new-function904001 -Ref: figure-call-new-function905003 -Node: Extension API Description906987 -Node: Extension API Functions Introduction908437 -Node: General Data Types913304 -Ref: General Data Types-Footnote-1918997 -Node: Requesting Values919296 -Ref: table-value-types-returned920033 -Node: Memory Allocation Functions920991 -Ref: Memory Allocation Functions-Footnote-1923738 -Node: Constructor Functions923834 -Node: Registration Functions925592 -Node: Extension Functions926277 -Node: Exit Callback Functions928579 -Node: Extension Version String929827 -Node: Input Parsers930477 -Node: Output Wrappers940291 -Node: Two-way processors944807 -Node: Printing Messages947011 -Ref: Printing Messages-Footnote-1948088 -Node: Updating `ERRNO'948240 -Node: Accessing Parameters948979 -Node: Symbol Table Access950209 -Node: Symbol table by name950723 -Node: Symbol table by cookie952699 -Ref: Symbol table by cookie-Footnote-1956832 -Node: Cached values956895 -Ref: Cached values-Footnote-1960399 -Node: Array Manipulation960490 -Ref: Array Manipulation-Footnote-1961588 -Node: Array Data Types961627 -Ref: Array Data Types-Footnote-1964330 -Node: Array Functions964422 -Node: Flattening Arrays968296 -Node: Creating Arrays975148 -Node: Extension API Variables979879 -Node: Extension Versioning980515 -Node: Extension API Informational Variables982416 -Node: Extension API Boilerplate983502 -Node: Finding Extensions987306 -Node: Extension Example987866 -Node: Internal File Description988596 -Node: Internal File Ops992687 -Ref: Internal File Ops-Footnote-11004119 -Node: Using Internal File Ops1004259 -Ref: Using Internal File Ops-Footnote-11006606 -Node: Extension Samples1006874 -Node: Extension Sample File Functions1008398 -Node: Extension Sample Fnmatch1015966 -Node: Extension Sample Fork1017448 -Node: Extension Sample Inplace1018661 -Node: Extension Sample Ord1020336 -Node: Extension Sample Readdir1021172 -Ref: table-readdir-file-types1022028 -Node: Extension Sample Revout1022827 -Node: Extension Sample Rev2way1023418 -Node: Extension Sample Read write array1024159 -Node: Extension Sample Readfile1026038 -Node: Extension Sample API Tests1027138 -Node: Extension Sample Time1027663 -Node: gawkextlib1028978 -Node: Extension summary1031791 -Node: Extension Exercises1035484 -Node: Language History1036206 -Node: V7/SVR3.11037849 -Node: SVR41040169 -Node: POSIX1041611 -Node: BTL1042997 -Node: POSIX/GNU1043731 -Node: Feature History1049447 -Node: Common Extensions1062538 -Node: Ranges and Locales1063850 -Ref: Ranges and Locales-Footnote-11068467 -Ref: Ranges and Locales-Footnote-21068494 -Ref: Ranges and Locales-Footnote-31068728 -Node: Contributors1068949 -Node: History summary1074374 -Node: Installation1075743 -Node: Gawk Distribution1076694 -Node: Getting1077178 -Node: Extracting1078002 -Node: Distribution contents1079644 -Node: Unix Installation1085361 -Node: Quick Installation1085978 -Node: Additional Configuration Options1088420 -Node: Configuration Philosophy1090158 -Node: Non-Unix Installation1092509 -Node: PC Installation1092967 -Node: PC Binary Installation1094278 -Node: PC Compiling1096126 -Ref: PC Compiling-Footnote-11099125 -Node: PC Testing1099230 -Node: PC Using1100406 -Node: Cygwin1104558 -Node: MSYS1105367 -Node: VMS Installation1105881 -Node: VMS Compilation1106677 -Ref: VMS Compilation-Footnote-11107899 -Node: VMS Dynamic Extensions1107957 -Node: VMS Installation Details1109330 -Node: VMS Running1111582 -Node: VMS GNV1114416 -Node: VMS Old Gawk1115139 -Node: Bugs1115609 -Node: Other Versions1119613 -Node: Installation summary1125840 -Node: Notes1126896 -Node: Compatibility Mode1127761 -Node: Additions1128543 -Node: Accessing The Source1129468 -Node: Adding Code1130904 -Node: New Ports1137082 -Node: Derived Files1141563 -Ref: Derived Files-Footnote-11146644 -Ref: Derived Files-Footnote-21146678 -Ref: Derived Files-Footnote-31147274 -Node: Future Extensions1147388 -Node: Implementation Limitations1147994 -Node: Extension Design1149242 -Node: Old Extension Problems1150396 -Ref: Old Extension Problems-Footnote-11151913 -Node: Extension New Mechanism Goals1151970 -Ref: Extension New Mechanism Goals-Footnote-11155330 -Node: Extension Other Design Decisions1155519 -Node: Extension Future Growth1157625 -Node: Old Extension Mechanism1158461 -Node: Notes summary1160223 -Node: Basic Concepts1161409 -Node: Basic High Level1162090 -Ref: figure-general-flow1162362 -Ref: figure-process-flow1162961 -Ref: Basic High Level-Footnote-11166190 -Node: Basic Data Typing1166375 -Node: Glossary1169703 -Node: Copying1194855 -Node: GNU Free Documentation License1232411 -Node: Index1257547 +Ref: Names-Footnote-153033 +Node: This Manual53179 +Ref: This Manual-Footnote-158958 +Node: Conventions59058 +Node: Manual History61403 +Ref: Manual History-Footnote-164479 +Ref: Manual History-Footnote-264520 +Node: How To Contribute64594 +Node: Acknowledgments65833 +Node: Getting Started70581 +Node: Running gawk73015 +Node: One-shot74205 +Node: Read Terminal75430 +Ref: Read Terminal-Footnote-177393 +Node: Long77564 +Node: Executable Scripts78958 +Ref: Executable Scripts-Footnote-181759 +Node: Comments81861 +Node: Quoting84334 +Node: DOS Quoting89647 +Node: Sample Data Files90322 +Node: Very Simple92929 +Node: Two Rules97688 +Node: More Complex99582 +Ref: More Complex-Footnote-1102514 +Node: Statements/Lines102599 +Ref: Statements/Lines-Footnote-1107055 +Node: Other Features107320 +Node: When108248 +Ref: When-Footnote-1110004 +Node: Intro Summary110069 +Node: Invoking Gawk110952 +Node: Command Line112467 +Node: Options113258 +Ref: Options-Footnote-1129034 +Node: Other Arguments129059 +Node: Naming Standard Input131721 +Node: Environment Variables132814 +Node: AWKPATH Variable133372 +Ref: AWKPATH Variable-Footnote-1136238 +Ref: AWKPATH Variable-Footnote-2136283 +Node: AWKLIBPATH Variable136543 +Node: Other Environment Variables137302 +Node: Exit Status140959 +Node: Include Files141634 +Node: Loading Shared Libraries145212 +Node: Obsolete146596 +Node: Undocumented147293 +Node: Invoking Summary147560 +Node: Regexp149160 +Node: Regexp Usage150619 +Node: Escape Sequences152652 +Node: Regexp Operators158469 +Ref: Regexp Operators-Footnote-1165900 +Ref: Regexp Operators-Footnote-2166047 +Node: Bracket Expressions166145 +Ref: table-char-classes168167 +Node: GNU Regexp Operators171107 +Node: Case-sensitivity174816 +Ref: Case-sensitivity-Footnote-1177708 +Ref: Case-sensitivity-Footnote-2177943 +Node: Leftmost Longest178051 +Node: Computed Regexps179252 +Node: Regexp Summary182624 +Node: Reading Files184093 +Node: Records186185 +Node: awk split records186907 +Node: gawk split records191765 +Ref: gawk split records-Footnote-1196286 +Node: Fields196323 +Ref: Fields-Footnote-1199287 +Node: Nonconstant Fields199373 +Ref: Nonconstant Fields-Footnote-1201603 +Node: Changing Fields201805 +Node: Field Separators207759 +Node: Default Field Splitting210461 +Node: Regexp Field Splitting211578 +Node: Single Character Fields214905 +Node: Command Line Field Separator215964 +Node: Full Line Fields219390 +Ref: Full Line Fields-Footnote-1219898 +Node: Field Splitting Summary219944 +Ref: Field Splitting Summary-Footnote-1223076 +Node: Constant Size223177 +Node: Splitting By Content227783 +Ref: Splitting By Content-Footnote-1231856 +Node: Multiple Line231896 +Ref: Multiple Line-Footnote-1237752 +Node: Getline237931 +Node: Plain Getline240142 +Node: Getline/Variable242237 +Node: Getline/File243384 +Node: Getline/Variable/File244768 +Ref: Getline/Variable/File-Footnote-1246367 +Node: Getline/Pipe246454 +Node: Getline/Variable/Pipe249140 +Node: Getline/Coprocess250247 +Node: Getline/Variable/Coprocess251499 +Node: Getline Notes252236 +Node: Getline Summary255040 +Ref: table-getline-variants255448 +Node: Read Timeout256360 +Ref: Read Timeout-Footnote-1260187 +Node: Command-line directories260245 +Node: Input Summary261149 +Node: Input Exercises264286 +Node: Printing265019 +Node: Print266741 +Node: Print Examples268234 +Node: Output Separators271013 +Node: OFMT273029 +Node: Printf274387 +Node: Basic Printf275293 +Node: Control Letters276832 +Node: Format Modifiers280823 +Node: Printf Examples286850 +Node: Redirection289314 +Node: Special Files296286 +Node: Special FD296819 +Ref: Special FD-Footnote-1300416 +Node: Special Network300490 +Node: Special Caveats301340 +Node: Close Files And Pipes302136 +Ref: Close Files And Pipes-Footnote-1309297 +Ref: Close Files And Pipes-Footnote-2309445 +Node: Output Summary309595 +Node: Output exercises310592 +Node: Expressions311272 +Node: Values312457 +Node: Constants313133 +Node: Scalar Constants313813 +Ref: Scalar Constants-Footnote-1314672 +Node: Nondecimal-numbers314922 +Node: Regexp Constants317922 +Node: Using Constant Regexps318397 +Node: Variables321469 +Node: Using Variables322124 +Node: Assignment Options323848 +Node: Conversion325723 +Node: Strings And Numbers326247 +Ref: Strings And Numbers-Footnote-1329309 +Node: Locale influences conversions329418 +Ref: table-locale-affects332135 +Node: All Operators332723 +Node: Arithmetic Ops333353 +Node: Concatenation335858 +Ref: Concatenation-Footnote-1338677 +Node: Assignment Ops338783 +Ref: table-assign-ops343766 +Node: Increment Ops345069 +Node: Truth Values and Conditions348507 +Node: Truth Values349590 +Node: Typing and Comparison350639 +Node: Variable Typing351432 +Node: Comparison Operators355084 +Ref: table-relational-ops355494 +Node: POSIX String Comparison359044 +Ref: POSIX String Comparison-Footnote-1360128 +Node: Boolean Ops360266 +Ref: Boolean Ops-Footnote-1364341 +Node: Conditional Exp364432 +Node: Function Calls366159 +Node: Precedence370039 +Node: Locales373708 +Node: Expressions Summary375339 +Node: Patterns and Actions377880 +Node: Pattern Overview378996 +Node: Regexp Patterns380673 +Node: Expression Patterns381216 +Node: Ranges384996 +Node: BEGIN/END388102 +Node: Using BEGIN/END388864 +Ref: Using BEGIN/END-Footnote-1391600 +Node: I/O And BEGIN/END391706 +Node: BEGINFILE/ENDFILE393977 +Node: Empty396908 +Node: Using Shell Variables397225 +Node: Action Overview399508 +Node: Statements401835 +Node: If Statement403683 +Node: While Statement405181 +Node: Do Statement407225 +Node: For Statement408381 +Node: Switch Statement411533 +Node: Break Statement413921 +Node: Continue Statement415962 +Node: Next Statement417787 +Node: Nextfile Statement420177 +Node: Exit Statement422813 +Node: Built-in Variables425217 +Node: User-modified426344 +Ref: User-modified-Footnote-1434033 +Node: Auto-set434095 +Ref: Auto-set-Footnote-1446677 +Ref: Auto-set-Footnote-2446882 +Node: ARGC and ARGV446938 +Node: Pattern Action Summary450842 +Node: Arrays453065 +Node: Array Basics454614 +Node: Array Intro455440 +Ref: figure-array-elements457413 +Ref: Array Intro-Footnote-1459937 +Node: Reference to Elements460065 +Node: Assigning Elements462515 +Node: Array Example463006 +Node: Scanning an Array464738 +Node: Controlling Scanning467739 +Ref: Controlling Scanning-Footnote-1472912 +Node: Delete473228 +Ref: Delete-Footnote-1475979 +Node: Numeric Array Subscripts476036 +Node: Uninitialized Subscripts478219 +Node: Multidimensional479844 +Node: Multiscanning482957 +Node: Arrays of Arrays484546 +Node: Arrays Summary489209 +Node: Functions491314 +Node: Built-in492187 +Node: Calling Built-in493265 +Node: Numeric Functions495253 +Ref: Numeric Functions-Footnote-1499287 +Ref: Numeric Functions-Footnote-2499644 +Ref: Numeric Functions-Footnote-3499692 +Node: String Functions499961 +Ref: String Functions-Footnote-1522958 +Ref: String Functions-Footnote-2523087 +Ref: String Functions-Footnote-3523335 +Node: Gory Details523422 +Ref: table-sub-escapes525195 +Ref: table-sub-proposed526715 +Ref: table-posix-sub528079 +Ref: table-gensub-escapes529619 +Ref: Gory Details-Footnote-1530795 +Node: I/O Functions530946 +Ref: I/O Functions-Footnote-1538056 +Node: Time Functions538203 +Ref: Time Functions-Footnote-1548667 +Ref: Time Functions-Footnote-2548735 +Ref: Time Functions-Footnote-3548893 +Ref: Time Functions-Footnote-4549004 +Ref: Time Functions-Footnote-5549116 +Ref: Time Functions-Footnote-6549343 +Node: Bitwise Functions549609 +Ref: table-bitwise-ops550171 +Ref: Bitwise Functions-Footnote-1554416 +Node: Type Functions554600 +Node: I18N Functions555742 +Node: User-defined557387 +Node: Definition Syntax558191 +Ref: Definition Syntax-Footnote-1563502 +Node: Function Example563571 +Ref: Function Example-Footnote-1566211 +Node: Function Caveats566233 +Node: Calling A Function566751 +Node: Variable Scope567706 +Node: Pass By Value/Reference570694 +Node: Return Statement574204 +Node: Dynamic Typing577188 +Node: Indirect Calls578117 +Node: Functions Summary587830 +Node: Library Functions590369 +Ref: Library Functions-Footnote-1593987 +Ref: Library Functions-Footnote-2594130 +Node: Library Names594301 +Ref: Library Names-Footnote-1597774 +Ref: Library Names-Footnote-2597994 +Node: General Functions598080 +Node: Strtonum Function599108 +Node: Assert Function601888 +Node: Round Function605214 +Node: Cliff Random Function606755 +Node: Ordinal Functions607771 +Ref: Ordinal Functions-Footnote-1610836 +Ref: Ordinal Functions-Footnote-2611088 +Node: Join Function611299 +Ref: Join Function-Footnote-1613070 +Node: Getlocaltime Function613270 +Node: Readfile Function617006 +Node: Data File Management618845 +Node: Filetrans Function619477 +Node: Rewind Function623546 +Node: File Checking625104 +Ref: File Checking-Footnote-1626236 +Node: Empty Files626437 +Node: Ignoring Assigns628416 +Node: Getopt Function629970 +Ref: Getopt Function-Footnote-1641273 +Node: Passwd Functions641476 +Ref: Passwd Functions-Footnote-1650455 +Node: Group Functions650543 +Ref: Group Functions-Footnote-1658474 +Node: Walking Arrays658687 +Node: Library Functions Summary660290 +Node: Library exercises661678 +Node: Sample Programs662958 +Node: Running Examples663728 +Node: Clones664456 +Node: Cut Program665680 +Node: Egrep Program675538 +Ref: Egrep Program-Footnote-1683125 +Node: Id Program683235 +Node: Split Program686889 +Ref: Split Program-Footnote-1690427 +Node: Tee Program690555 +Node: Uniq Program693342 +Node: Wc Program700763 +Ref: Wc Program-Footnote-1705028 +Node: Miscellaneous Programs705120 +Node: Dupword Program706333 +Node: Alarm Program708364 +Node: Translate Program713168 +Ref: Translate Program-Footnote-1717559 +Ref: Translate Program-Footnote-2717829 +Node: Labels Program717963 +Ref: Labels Program-Footnote-1721324 +Node: Word Sorting721408 +Node: History Sorting725451 +Node: Extract Program727287 +Node: Simple Sed734823 +Node: Igawk Program737885 +Ref: Igawk Program-Footnote-1752189 +Ref: Igawk Program-Footnote-2752390 +Node: Anagram Program752528 +Node: Signature Program755596 +Node: Programs Summary756843 +Node: Programs Exercises758058 +Node: Advanced Features761709 +Node: Nondecimal Data763657 +Node: Array Sorting765234 +Node: Controlling Array Traversal765931 +Node: Array Sorting Functions774211 +Ref: Array Sorting Functions-Footnote-1778118 +Node: Two-way I/O778312 +Ref: Two-way I/O-Footnote-1783256 +Ref: Two-way I/O-Footnote-2783435 +Node: TCP/IP Networking783517 +Node: Profiling786362 +Node: Advanced Features Summary793904 +Node: Internationalization795768 +Node: I18N and L10N797248 +Node: Explaining gettext797934 +Ref: Explaining gettext-Footnote-1802960 +Ref: Explaining gettext-Footnote-2803144 +Node: Programmer i18n803309 +Ref: Programmer i18n-Footnote-1808103 +Node: Translator i18n808152 +Node: String Extraction808946 +Ref: String Extraction-Footnote-1810079 +Node: Printf Ordering810165 +Ref: Printf Ordering-Footnote-1812947 +Node: I18N Portability813011 +Ref: I18N Portability-Footnote-1815460 +Node: I18N Example815523 +Ref: I18N Example-Footnote-1818229 +Node: Gawk I18N818301 +Node: I18N Summary818939 +Node: Debugger820278 +Node: Debugging821300 +Node: Debugging Concepts821741 +Node: Debugging Terms823597 +Node: Awk Debugging826194 +Node: Sample Debugging Session827086 +Node: Debugger Invocation827606 +Node: Finding The Bug828939 +Node: List of Debugger Commands835421 +Node: Breakpoint Control836753 +Node: Debugger Execution Control840417 +Node: Viewing And Changing Data843777 +Node: Execution Stack847135 +Node: Debugger Info848648 +Node: Miscellaneous Debugger Commands852642 +Node: Readline Support857826 +Node: Limitations858718 +Node: Debugging Summary860992 +Node: Arbitrary Precision Arithmetic862160 +Node: Computer Arithmetic863647 +Ref: Computer Arithmetic-Footnote-1868034 +Node: Math Definitions868091 +Ref: table-ieee-formats871380 +Ref: Math Definitions-Footnote-1871920 +Node: MPFR features872023 +Node: FP Math Caution873640 +Ref: FP Math Caution-Footnote-1874690 +Node: Inexactness of computations875059 +Node: Inexact representation876007 +Node: Comparing FP Values877362 +Node: Errors accumulate878326 +Node: Getting Accuracy879759 +Node: Try To Round882418 +Node: Setting precision883317 +Ref: table-predefined-precision-strings883999 +Node: Setting the rounding mode885792 +Ref: table-gawk-rounding-modes886156 +Ref: Setting the rounding mode-Footnote-1889610 +Node: Arbitrary Precision Integers889789 +Ref: Arbitrary Precision Integers-Footnote-1892770 +Node: POSIX Floating Point Problems892919 +Ref: POSIX Floating Point Problems-Footnote-1896795 +Node: Floating point summary896833 +Node: Dynamic Extensions899037 +Node: Extension Intro900589 +Node: Plugin License901854 +Node: Extension Mechanism Outline902539 +Ref: figure-load-extension902963 +Ref: figure-load-new-function904448 +Ref: figure-call-new-function905450 +Node: Extension API Description907434 +Node: Extension API Functions Introduction908884 +Node: General Data Types913751 +Ref: General Data Types-Footnote-1919444 +Node: Requesting Values919743 +Ref: table-value-types-returned920480 +Node: Memory Allocation Functions921438 +Ref: Memory Allocation Functions-Footnote-1924185 +Node: Constructor Functions924281 +Node: Registration Functions926039 +Node: Extension Functions926724 +Node: Exit Callback Functions929026 +Node: Extension Version String930274 +Node: Input Parsers930924 +Node: Output Wrappers940738 +Node: Two-way processors945254 +Node: Printing Messages947458 +Ref: Printing Messages-Footnote-1948535 +Node: Updating `ERRNO'948687 +Node: Accessing Parameters949426 +Node: Symbol Table Access950656 +Node: Symbol table by name951170 +Node: Symbol table by cookie953146 +Ref: Symbol table by cookie-Footnote-1957279 +Node: Cached values957342 +Ref: Cached values-Footnote-1960846 +Node: Array Manipulation960937 +Ref: Array Manipulation-Footnote-1962035 +Node: Array Data Types962074 +Ref: Array Data Types-Footnote-1964777 +Node: Array Functions964869 +Node: Flattening Arrays968743 +Node: Creating Arrays975595 +Node: Extension API Variables980326 +Node: Extension Versioning980962 +Node: Extension API Informational Variables982863 +Node: Extension API Boilerplate983949 +Node: Finding Extensions987753 +Node: Extension Example988313 +Node: Internal File Description989043 +Node: Internal File Ops993134 +Ref: Internal File Ops-Footnote-11004566 +Node: Using Internal File Ops1004706 +Ref: Using Internal File Ops-Footnote-11007053 +Node: Extension Samples1007321 +Node: Extension Sample File Functions1008845 +Node: Extension Sample Fnmatch1016413 +Node: Extension Sample Fork1017895 +Node: Extension Sample Inplace1019108 +Node: Extension Sample Ord1020783 +Node: Extension Sample Readdir1021619 +Ref: table-readdir-file-types1022475 +Node: Extension Sample Revout1023274 +Node: Extension Sample Rev2way1023865 +Node: Extension Sample Read write array1024606 +Node: Extension Sample Readfile1026485 +Node: Extension Sample API Tests1027585 +Node: Extension Sample Time1028110 +Node: gawkextlib1029425 +Node: Extension summary1032238 +Node: Extension Exercises1035931 +Node: Language History1036653 +Node: V7/SVR3.11038296 +Node: SVR41040616 +Node: POSIX1042058 +Node: BTL1043444 +Node: POSIX/GNU1044178 +Node: Feature History1049894 +Node: Common Extensions1062985 +Node: Ranges and Locales1064297 +Ref: Ranges and Locales-Footnote-11068914 +Ref: Ranges and Locales-Footnote-21068941 +Ref: Ranges and Locales-Footnote-31069175 +Node: Contributors1069396 +Node: History summary1074821 +Node: Installation1076190 +Node: Gawk Distribution1077141 +Node: Getting1077625 +Node: Extracting1078449 +Node: Distribution contents1080091 +Node: Unix Installation1085808 +Node: Quick Installation1086425 +Node: Additional Configuration Options1088867 +Node: Configuration Philosophy1090605 +Node: Non-Unix Installation1092956 +Node: PC Installation1093414 +Node: PC Binary Installation1094725 +Node: PC Compiling1096573 +Ref: PC Compiling-Footnote-11099572 +Node: PC Testing1099677 +Node: PC Using1100853 +Node: Cygwin1105005 +Node: MSYS1105814 +Node: VMS Installation1106328 +Node: VMS Compilation1107124 +Ref: VMS Compilation-Footnote-11108346 +Node: VMS Dynamic Extensions1108404 +Node: VMS Installation Details1109777 +Node: VMS Running1112029 +Node: VMS GNV1114863 +Node: VMS Old Gawk1115586 +Node: Bugs1116056 +Node: Other Versions1120060 +Node: Installation summary1126287 +Node: Notes1127343 +Node: Compatibility Mode1128208 +Node: Additions1128990 +Node: Accessing The Source1129915 +Node: Adding Code1131351 +Node: New Ports1137529 +Node: Derived Files1142010 +Ref: Derived Files-Footnote-11147091 +Ref: Derived Files-Footnote-21147125 +Ref: Derived Files-Footnote-31147721 +Node: Future Extensions1147835 +Node: Implementation Limitations1148441 +Node: Extension Design1149689 +Node: Old Extension Problems1150843 +Ref: Old Extension Problems-Footnote-11152360 +Node: Extension New Mechanism Goals1152417 +Ref: Extension New Mechanism Goals-Footnote-11155777 +Node: Extension Other Design Decisions1155966 +Node: Extension Future Growth1158072 +Node: Old Extension Mechanism1158908 +Node: Notes summary1160670 +Node: Basic Concepts1161856 +Node: Basic High Level1162537 +Ref: figure-general-flow1162809 +Ref: figure-process-flow1163408 +Ref: Basic High Level-Footnote-11166637 +Node: Basic Data Typing1166822 +Node: Glossary1170150 +Node: Copying1195302 +Node: GNU Free Documentation License1232858 +Node: Index1257994  End Tag Table -- cgit v1.2.3 From 5167f5aaabb5adb4801be9f46ba3ba16596014c3 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 25 Aug 2014 22:29:27 +0300 Subject: Exclude exercises from print edition. --- doc/gawk.info | 1122 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 566 insertions(+), 556 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index caf36e31..850c8e73 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -219,6 +219,7 @@ entitled "GNU Free Documentation License". * Command-line directories:: What happens if you put a directory on the command line. * Input Summary:: Input summary. + * Input Exercises:: Exercises. * Print:: The `print' statement. * Print Examples:: Simple examples of `print' @@ -244,7 +245,8 @@ entitled "GNU Free Documentation License". * Close Files And Pipes:: Closing Input and Output Files and Pipes. * Output Summary:: Output summary. -* Output exercises:: Exercises. + +* Output Exercises:: Exercises. * Values:: Constants, Variables, and Regular Expressions. * Constants:: String, numeric and regexp constants. @@ -431,7 +433,8 @@ entitled "GNU Free Documentation License". information. * Walking Arrays:: A function to walk arrays of arrays. * Library Functions Summary:: Summary of library functions. -* Library exercises:: Exercises. + +* Library Exercises:: Exercises. * Running Examples:: How to run these examples. * Clones:: Clones of common utilities. * Cut Program:: The `cut' utility. @@ -462,6 +465,7 @@ entitled "GNU Free Documentation License". * Signature Program:: People do amazing things with too much time on their hands. * Programs Summary:: Summary of programs. + * Programs Exercises:: Exercises. * Nondecimal Data:: Allowing nondecimal input data. * Array Sorting:: Facilities for controlling array @@ -584,6 +588,7 @@ entitled "GNU Free Documentation License". and `sleep()'. * gawkextlib:: The `gawkextlib' project. * Extension summary:: Extension summary. + * Extension Exercises:: Exercises. * V7/SVR3.1:: The major changes between V7 and System V Release 3.1. @@ -4079,6 +4084,7 @@ have to be named on the `awk' command line (*note Getline::). * Command-line directories:: What happens if you put a directory on the command line. * Input Summary:: Input summary. + * Input Exercises:: Exercises.  @@ -6019,7 +6025,8 @@ function. descriptors. * Close Files And Pipes:: Closing Input and Output Files and Pipes. * Output Summary:: Output summary. -* Output exercises:: Exercises. + +* Output Exercises:: Exercises.  File: gawk.info, Node: Print, Next: Print Examples, Up: Printing @@ -7081,7 +7088,7 @@ call. See the system manual pages for information on how to decode this value.  -File: gawk.info, Node: Output Summary, Next: Output exercises, Prev: Close Files And Pipes, Up: Printing +File: gawk.info, Node: Output Summary, Next: Output Exercises, Prev: Close Files And Pipes, Up: Printing 5.9 Summary =========== @@ -7107,7 +7114,7 @@ File: gawk.info, Node: Output Summary, Next: Output exercises, Prev: Close Fi  -File: gawk.info, Node: Output exercises, Prev: Output Summary, Up: Printing +File: gawk.info, Node: Output Exercises, Prev: Output Summary, Up: Printing 5.10 Exercises ============== @@ -13253,7 +13260,7 @@ File: gawk.info, Node: Definition Syntax, Next: Function Example, Up: User-de -------------------------------- It's entirely fair to say that the `awk' syntax for local variable - definitions is appallingly awful -- Brian Kernighan + definitions is appallingly awful. -- Brian Kernighan Definitions of functions can appear anywhere between the rules of an `awk' program. Thus, the general form of an `awk' program is extended @@ -14243,7 +14250,8 @@ for different implementations of `awk' is pretty straightforward. * Group Functions:: Functions for getting group information. * Walking Arrays:: A function to walk arrays of arrays. * Library Functions Summary:: Summary of library functions. -* Library exercises:: Exercises. + +* Library Exercises:: Exercises. ---------- Footnotes ---------- @@ -15998,7 +16006,7 @@ value. Here is a main program to demonstrate: -| a[3] = 3  -File: gawk.info, Node: Library Functions Summary, Next: Library exercises, Prev: Walking Arrays, Up: Library Functions +File: gawk.info, Node: Library Functions Summary, Next: Library Exercises, Prev: Walking Arrays, Up: Library Functions 10.8 Summary ============ @@ -16035,7 +16043,7 @@ File: gawk.info, Node: Library Functions Summary, Next: Library exercises, Pr  -File: gawk.info, Node: Library exercises, Prev: Library Functions Summary, Up: Library Functions +File: gawk.info, Node: Library Exercises, Prev: Library Functions Summary, Up: Library Functions 10.9 Exercises ============== @@ -16085,6 +16093,7 @@ Library Functions::. * Clones:: Clones of common utilities. * Miscellaneous Programs:: Some interesting `awk' programs. * Programs Summary:: Summary of programs. + * Programs Exercises:: Exercises.  @@ -22287,6 +22296,7 @@ sample extensions are automatically built and installed when `gawk' is. `gawk'. * gawkextlib:: The `gawkextlib' project. * Extension summary:: Extension summary. + * Extension Exercises:: Exercises.  @@ -33974,552 +33984,552 @@ Index  Tag Table: Node: Top1204 -Node: Foreword41858 -Node: Preface46203 -Ref: Preface-Footnote-149226 -Ref: Preface-Footnote-249333 -Node: History49565 -Node: Names51939 -Ref: Names-Footnote-153033 -Node: This Manual53179 -Ref: This Manual-Footnote-158958 -Node: Conventions59058 -Node: Manual History61403 -Ref: Manual History-Footnote-164479 -Ref: Manual History-Footnote-264520 -Node: How To Contribute64594 -Node: Acknowledgments65833 -Node: Getting Started70581 -Node: Running gawk73015 -Node: One-shot74205 -Node: Read Terminal75430 -Ref: Read Terminal-Footnote-177393 -Node: Long77564 -Node: Executable Scripts78958 -Ref: Executable Scripts-Footnote-181759 -Node: Comments81861 -Node: Quoting84334 -Node: DOS Quoting89647 -Node: Sample Data Files90322 -Node: Very Simple92929 -Node: Two Rules97688 -Node: More Complex99582 -Ref: More Complex-Footnote-1102514 -Node: Statements/Lines102599 -Ref: Statements/Lines-Footnote-1107055 -Node: Other Features107320 -Node: When108248 -Ref: When-Footnote-1110004 -Node: Intro Summary110069 -Node: Invoking Gawk110952 -Node: Command Line112467 -Node: Options113258 -Ref: Options-Footnote-1129034 -Node: Other Arguments129059 -Node: Naming Standard Input131721 -Node: Environment Variables132814 -Node: AWKPATH Variable133372 -Ref: AWKPATH Variable-Footnote-1136238 -Ref: AWKPATH Variable-Footnote-2136283 -Node: AWKLIBPATH Variable136543 -Node: Other Environment Variables137302 -Node: Exit Status140959 -Node: Include Files141634 -Node: Loading Shared Libraries145212 -Node: Obsolete146596 -Node: Undocumented147293 -Node: Invoking Summary147560 -Node: Regexp149160 -Node: Regexp Usage150619 -Node: Escape Sequences152652 -Node: Regexp Operators158469 -Ref: Regexp Operators-Footnote-1165900 -Ref: Regexp Operators-Footnote-2166047 -Node: Bracket Expressions166145 -Ref: table-char-classes168167 -Node: GNU Regexp Operators171107 -Node: Case-sensitivity174816 -Ref: Case-sensitivity-Footnote-1177708 -Ref: Case-sensitivity-Footnote-2177943 -Node: Leftmost Longest178051 -Node: Computed Regexps179252 -Node: Regexp Summary182624 -Node: Reading Files184093 -Node: Records186185 -Node: awk split records186907 -Node: gawk split records191765 -Ref: gawk split records-Footnote-1196286 -Node: Fields196323 -Ref: Fields-Footnote-1199287 -Node: Nonconstant Fields199373 -Ref: Nonconstant Fields-Footnote-1201603 -Node: Changing Fields201805 -Node: Field Separators207759 -Node: Default Field Splitting210461 -Node: Regexp Field Splitting211578 -Node: Single Character Fields214905 -Node: Command Line Field Separator215964 -Node: Full Line Fields219390 -Ref: Full Line Fields-Footnote-1219898 -Node: Field Splitting Summary219944 -Ref: Field Splitting Summary-Footnote-1223076 -Node: Constant Size223177 -Node: Splitting By Content227783 -Ref: Splitting By Content-Footnote-1231856 -Node: Multiple Line231896 -Ref: Multiple Line-Footnote-1237752 -Node: Getline237931 -Node: Plain Getline240142 -Node: Getline/Variable242237 -Node: Getline/File243384 -Node: Getline/Variable/File244768 -Ref: Getline/Variable/File-Footnote-1246367 -Node: Getline/Pipe246454 -Node: Getline/Variable/Pipe249140 -Node: Getline/Coprocess250247 -Node: Getline/Variable/Coprocess251499 -Node: Getline Notes252236 -Node: Getline Summary255040 -Ref: table-getline-variants255448 -Node: Read Timeout256360 -Ref: Read Timeout-Footnote-1260187 -Node: Command-line directories260245 -Node: Input Summary261149 -Node: Input Exercises264286 -Node: Printing265019 -Node: Print266741 -Node: Print Examples268234 -Node: Output Separators271013 -Node: OFMT273029 -Node: Printf274387 -Node: Basic Printf275293 -Node: Control Letters276832 -Node: Format Modifiers280823 -Node: Printf Examples286850 -Node: Redirection289314 -Node: Special Files296286 -Node: Special FD296819 -Ref: Special FD-Footnote-1300416 -Node: Special Network300490 -Node: Special Caveats301340 -Node: Close Files And Pipes302136 -Ref: Close Files And Pipes-Footnote-1309297 -Ref: Close Files And Pipes-Footnote-2309445 -Node: Output Summary309595 -Node: Output exercises310592 -Node: Expressions311272 -Node: Values312457 -Node: Constants313133 -Node: Scalar Constants313813 -Ref: Scalar Constants-Footnote-1314672 -Node: Nondecimal-numbers314922 -Node: Regexp Constants317922 -Node: Using Constant Regexps318397 -Node: Variables321469 -Node: Using Variables322124 -Node: Assignment Options323848 -Node: Conversion325723 -Node: Strings And Numbers326247 -Ref: Strings And Numbers-Footnote-1329309 -Node: Locale influences conversions329418 -Ref: table-locale-affects332135 -Node: All Operators332723 -Node: Arithmetic Ops333353 -Node: Concatenation335858 -Ref: Concatenation-Footnote-1338677 -Node: Assignment Ops338783 -Ref: table-assign-ops343766 -Node: Increment Ops345069 -Node: Truth Values and Conditions348507 -Node: Truth Values349590 -Node: Typing and Comparison350639 -Node: Variable Typing351432 -Node: Comparison Operators355084 -Ref: table-relational-ops355494 -Node: POSIX String Comparison359044 -Ref: POSIX String Comparison-Footnote-1360128 -Node: Boolean Ops360266 -Ref: Boolean Ops-Footnote-1364341 -Node: Conditional Exp364432 -Node: Function Calls366159 -Node: Precedence370039 -Node: Locales373708 -Node: Expressions Summary375339 -Node: Patterns and Actions377880 -Node: Pattern Overview378996 -Node: Regexp Patterns380673 -Node: Expression Patterns381216 -Node: Ranges384996 -Node: BEGIN/END388102 -Node: Using BEGIN/END388864 -Ref: Using BEGIN/END-Footnote-1391600 -Node: I/O And BEGIN/END391706 -Node: BEGINFILE/ENDFILE393977 -Node: Empty396908 -Node: Using Shell Variables397225 -Node: Action Overview399508 -Node: Statements401835 -Node: If Statement403683 -Node: While Statement405181 -Node: Do Statement407225 -Node: For Statement408381 -Node: Switch Statement411533 -Node: Break Statement413921 -Node: Continue Statement415962 -Node: Next Statement417787 -Node: Nextfile Statement420177 -Node: Exit Statement422813 -Node: Built-in Variables425217 -Node: User-modified426344 -Ref: User-modified-Footnote-1434033 -Node: Auto-set434095 -Ref: Auto-set-Footnote-1446677 -Ref: Auto-set-Footnote-2446882 -Node: ARGC and ARGV446938 -Node: Pattern Action Summary450842 -Node: Arrays453065 -Node: Array Basics454614 -Node: Array Intro455440 -Ref: figure-array-elements457413 -Ref: Array Intro-Footnote-1459937 -Node: Reference to Elements460065 -Node: Assigning Elements462515 -Node: Array Example463006 -Node: Scanning an Array464738 -Node: Controlling Scanning467739 -Ref: Controlling Scanning-Footnote-1472912 -Node: Delete473228 -Ref: Delete-Footnote-1475979 -Node: Numeric Array Subscripts476036 -Node: Uninitialized Subscripts478219 -Node: Multidimensional479844 -Node: Multiscanning482957 -Node: Arrays of Arrays484546 -Node: Arrays Summary489209 -Node: Functions491314 -Node: Built-in492187 -Node: Calling Built-in493265 -Node: Numeric Functions495253 -Ref: Numeric Functions-Footnote-1499287 -Ref: Numeric Functions-Footnote-2499644 -Ref: Numeric Functions-Footnote-3499692 -Node: String Functions499961 -Ref: String Functions-Footnote-1522958 -Ref: String Functions-Footnote-2523087 -Ref: String Functions-Footnote-3523335 -Node: Gory Details523422 -Ref: table-sub-escapes525195 -Ref: table-sub-proposed526715 -Ref: table-posix-sub528079 -Ref: table-gensub-escapes529619 -Ref: Gory Details-Footnote-1530795 -Node: I/O Functions530946 -Ref: I/O Functions-Footnote-1538056 -Node: Time Functions538203 -Ref: Time Functions-Footnote-1548667 -Ref: Time Functions-Footnote-2548735 -Ref: Time Functions-Footnote-3548893 -Ref: Time Functions-Footnote-4549004 -Ref: Time Functions-Footnote-5549116 -Ref: Time Functions-Footnote-6549343 -Node: Bitwise Functions549609 -Ref: table-bitwise-ops550171 -Ref: Bitwise Functions-Footnote-1554416 -Node: Type Functions554600 -Node: I18N Functions555742 -Node: User-defined557387 -Node: Definition Syntax558191 -Ref: Definition Syntax-Footnote-1563502 -Node: Function Example563571 -Ref: Function Example-Footnote-1566211 -Node: Function Caveats566233 -Node: Calling A Function566751 -Node: Variable Scope567706 -Node: Pass By Value/Reference570694 -Node: Return Statement574204 -Node: Dynamic Typing577188 -Node: Indirect Calls578117 -Node: Functions Summary587830 -Node: Library Functions590369 -Ref: Library Functions-Footnote-1593987 -Ref: Library Functions-Footnote-2594130 -Node: Library Names594301 -Ref: Library Names-Footnote-1597774 -Ref: Library Names-Footnote-2597994 -Node: General Functions598080 -Node: Strtonum Function599108 -Node: Assert Function601888 -Node: Round Function605214 -Node: Cliff Random Function606755 -Node: Ordinal Functions607771 -Ref: Ordinal Functions-Footnote-1610836 -Ref: Ordinal Functions-Footnote-2611088 -Node: Join Function611299 -Ref: Join Function-Footnote-1613070 -Node: Getlocaltime Function613270 -Node: Readfile Function617006 -Node: Data File Management618845 -Node: Filetrans Function619477 -Node: Rewind Function623546 -Node: File Checking625104 -Ref: File Checking-Footnote-1626236 -Node: Empty Files626437 -Node: Ignoring Assigns628416 -Node: Getopt Function629970 -Ref: Getopt Function-Footnote-1641273 -Node: Passwd Functions641476 -Ref: Passwd Functions-Footnote-1650455 -Node: Group Functions650543 -Ref: Group Functions-Footnote-1658474 -Node: Walking Arrays658687 -Node: Library Functions Summary660290 -Node: Library exercises661678 -Node: Sample Programs662958 -Node: Running Examples663728 -Node: Clones664456 -Node: Cut Program665680 -Node: Egrep Program675538 -Ref: Egrep Program-Footnote-1683125 -Node: Id Program683235 -Node: Split Program686889 -Ref: Split Program-Footnote-1690427 -Node: Tee Program690555 -Node: Uniq Program693342 -Node: Wc Program700763 -Ref: Wc Program-Footnote-1705028 -Node: Miscellaneous Programs705120 -Node: Dupword Program706333 -Node: Alarm Program708364 -Node: Translate Program713168 -Ref: Translate Program-Footnote-1717559 -Ref: Translate Program-Footnote-2717829 -Node: Labels Program717963 -Ref: Labels Program-Footnote-1721324 -Node: Word Sorting721408 -Node: History Sorting725451 -Node: Extract Program727287 -Node: Simple Sed734823 -Node: Igawk Program737885 -Ref: Igawk Program-Footnote-1752189 -Ref: Igawk Program-Footnote-2752390 -Node: Anagram Program752528 -Node: Signature Program755596 -Node: Programs Summary756843 -Node: Programs Exercises758058 -Node: Advanced Features761709 -Node: Nondecimal Data763657 -Node: Array Sorting765234 -Node: Controlling Array Traversal765931 -Node: Array Sorting Functions774211 -Ref: Array Sorting Functions-Footnote-1778118 -Node: Two-way I/O778312 -Ref: Two-way I/O-Footnote-1783256 -Ref: Two-way I/O-Footnote-2783435 -Node: TCP/IP Networking783517 -Node: Profiling786362 -Node: Advanced Features Summary793904 -Node: Internationalization795768 -Node: I18N and L10N797248 -Node: Explaining gettext797934 -Ref: Explaining gettext-Footnote-1802960 -Ref: Explaining gettext-Footnote-2803144 -Node: Programmer i18n803309 -Ref: Programmer i18n-Footnote-1808103 -Node: Translator i18n808152 -Node: String Extraction808946 -Ref: String Extraction-Footnote-1810079 -Node: Printf Ordering810165 -Ref: Printf Ordering-Footnote-1812947 -Node: I18N Portability813011 -Ref: I18N Portability-Footnote-1815460 -Node: I18N Example815523 -Ref: I18N Example-Footnote-1818229 -Node: Gawk I18N818301 -Node: I18N Summary818939 -Node: Debugger820278 -Node: Debugging821300 -Node: Debugging Concepts821741 -Node: Debugging Terms823597 -Node: Awk Debugging826194 -Node: Sample Debugging Session827086 -Node: Debugger Invocation827606 -Node: Finding The Bug828939 -Node: List of Debugger Commands835421 -Node: Breakpoint Control836753 -Node: Debugger Execution Control840417 -Node: Viewing And Changing Data843777 -Node: Execution Stack847135 -Node: Debugger Info848648 -Node: Miscellaneous Debugger Commands852642 -Node: Readline Support857826 -Node: Limitations858718 -Node: Debugging Summary860992 -Node: Arbitrary Precision Arithmetic862160 -Node: Computer Arithmetic863647 -Ref: Computer Arithmetic-Footnote-1868034 -Node: Math Definitions868091 -Ref: table-ieee-formats871380 -Ref: Math Definitions-Footnote-1871920 -Node: MPFR features872023 -Node: FP Math Caution873640 -Ref: FP Math Caution-Footnote-1874690 -Node: Inexactness of computations875059 -Node: Inexact representation876007 -Node: Comparing FP Values877362 -Node: Errors accumulate878326 -Node: Getting Accuracy879759 -Node: Try To Round882418 -Node: Setting precision883317 -Ref: table-predefined-precision-strings883999 -Node: Setting the rounding mode885792 -Ref: table-gawk-rounding-modes886156 -Ref: Setting the rounding mode-Footnote-1889610 -Node: Arbitrary Precision Integers889789 -Ref: Arbitrary Precision Integers-Footnote-1892770 -Node: POSIX Floating Point Problems892919 -Ref: POSIX Floating Point Problems-Footnote-1896795 -Node: Floating point summary896833 -Node: Dynamic Extensions899037 -Node: Extension Intro900589 -Node: Plugin License901854 -Node: Extension Mechanism Outline902539 -Ref: figure-load-extension902963 -Ref: figure-load-new-function904448 -Ref: figure-call-new-function905450 -Node: Extension API Description907434 -Node: Extension API Functions Introduction908884 -Node: General Data Types913751 -Ref: General Data Types-Footnote-1919444 -Node: Requesting Values919743 -Ref: table-value-types-returned920480 -Node: Memory Allocation Functions921438 -Ref: Memory Allocation Functions-Footnote-1924185 -Node: Constructor Functions924281 -Node: Registration Functions926039 -Node: Extension Functions926724 -Node: Exit Callback Functions929026 -Node: Extension Version String930274 -Node: Input Parsers930924 -Node: Output Wrappers940738 -Node: Two-way processors945254 -Node: Printing Messages947458 -Ref: Printing Messages-Footnote-1948535 -Node: Updating `ERRNO'948687 -Node: Accessing Parameters949426 -Node: Symbol Table Access950656 -Node: Symbol table by name951170 -Node: Symbol table by cookie953146 -Ref: Symbol table by cookie-Footnote-1957279 -Node: Cached values957342 -Ref: Cached values-Footnote-1960846 -Node: Array Manipulation960937 -Ref: Array Manipulation-Footnote-1962035 -Node: Array Data Types962074 -Ref: Array Data Types-Footnote-1964777 -Node: Array Functions964869 -Node: Flattening Arrays968743 -Node: Creating Arrays975595 -Node: Extension API Variables980326 -Node: Extension Versioning980962 -Node: Extension API Informational Variables982863 -Node: Extension API Boilerplate983949 -Node: Finding Extensions987753 -Node: Extension Example988313 -Node: Internal File Description989043 -Node: Internal File Ops993134 -Ref: Internal File Ops-Footnote-11004566 -Node: Using Internal File Ops1004706 -Ref: Using Internal File Ops-Footnote-11007053 -Node: Extension Samples1007321 -Node: Extension Sample File Functions1008845 -Node: Extension Sample Fnmatch1016413 -Node: Extension Sample Fork1017895 -Node: Extension Sample Inplace1019108 -Node: Extension Sample Ord1020783 -Node: Extension Sample Readdir1021619 -Ref: table-readdir-file-types1022475 -Node: Extension Sample Revout1023274 -Node: Extension Sample Rev2way1023865 -Node: Extension Sample Read write array1024606 -Node: Extension Sample Readfile1026485 -Node: Extension Sample API Tests1027585 -Node: Extension Sample Time1028110 -Node: gawkextlib1029425 -Node: Extension summary1032238 -Node: Extension Exercises1035931 -Node: Language History1036653 -Node: V7/SVR3.11038296 -Node: SVR41040616 -Node: POSIX1042058 -Node: BTL1043444 -Node: POSIX/GNU1044178 -Node: Feature History1049894 -Node: Common Extensions1062985 -Node: Ranges and Locales1064297 -Ref: Ranges and Locales-Footnote-11068914 -Ref: Ranges and Locales-Footnote-21068941 -Ref: Ranges and Locales-Footnote-31069175 -Node: Contributors1069396 -Node: History summary1074821 -Node: Installation1076190 -Node: Gawk Distribution1077141 -Node: Getting1077625 -Node: Extracting1078449 -Node: Distribution contents1080091 -Node: Unix Installation1085808 -Node: Quick Installation1086425 -Node: Additional Configuration Options1088867 -Node: Configuration Philosophy1090605 -Node: Non-Unix Installation1092956 -Node: PC Installation1093414 -Node: PC Binary Installation1094725 -Node: PC Compiling1096573 -Ref: PC Compiling-Footnote-11099572 -Node: PC Testing1099677 -Node: PC Using1100853 -Node: Cygwin1105005 -Node: MSYS1105814 -Node: VMS Installation1106328 -Node: VMS Compilation1107124 -Ref: VMS Compilation-Footnote-11108346 -Node: VMS Dynamic Extensions1108404 -Node: VMS Installation Details1109777 -Node: VMS Running1112029 -Node: VMS GNV1114863 -Node: VMS Old Gawk1115586 -Node: Bugs1116056 -Node: Other Versions1120060 -Node: Installation summary1126287 -Node: Notes1127343 -Node: Compatibility Mode1128208 -Node: Additions1128990 -Node: Accessing The Source1129915 -Node: Adding Code1131351 -Node: New Ports1137529 -Node: Derived Files1142010 -Ref: Derived Files-Footnote-11147091 -Ref: Derived Files-Footnote-21147125 -Ref: Derived Files-Footnote-31147721 -Node: Future Extensions1147835 -Node: Implementation Limitations1148441 -Node: Extension Design1149689 -Node: Old Extension Problems1150843 -Ref: Old Extension Problems-Footnote-11152360 -Node: Extension New Mechanism Goals1152417 -Ref: Extension New Mechanism Goals-Footnote-11155777 -Node: Extension Other Design Decisions1155966 -Node: Extension Future Growth1158072 -Node: Old Extension Mechanism1158908 -Node: Notes summary1160670 -Node: Basic Concepts1161856 -Node: Basic High Level1162537 -Ref: figure-general-flow1162809 -Ref: figure-process-flow1163408 -Ref: Basic High Level-Footnote-11166637 -Node: Basic Data Typing1166822 -Node: Glossary1170150 -Node: Copying1195302 -Node: GNU Free Documentation License1232858 -Node: Index1257994 +Node: Foreword41863 +Node: Preface46208 +Ref: Preface-Footnote-149231 +Ref: Preface-Footnote-249338 +Node: History49570 +Node: Names51944 +Ref: Names-Footnote-153038 +Node: This Manual53184 +Ref: This Manual-Footnote-158963 +Node: Conventions59063 +Node: Manual History61408 +Ref: Manual History-Footnote-164484 +Ref: Manual History-Footnote-264525 +Node: How To Contribute64599 +Node: Acknowledgments65838 +Node: Getting Started70586 +Node: Running gawk73020 +Node: One-shot74210 +Node: Read Terminal75435 +Ref: Read Terminal-Footnote-177398 +Node: Long77569 +Node: Executable Scripts78963 +Ref: Executable Scripts-Footnote-181764 +Node: Comments81866 +Node: Quoting84339 +Node: DOS Quoting89652 +Node: Sample Data Files90327 +Node: Very Simple92934 +Node: Two Rules97693 +Node: More Complex99587 +Ref: More Complex-Footnote-1102519 +Node: Statements/Lines102604 +Ref: Statements/Lines-Footnote-1107060 +Node: Other Features107325 +Node: When108253 +Ref: When-Footnote-1110009 +Node: Intro Summary110074 +Node: Invoking Gawk110957 +Node: Command Line112472 +Node: Options113263 +Ref: Options-Footnote-1129039 +Node: Other Arguments129064 +Node: Naming Standard Input131726 +Node: Environment Variables132819 +Node: AWKPATH Variable133377 +Ref: AWKPATH Variable-Footnote-1136243 +Ref: AWKPATH Variable-Footnote-2136288 +Node: AWKLIBPATH Variable136548 +Node: Other Environment Variables137307 +Node: Exit Status140964 +Node: Include Files141639 +Node: Loading Shared Libraries145217 +Node: Obsolete146601 +Node: Undocumented147298 +Node: Invoking Summary147565 +Node: Regexp149165 +Node: Regexp Usage150624 +Node: Escape Sequences152657 +Node: Regexp Operators158474 +Ref: Regexp Operators-Footnote-1165905 +Ref: Regexp Operators-Footnote-2166052 +Node: Bracket Expressions166150 +Ref: table-char-classes168172 +Node: GNU Regexp Operators171112 +Node: Case-sensitivity174821 +Ref: Case-sensitivity-Footnote-1177713 +Ref: Case-sensitivity-Footnote-2177948 +Node: Leftmost Longest178056 +Node: Computed Regexps179257 +Node: Regexp Summary182629 +Node: Reading Files184098 +Node: Records186191 +Node: awk split records186913 +Node: gawk split records191771 +Ref: gawk split records-Footnote-1196292 +Node: Fields196329 +Ref: Fields-Footnote-1199293 +Node: Nonconstant Fields199379 +Ref: Nonconstant Fields-Footnote-1201609 +Node: Changing Fields201811 +Node: Field Separators207765 +Node: Default Field Splitting210467 +Node: Regexp Field Splitting211584 +Node: Single Character Fields214911 +Node: Command Line Field Separator215970 +Node: Full Line Fields219396 +Ref: Full Line Fields-Footnote-1219904 +Node: Field Splitting Summary219950 +Ref: Field Splitting Summary-Footnote-1223082 +Node: Constant Size223183 +Node: Splitting By Content227789 +Ref: Splitting By Content-Footnote-1231862 +Node: Multiple Line231902 +Ref: Multiple Line-Footnote-1237758 +Node: Getline237937 +Node: Plain Getline240148 +Node: Getline/Variable242243 +Node: Getline/File243390 +Node: Getline/Variable/File244774 +Ref: Getline/Variable/File-Footnote-1246373 +Node: Getline/Pipe246460 +Node: Getline/Variable/Pipe249146 +Node: Getline/Coprocess250253 +Node: Getline/Variable/Coprocess251505 +Node: Getline Notes252242 +Node: Getline Summary255046 +Ref: table-getline-variants255454 +Node: Read Timeout256366 +Ref: Read Timeout-Footnote-1260193 +Node: Command-line directories260251 +Node: Input Summary261155 +Node: Input Exercises264292 +Node: Printing265025 +Node: Print266748 +Node: Print Examples268241 +Node: Output Separators271020 +Node: OFMT273036 +Node: Printf274394 +Node: Basic Printf275300 +Node: Control Letters276839 +Node: Format Modifiers280830 +Node: Printf Examples286857 +Node: Redirection289321 +Node: Special Files296293 +Node: Special FD296826 +Ref: Special FD-Footnote-1300423 +Node: Special Network300497 +Node: Special Caveats301347 +Node: Close Files And Pipes302143 +Ref: Close Files And Pipes-Footnote-1309304 +Ref: Close Files And Pipes-Footnote-2309452 +Node: Output Summary309602 +Node: Output Exercises310599 +Node: Expressions311279 +Node: Values312464 +Node: Constants313140 +Node: Scalar Constants313820 +Ref: Scalar Constants-Footnote-1314679 +Node: Nondecimal-numbers314929 +Node: Regexp Constants317929 +Node: Using Constant Regexps318404 +Node: Variables321476 +Node: Using Variables322131 +Node: Assignment Options323855 +Node: Conversion325730 +Node: Strings And Numbers326254 +Ref: Strings And Numbers-Footnote-1329316 +Node: Locale influences conversions329425 +Ref: table-locale-affects332142 +Node: All Operators332730 +Node: Arithmetic Ops333360 +Node: Concatenation335865 +Ref: Concatenation-Footnote-1338684 +Node: Assignment Ops338790 +Ref: table-assign-ops343773 +Node: Increment Ops345076 +Node: Truth Values and Conditions348514 +Node: Truth Values349597 +Node: Typing and Comparison350646 +Node: Variable Typing351439 +Node: Comparison Operators355091 +Ref: table-relational-ops355501 +Node: POSIX String Comparison359051 +Ref: POSIX String Comparison-Footnote-1360135 +Node: Boolean Ops360273 +Ref: Boolean Ops-Footnote-1364348 +Node: Conditional Exp364439 +Node: Function Calls366166 +Node: Precedence370046 +Node: Locales373715 +Node: Expressions Summary375346 +Node: Patterns and Actions377887 +Node: Pattern Overview379003 +Node: Regexp Patterns380680 +Node: Expression Patterns381223 +Node: Ranges385003 +Node: BEGIN/END388109 +Node: Using BEGIN/END388871 +Ref: Using BEGIN/END-Footnote-1391607 +Node: I/O And BEGIN/END391713 +Node: BEGINFILE/ENDFILE393984 +Node: Empty396915 +Node: Using Shell Variables397232 +Node: Action Overview399515 +Node: Statements401842 +Node: If Statement403690 +Node: While Statement405188 +Node: Do Statement407232 +Node: For Statement408388 +Node: Switch Statement411540 +Node: Break Statement413928 +Node: Continue Statement415969 +Node: Next Statement417794 +Node: Nextfile Statement420184 +Node: Exit Statement422820 +Node: Built-in Variables425224 +Node: User-modified426351 +Ref: User-modified-Footnote-1434040 +Node: Auto-set434102 +Ref: Auto-set-Footnote-1446684 +Ref: Auto-set-Footnote-2446889 +Node: ARGC and ARGV446945 +Node: Pattern Action Summary450849 +Node: Arrays453072 +Node: Array Basics454621 +Node: Array Intro455447 +Ref: figure-array-elements457420 +Ref: Array Intro-Footnote-1459944 +Node: Reference to Elements460072 +Node: Assigning Elements462522 +Node: Array Example463013 +Node: Scanning an Array464745 +Node: Controlling Scanning467746 +Ref: Controlling Scanning-Footnote-1472919 +Node: Delete473235 +Ref: Delete-Footnote-1475986 +Node: Numeric Array Subscripts476043 +Node: Uninitialized Subscripts478226 +Node: Multidimensional479851 +Node: Multiscanning482964 +Node: Arrays of Arrays484553 +Node: Arrays Summary489216 +Node: Functions491321 +Node: Built-in492194 +Node: Calling Built-in493272 +Node: Numeric Functions495260 +Ref: Numeric Functions-Footnote-1499294 +Ref: Numeric Functions-Footnote-2499651 +Ref: Numeric Functions-Footnote-3499699 +Node: String Functions499968 +Ref: String Functions-Footnote-1522965 +Ref: String Functions-Footnote-2523094 +Ref: String Functions-Footnote-3523342 +Node: Gory Details523429 +Ref: table-sub-escapes525202 +Ref: table-sub-proposed526722 +Ref: table-posix-sub528086 +Ref: table-gensub-escapes529626 +Ref: Gory Details-Footnote-1530802 +Node: I/O Functions530953 +Ref: I/O Functions-Footnote-1538063 +Node: Time Functions538210 +Ref: Time Functions-Footnote-1548674 +Ref: Time Functions-Footnote-2548742 +Ref: Time Functions-Footnote-3548900 +Ref: Time Functions-Footnote-4549011 +Ref: Time Functions-Footnote-5549123 +Ref: Time Functions-Footnote-6549350 +Node: Bitwise Functions549616 +Ref: table-bitwise-ops550178 +Ref: Bitwise Functions-Footnote-1554423 +Node: Type Functions554607 +Node: I18N Functions555749 +Node: User-defined557394 +Node: Definition Syntax558198 +Ref: Definition Syntax-Footnote-1563511 +Node: Function Example563580 +Ref: Function Example-Footnote-1566220 +Node: Function Caveats566242 +Node: Calling A Function566760 +Node: Variable Scope567715 +Node: Pass By Value/Reference570703 +Node: Return Statement574213 +Node: Dynamic Typing577197 +Node: Indirect Calls578126 +Node: Functions Summary587839 +Node: Library Functions590378 +Ref: Library Functions-Footnote-1593997 +Ref: Library Functions-Footnote-2594140 +Node: Library Names594311 +Ref: Library Names-Footnote-1597784 +Ref: Library Names-Footnote-2598004 +Node: General Functions598090 +Node: Strtonum Function599118 +Node: Assert Function601898 +Node: Round Function605224 +Node: Cliff Random Function606765 +Node: Ordinal Functions607781 +Ref: Ordinal Functions-Footnote-1610846 +Ref: Ordinal Functions-Footnote-2611098 +Node: Join Function611309 +Ref: Join Function-Footnote-1613080 +Node: Getlocaltime Function613280 +Node: Readfile Function617016 +Node: Data File Management618855 +Node: Filetrans Function619487 +Node: Rewind Function623556 +Node: File Checking625114 +Ref: File Checking-Footnote-1626246 +Node: Empty Files626447 +Node: Ignoring Assigns628426 +Node: Getopt Function629980 +Ref: Getopt Function-Footnote-1641283 +Node: Passwd Functions641486 +Ref: Passwd Functions-Footnote-1650465 +Node: Group Functions650553 +Ref: Group Functions-Footnote-1658484 +Node: Walking Arrays658697 +Node: Library Functions Summary660300 +Node: Library Exercises661688 +Node: Sample Programs662968 +Node: Running Examples663739 +Node: Clones664467 +Node: Cut Program665691 +Node: Egrep Program675549 +Ref: Egrep Program-Footnote-1683136 +Node: Id Program683246 +Node: Split Program686900 +Ref: Split Program-Footnote-1690438 +Node: Tee Program690566 +Node: Uniq Program693353 +Node: Wc Program700774 +Ref: Wc Program-Footnote-1705039 +Node: Miscellaneous Programs705131 +Node: Dupword Program706344 +Node: Alarm Program708375 +Node: Translate Program713179 +Ref: Translate Program-Footnote-1717570 +Ref: Translate Program-Footnote-2717840 +Node: Labels Program717974 +Ref: Labels Program-Footnote-1721335 +Node: Word Sorting721419 +Node: History Sorting725462 +Node: Extract Program727298 +Node: Simple Sed734834 +Node: Igawk Program737896 +Ref: Igawk Program-Footnote-1752200 +Ref: Igawk Program-Footnote-2752401 +Node: Anagram Program752539 +Node: Signature Program755607 +Node: Programs Summary756854 +Node: Programs Exercises758069 +Node: Advanced Features761720 +Node: Nondecimal Data763668 +Node: Array Sorting765245 +Node: Controlling Array Traversal765942 +Node: Array Sorting Functions774222 +Ref: Array Sorting Functions-Footnote-1778129 +Node: Two-way I/O778323 +Ref: Two-way I/O-Footnote-1783267 +Ref: Two-way I/O-Footnote-2783446 +Node: TCP/IP Networking783528 +Node: Profiling786373 +Node: Advanced Features Summary793915 +Node: Internationalization795779 +Node: I18N and L10N797259 +Node: Explaining gettext797945 +Ref: Explaining gettext-Footnote-1802971 +Ref: Explaining gettext-Footnote-2803155 +Node: Programmer i18n803320 +Ref: Programmer i18n-Footnote-1808114 +Node: Translator i18n808163 +Node: String Extraction808957 +Ref: String Extraction-Footnote-1810090 +Node: Printf Ordering810176 +Ref: Printf Ordering-Footnote-1812958 +Node: I18N Portability813022 +Ref: I18N Portability-Footnote-1815471 +Node: I18N Example815534 +Ref: I18N Example-Footnote-1818240 +Node: Gawk I18N818312 +Node: I18N Summary818950 +Node: Debugger820289 +Node: Debugging821311 +Node: Debugging Concepts821752 +Node: Debugging Terms823608 +Node: Awk Debugging826205 +Node: Sample Debugging Session827097 +Node: Debugger Invocation827617 +Node: Finding The Bug828950 +Node: List of Debugger Commands835432 +Node: Breakpoint Control836764 +Node: Debugger Execution Control840428 +Node: Viewing And Changing Data843788 +Node: Execution Stack847146 +Node: Debugger Info848659 +Node: Miscellaneous Debugger Commands852653 +Node: Readline Support857837 +Node: Limitations858729 +Node: Debugging Summary861003 +Node: Arbitrary Precision Arithmetic862171 +Node: Computer Arithmetic863658 +Ref: Computer Arithmetic-Footnote-1868045 +Node: Math Definitions868102 +Ref: table-ieee-formats871391 +Ref: Math Definitions-Footnote-1871931 +Node: MPFR features872034 +Node: FP Math Caution873651 +Ref: FP Math Caution-Footnote-1874701 +Node: Inexactness of computations875070 +Node: Inexact representation876018 +Node: Comparing FP Values877373 +Node: Errors accumulate878337 +Node: Getting Accuracy879770 +Node: Try To Round882429 +Node: Setting precision883328 +Ref: table-predefined-precision-strings884010 +Node: Setting the rounding mode885803 +Ref: table-gawk-rounding-modes886167 +Ref: Setting the rounding mode-Footnote-1889621 +Node: Arbitrary Precision Integers889800 +Ref: Arbitrary Precision Integers-Footnote-1892781 +Node: POSIX Floating Point Problems892930 +Ref: POSIX Floating Point Problems-Footnote-1896806 +Node: Floating point summary896844 +Node: Dynamic Extensions899048 +Node: Extension Intro900601 +Node: Plugin License901866 +Node: Extension Mechanism Outline902551 +Ref: figure-load-extension902975 +Ref: figure-load-new-function904460 +Ref: figure-call-new-function905462 +Node: Extension API Description907446 +Node: Extension API Functions Introduction908896 +Node: General Data Types913763 +Ref: General Data Types-Footnote-1919456 +Node: Requesting Values919755 +Ref: table-value-types-returned920492 +Node: Memory Allocation Functions921450 +Ref: Memory Allocation Functions-Footnote-1924197 +Node: Constructor Functions924293 +Node: Registration Functions926051 +Node: Extension Functions926736 +Node: Exit Callback Functions929038 +Node: Extension Version String930286 +Node: Input Parsers930936 +Node: Output Wrappers940750 +Node: Two-way processors945266 +Node: Printing Messages947470 +Ref: Printing Messages-Footnote-1948547 +Node: Updating `ERRNO'948699 +Node: Accessing Parameters949438 +Node: Symbol Table Access950668 +Node: Symbol table by name951182 +Node: Symbol table by cookie953158 +Ref: Symbol table by cookie-Footnote-1957291 +Node: Cached values957354 +Ref: Cached values-Footnote-1960858 +Node: Array Manipulation960949 +Ref: Array Manipulation-Footnote-1962047 +Node: Array Data Types962086 +Ref: Array Data Types-Footnote-1964789 +Node: Array Functions964881 +Node: Flattening Arrays968755 +Node: Creating Arrays975607 +Node: Extension API Variables980338 +Node: Extension Versioning980974 +Node: Extension API Informational Variables982875 +Node: Extension API Boilerplate983961 +Node: Finding Extensions987765 +Node: Extension Example988325 +Node: Internal File Description989055 +Node: Internal File Ops993146 +Ref: Internal File Ops-Footnote-11004578 +Node: Using Internal File Ops1004718 +Ref: Using Internal File Ops-Footnote-11007065 +Node: Extension Samples1007333 +Node: Extension Sample File Functions1008857 +Node: Extension Sample Fnmatch1016425 +Node: Extension Sample Fork1017907 +Node: Extension Sample Inplace1019120 +Node: Extension Sample Ord1020795 +Node: Extension Sample Readdir1021631 +Ref: table-readdir-file-types1022487 +Node: Extension Sample Revout1023286 +Node: Extension Sample Rev2way1023877 +Node: Extension Sample Read write array1024618 +Node: Extension Sample Readfile1026497 +Node: Extension Sample API Tests1027597 +Node: Extension Sample Time1028122 +Node: gawkextlib1029437 +Node: Extension summary1032250 +Node: Extension Exercises1035943 +Node: Language History1036665 +Node: V7/SVR3.11038308 +Node: SVR41040628 +Node: POSIX1042070 +Node: BTL1043456 +Node: POSIX/GNU1044190 +Node: Feature History1049906 +Node: Common Extensions1062997 +Node: Ranges and Locales1064309 +Ref: Ranges and Locales-Footnote-11068926 +Ref: Ranges and Locales-Footnote-21068953 +Ref: Ranges and Locales-Footnote-31069187 +Node: Contributors1069408 +Node: History summary1074833 +Node: Installation1076202 +Node: Gawk Distribution1077153 +Node: Getting1077637 +Node: Extracting1078461 +Node: Distribution contents1080103 +Node: Unix Installation1085820 +Node: Quick Installation1086437 +Node: Additional Configuration Options1088879 +Node: Configuration Philosophy1090617 +Node: Non-Unix Installation1092968 +Node: PC Installation1093426 +Node: PC Binary Installation1094737 +Node: PC Compiling1096585 +Ref: PC Compiling-Footnote-11099584 +Node: PC Testing1099689 +Node: PC Using1100865 +Node: Cygwin1105017 +Node: MSYS1105826 +Node: VMS Installation1106340 +Node: VMS Compilation1107136 +Ref: VMS Compilation-Footnote-11108358 +Node: VMS Dynamic Extensions1108416 +Node: VMS Installation Details1109789 +Node: VMS Running1112041 +Node: VMS GNV1114875 +Node: VMS Old Gawk1115598 +Node: Bugs1116068 +Node: Other Versions1120072 +Node: Installation summary1126299 +Node: Notes1127355 +Node: Compatibility Mode1128220 +Node: Additions1129002 +Node: Accessing The Source1129927 +Node: Adding Code1131363 +Node: New Ports1137541 +Node: Derived Files1142022 +Ref: Derived Files-Footnote-11147103 +Ref: Derived Files-Footnote-21147137 +Ref: Derived Files-Footnote-31147733 +Node: Future Extensions1147847 +Node: Implementation Limitations1148453 +Node: Extension Design1149701 +Node: Old Extension Problems1150855 +Ref: Old Extension Problems-Footnote-11152372 +Node: Extension New Mechanism Goals1152429 +Ref: Extension New Mechanism Goals-Footnote-11155789 +Node: Extension Other Design Decisions1155978 +Node: Extension Future Growth1158084 +Node: Old Extension Mechanism1158920 +Node: Notes summary1160682 +Node: Basic Concepts1161868 +Node: Basic High Level1162549 +Ref: figure-general-flow1162821 +Ref: figure-process-flow1163420 +Ref: Basic High Level-Footnote-11166649 +Node: Basic Data Typing1166834 +Node: Glossary1170162 +Node: Copying1195314 +Node: GNU Free Documentation License1232870 +Node: Index1258006  End Tag Table -- cgit v1.2.3 From 12e05615041147de61658bda8f5e7d5a4acd87c3 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 26 Aug 2014 21:18:03 +0300 Subject: Remove support for MirBSD. Yay! --- doc/gawk.info | 138 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 70 insertions(+), 68 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index b1a3cbdb..ef7847df 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -26184,6 +26184,8 @@ the current version of `gawk'. - Ultrix + * Support for MirBSD was removed at `gawk' version 4.2. +  File: gawk.info, Node: Feature History, Next: Common Extensions, Prev: POSIX/GNU, Up: Language History @@ -34506,73 +34508,73 @@ Node: SVR41042317 Node: POSIX1043759 Node: BTL1045145 Node: POSIX/GNU1045879 -Node: Feature History1051595 -Node: Common Extensions1064686 -Node: Ranges and Locales1065998 -Ref: Ranges and Locales-Footnote-11070615 -Ref: Ranges and Locales-Footnote-21070642 -Ref: Ranges and Locales-Footnote-31070876 -Node: Contributors1071097 -Node: History summary1076522 -Node: Installation1077891 -Node: Gawk Distribution1078842 -Node: Getting1079326 -Node: Extracting1080150 -Node: Distribution contents1081792 -Node: Unix Installation1087562 -Node: Quick Installation1088179 -Node: Additional Configuration Options1090621 -Node: Configuration Philosophy1092359 -Node: Non-Unix Installation1094710 -Node: PC Installation1095168 -Node: PC Binary Installation1096479 -Node: PC Compiling1098327 -Ref: PC Compiling-Footnote-11101326 -Node: PC Testing1101431 -Node: PC Using1102607 -Node: Cygwin1106759 -Node: MSYS1107568 -Node: VMS Installation1108082 -Node: VMS Compilation1108878 -Ref: VMS Compilation-Footnote-11110100 -Node: VMS Dynamic Extensions1110158 -Node: VMS Installation Details1111531 -Node: VMS Running1113783 -Node: VMS GNV1116617 -Node: VMS Old Gawk1117340 -Node: Bugs1117810 -Node: Other Versions1121814 -Node: Installation summary1128041 -Node: Notes1129097 -Node: Compatibility Mode1129962 -Node: Additions1130744 -Node: Accessing The Source1131669 -Node: Adding Code1133105 -Node: New Ports1139283 -Node: Derived Files1143764 -Ref: Derived Files-Footnote-11148845 -Ref: Derived Files-Footnote-21148879 -Ref: Derived Files-Footnote-31149475 -Node: Future Extensions1149589 -Node: Implementation Limitations1150195 -Node: Extension Design1151443 -Node: Old Extension Problems1152597 -Ref: Old Extension Problems-Footnote-11154114 -Node: Extension New Mechanism Goals1154171 -Ref: Extension New Mechanism Goals-Footnote-11157531 -Node: Extension Other Design Decisions1157720 -Node: Extension Future Growth1159826 -Node: Old Extension Mechanism1160662 -Node: Notes summary1162424 -Node: Basic Concepts1163610 -Node: Basic High Level1164291 -Ref: figure-general-flow1164563 -Ref: figure-process-flow1165162 -Ref: Basic High Level-Footnote-11168391 -Node: Basic Data Typing1168576 -Node: Glossary1171904 -Node: Copying1197056 -Node: GNU Free Documentation License1234612 -Node: Index1259748 +Node: Feature History1051655 +Node: Common Extensions1064746 +Node: Ranges and Locales1066058 +Ref: Ranges and Locales-Footnote-11070675 +Ref: Ranges and Locales-Footnote-21070702 +Ref: Ranges and Locales-Footnote-31070936 +Node: Contributors1071157 +Node: History summary1076582 +Node: Installation1077951 +Node: Gawk Distribution1078902 +Node: Getting1079386 +Node: Extracting1080210 +Node: Distribution contents1081852 +Node: Unix Installation1087622 +Node: Quick Installation1088239 +Node: Additional Configuration Options1090681 +Node: Configuration Philosophy1092419 +Node: Non-Unix Installation1094770 +Node: PC Installation1095228 +Node: PC Binary Installation1096539 +Node: PC Compiling1098387 +Ref: PC Compiling-Footnote-11101386 +Node: PC Testing1101491 +Node: PC Using1102667 +Node: Cygwin1106819 +Node: MSYS1107628 +Node: VMS Installation1108142 +Node: VMS Compilation1108938 +Ref: VMS Compilation-Footnote-11110160 +Node: VMS Dynamic Extensions1110218 +Node: VMS Installation Details1111591 +Node: VMS Running1113843 +Node: VMS GNV1116677 +Node: VMS Old Gawk1117400 +Node: Bugs1117870 +Node: Other Versions1121874 +Node: Installation summary1128101 +Node: Notes1129157 +Node: Compatibility Mode1130022 +Node: Additions1130804 +Node: Accessing The Source1131729 +Node: Adding Code1133165 +Node: New Ports1139343 +Node: Derived Files1143824 +Ref: Derived Files-Footnote-11148905 +Ref: Derived Files-Footnote-21148939 +Ref: Derived Files-Footnote-31149535 +Node: Future Extensions1149649 +Node: Implementation Limitations1150255 +Node: Extension Design1151503 +Node: Old Extension Problems1152657 +Ref: Old Extension Problems-Footnote-11154174 +Node: Extension New Mechanism Goals1154231 +Ref: Extension New Mechanism Goals-Footnote-11157591 +Node: Extension Other Design Decisions1157780 +Node: Extension Future Growth1159886 +Node: Old Extension Mechanism1160722 +Node: Notes summary1162484 +Node: Basic Concepts1163670 +Node: Basic High Level1164351 +Ref: figure-general-flow1164623 +Ref: figure-process-flow1165222 +Ref: Basic High Level-Footnote-11168451 +Node: Basic Data Typing1168636 +Node: Glossary1171964 +Node: Copying1197116 +Node: GNU Free Documentation License1234672 +Node: Index1259808  End Tag Table -- cgit v1.2.3 From a5847cb0a97b093cd0f23b65c72370af836c9748 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 26 Aug 2014 21:32:45 +0300 Subject: Change exclusion of exercises. --- doc/gawk.info | 1108 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 549 insertions(+), 559 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 850c8e73..7e6e1b89 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -219,7 +219,6 @@ entitled "GNU Free Documentation License". * Command-line directories:: What happens if you put a directory on the command line. * Input Summary:: Input summary. - * Input Exercises:: Exercises. * Print:: The `print' statement. * Print Examples:: Simple examples of `print' @@ -245,7 +244,6 @@ entitled "GNU Free Documentation License". * Close Files And Pipes:: Closing Input and Output Files and Pipes. * Output Summary:: Output summary. - * Output Exercises:: Exercises. * Values:: Constants, Variables, and Regular Expressions. @@ -433,7 +431,6 @@ entitled "GNU Free Documentation License". information. * Walking Arrays:: A function to walk arrays of arrays. * Library Functions Summary:: Summary of library functions. - * Library Exercises:: Exercises. * Running Examples:: How to run these examples. * Clones:: Clones of common utilities. @@ -465,7 +462,6 @@ entitled "GNU Free Documentation License". * Signature Program:: People do amazing things with too much time on their hands. * Programs Summary:: Summary of programs. - * Programs Exercises:: Exercises. * Nondecimal Data:: Allowing nondecimal input data. * Array Sorting:: Facilities for controlling array @@ -588,7 +584,6 @@ entitled "GNU Free Documentation License". and `sleep()'. * gawkextlib:: The `gawkextlib' project. * Extension summary:: Extension summary. - * Extension Exercises:: Exercises. * V7/SVR3.1:: The major changes between V7 and System V Release 3.1. @@ -2047,8 +2042,8 @@ summarize, select, and rearrange the output of another utility. It uses features that haven't been covered yet, so don't worry if you don't understand all the details: - LC_ALL=C ls -l | awk '$6 == "Nov" { sum += $5 } - END { print sum }' + ls -l | awk '$6 == "Nov" { sum += $5 } + END { print sum }' This command prints the total number of bytes in all the files in the current directory that were last modified in November (of any year). @@ -4084,7 +4079,6 @@ have to be named on the `awk' command line (*note Getline::). * Command-line directories:: What happens if you put a directory on the command line. * Input Summary:: Input summary. - * Input Exercises:: Exercises.  @@ -6025,7 +6019,6 @@ function. descriptors. * Close Files And Pipes:: Closing Input and Output Files and Pipes. * Output Summary:: Output summary. - * Output Exercises:: Exercises.  @@ -14250,7 +14243,6 @@ for different implementations of `awk' is pretty straightforward. * Group Functions:: Functions for getting group information. * Walking Arrays:: A function to walk arrays of arrays. * Library Functions Summary:: Summary of library functions. - * Library Exercises:: Exercises. ---------- Footnotes ---------- @@ -16093,7 +16085,6 @@ Library Functions::. * Clones:: Clones of common utilities. * Miscellaneous Programs:: Some interesting `awk' programs. * Programs Summary:: Summary of programs. - * Programs Exercises:: Exercises.  @@ -22296,7 +22287,6 @@ sample extensions are automatically built and installed when `gawk' is. `gawk'. * gawkextlib:: The `gawkextlib' project. * Extension summary:: Extension summary. - * Extension Exercises:: Exercises.  @@ -33984,552 +33974,552 @@ Index  Tag Table: Node: Top1204 -Node: Foreword41863 -Node: Preface46208 -Ref: Preface-Footnote-149231 -Ref: Preface-Footnote-249338 -Node: History49570 -Node: Names51944 -Ref: Names-Footnote-153038 -Node: This Manual53184 -Ref: This Manual-Footnote-158963 -Node: Conventions59063 -Node: Manual History61408 -Ref: Manual History-Footnote-164484 -Ref: Manual History-Footnote-264525 -Node: How To Contribute64599 -Node: Acknowledgments65838 -Node: Getting Started70586 -Node: Running gawk73020 -Node: One-shot74210 -Node: Read Terminal75435 -Ref: Read Terminal-Footnote-177398 -Node: Long77569 -Node: Executable Scripts78963 -Ref: Executable Scripts-Footnote-181764 -Node: Comments81866 -Node: Quoting84339 -Node: DOS Quoting89652 -Node: Sample Data Files90327 -Node: Very Simple92934 -Node: Two Rules97693 -Node: More Complex99587 -Ref: More Complex-Footnote-1102519 -Node: Statements/Lines102604 -Ref: Statements/Lines-Footnote-1107060 -Node: Other Features107325 -Node: When108253 -Ref: When-Footnote-1110009 -Node: Intro Summary110074 -Node: Invoking Gawk110957 -Node: Command Line112472 -Node: Options113263 -Ref: Options-Footnote-1129039 -Node: Other Arguments129064 -Node: Naming Standard Input131726 -Node: Environment Variables132819 -Node: AWKPATH Variable133377 -Ref: AWKPATH Variable-Footnote-1136243 -Ref: AWKPATH Variable-Footnote-2136288 -Node: AWKLIBPATH Variable136548 -Node: Other Environment Variables137307 -Node: Exit Status140964 -Node: Include Files141639 -Node: Loading Shared Libraries145217 -Node: Obsolete146601 -Node: Undocumented147298 -Node: Invoking Summary147565 -Node: Regexp149165 -Node: Regexp Usage150624 -Node: Escape Sequences152657 -Node: Regexp Operators158474 -Ref: Regexp Operators-Footnote-1165905 -Ref: Regexp Operators-Footnote-2166052 -Node: Bracket Expressions166150 -Ref: table-char-classes168172 -Node: GNU Regexp Operators171112 -Node: Case-sensitivity174821 -Ref: Case-sensitivity-Footnote-1177713 -Ref: Case-sensitivity-Footnote-2177948 -Node: Leftmost Longest178056 -Node: Computed Regexps179257 -Node: Regexp Summary182629 -Node: Reading Files184098 -Node: Records186191 -Node: awk split records186913 -Node: gawk split records191771 -Ref: gawk split records-Footnote-1196292 -Node: Fields196329 -Ref: Fields-Footnote-1199293 -Node: Nonconstant Fields199379 -Ref: Nonconstant Fields-Footnote-1201609 -Node: Changing Fields201811 -Node: Field Separators207765 -Node: Default Field Splitting210467 -Node: Regexp Field Splitting211584 -Node: Single Character Fields214911 -Node: Command Line Field Separator215970 -Node: Full Line Fields219396 -Ref: Full Line Fields-Footnote-1219904 -Node: Field Splitting Summary219950 -Ref: Field Splitting Summary-Footnote-1223082 -Node: Constant Size223183 -Node: Splitting By Content227789 -Ref: Splitting By Content-Footnote-1231862 -Node: Multiple Line231902 -Ref: Multiple Line-Footnote-1237758 -Node: Getline237937 -Node: Plain Getline240148 -Node: Getline/Variable242243 -Node: Getline/File243390 -Node: Getline/Variable/File244774 -Ref: Getline/Variable/File-Footnote-1246373 -Node: Getline/Pipe246460 -Node: Getline/Variable/Pipe249146 -Node: Getline/Coprocess250253 -Node: Getline/Variable/Coprocess251505 -Node: Getline Notes252242 -Node: Getline Summary255046 -Ref: table-getline-variants255454 -Node: Read Timeout256366 -Ref: Read Timeout-Footnote-1260193 -Node: Command-line directories260251 -Node: Input Summary261155 -Node: Input Exercises264292 -Node: Printing265025 -Node: Print266748 -Node: Print Examples268241 -Node: Output Separators271020 -Node: OFMT273036 -Node: Printf274394 -Node: Basic Printf275300 -Node: Control Letters276839 -Node: Format Modifiers280830 -Node: Printf Examples286857 -Node: Redirection289321 -Node: Special Files296293 -Node: Special FD296826 -Ref: Special FD-Footnote-1300423 -Node: Special Network300497 -Node: Special Caveats301347 -Node: Close Files And Pipes302143 -Ref: Close Files And Pipes-Footnote-1309304 -Ref: Close Files And Pipes-Footnote-2309452 -Node: Output Summary309602 -Node: Output Exercises310599 -Node: Expressions311279 -Node: Values312464 -Node: Constants313140 -Node: Scalar Constants313820 -Ref: Scalar Constants-Footnote-1314679 -Node: Nondecimal-numbers314929 -Node: Regexp Constants317929 -Node: Using Constant Regexps318404 -Node: Variables321476 -Node: Using Variables322131 -Node: Assignment Options323855 -Node: Conversion325730 -Node: Strings And Numbers326254 -Ref: Strings And Numbers-Footnote-1329316 -Node: Locale influences conversions329425 -Ref: table-locale-affects332142 -Node: All Operators332730 -Node: Arithmetic Ops333360 -Node: Concatenation335865 -Ref: Concatenation-Footnote-1338684 -Node: Assignment Ops338790 -Ref: table-assign-ops343773 -Node: Increment Ops345076 -Node: Truth Values and Conditions348514 -Node: Truth Values349597 -Node: Typing and Comparison350646 -Node: Variable Typing351439 -Node: Comparison Operators355091 -Ref: table-relational-ops355501 -Node: POSIX String Comparison359051 -Ref: POSIX String Comparison-Footnote-1360135 -Node: Boolean Ops360273 -Ref: Boolean Ops-Footnote-1364348 -Node: Conditional Exp364439 -Node: Function Calls366166 -Node: Precedence370046 -Node: Locales373715 -Node: Expressions Summary375346 -Node: Patterns and Actions377887 -Node: Pattern Overview379003 -Node: Regexp Patterns380680 -Node: Expression Patterns381223 -Node: Ranges385003 -Node: BEGIN/END388109 -Node: Using BEGIN/END388871 -Ref: Using BEGIN/END-Footnote-1391607 -Node: I/O And BEGIN/END391713 -Node: BEGINFILE/ENDFILE393984 -Node: Empty396915 -Node: Using Shell Variables397232 -Node: Action Overview399515 -Node: Statements401842 -Node: If Statement403690 -Node: While Statement405188 -Node: Do Statement407232 -Node: For Statement408388 -Node: Switch Statement411540 -Node: Break Statement413928 -Node: Continue Statement415969 -Node: Next Statement417794 -Node: Nextfile Statement420184 -Node: Exit Statement422820 -Node: Built-in Variables425224 -Node: User-modified426351 -Ref: User-modified-Footnote-1434040 -Node: Auto-set434102 -Ref: Auto-set-Footnote-1446684 -Ref: Auto-set-Footnote-2446889 -Node: ARGC and ARGV446945 -Node: Pattern Action Summary450849 -Node: Arrays453072 -Node: Array Basics454621 -Node: Array Intro455447 -Ref: figure-array-elements457420 -Ref: Array Intro-Footnote-1459944 -Node: Reference to Elements460072 -Node: Assigning Elements462522 -Node: Array Example463013 -Node: Scanning an Array464745 -Node: Controlling Scanning467746 -Ref: Controlling Scanning-Footnote-1472919 -Node: Delete473235 -Ref: Delete-Footnote-1475986 -Node: Numeric Array Subscripts476043 -Node: Uninitialized Subscripts478226 -Node: Multidimensional479851 -Node: Multiscanning482964 -Node: Arrays of Arrays484553 -Node: Arrays Summary489216 -Node: Functions491321 -Node: Built-in492194 -Node: Calling Built-in493272 -Node: Numeric Functions495260 -Ref: Numeric Functions-Footnote-1499294 -Ref: Numeric Functions-Footnote-2499651 -Ref: Numeric Functions-Footnote-3499699 -Node: String Functions499968 -Ref: String Functions-Footnote-1522965 -Ref: String Functions-Footnote-2523094 -Ref: String Functions-Footnote-3523342 -Node: Gory Details523429 -Ref: table-sub-escapes525202 -Ref: table-sub-proposed526722 -Ref: table-posix-sub528086 -Ref: table-gensub-escapes529626 -Ref: Gory Details-Footnote-1530802 -Node: I/O Functions530953 -Ref: I/O Functions-Footnote-1538063 -Node: Time Functions538210 -Ref: Time Functions-Footnote-1548674 -Ref: Time Functions-Footnote-2548742 -Ref: Time Functions-Footnote-3548900 -Ref: Time Functions-Footnote-4549011 -Ref: Time Functions-Footnote-5549123 -Ref: Time Functions-Footnote-6549350 -Node: Bitwise Functions549616 -Ref: table-bitwise-ops550178 -Ref: Bitwise Functions-Footnote-1554423 -Node: Type Functions554607 -Node: I18N Functions555749 -Node: User-defined557394 -Node: Definition Syntax558198 -Ref: Definition Syntax-Footnote-1563511 -Node: Function Example563580 -Ref: Function Example-Footnote-1566220 -Node: Function Caveats566242 -Node: Calling A Function566760 -Node: Variable Scope567715 -Node: Pass By Value/Reference570703 -Node: Return Statement574213 -Node: Dynamic Typing577197 -Node: Indirect Calls578126 -Node: Functions Summary587839 -Node: Library Functions590378 -Ref: Library Functions-Footnote-1593997 -Ref: Library Functions-Footnote-2594140 -Node: Library Names594311 -Ref: Library Names-Footnote-1597784 -Ref: Library Names-Footnote-2598004 -Node: General Functions598090 -Node: Strtonum Function599118 -Node: Assert Function601898 -Node: Round Function605224 -Node: Cliff Random Function606765 -Node: Ordinal Functions607781 -Ref: Ordinal Functions-Footnote-1610846 -Ref: Ordinal Functions-Footnote-2611098 -Node: Join Function611309 -Ref: Join Function-Footnote-1613080 -Node: Getlocaltime Function613280 -Node: Readfile Function617016 -Node: Data File Management618855 -Node: Filetrans Function619487 -Node: Rewind Function623556 -Node: File Checking625114 -Ref: File Checking-Footnote-1626246 -Node: Empty Files626447 -Node: Ignoring Assigns628426 -Node: Getopt Function629980 -Ref: Getopt Function-Footnote-1641283 -Node: Passwd Functions641486 -Ref: Passwd Functions-Footnote-1650465 -Node: Group Functions650553 -Ref: Group Functions-Footnote-1658484 -Node: Walking Arrays658697 -Node: Library Functions Summary660300 -Node: Library Exercises661688 -Node: Sample Programs662968 -Node: Running Examples663739 -Node: Clones664467 -Node: Cut Program665691 -Node: Egrep Program675549 -Ref: Egrep Program-Footnote-1683136 -Node: Id Program683246 -Node: Split Program686900 -Ref: Split Program-Footnote-1690438 -Node: Tee Program690566 -Node: Uniq Program693353 -Node: Wc Program700774 -Ref: Wc Program-Footnote-1705039 -Node: Miscellaneous Programs705131 -Node: Dupword Program706344 -Node: Alarm Program708375 -Node: Translate Program713179 -Ref: Translate Program-Footnote-1717570 -Ref: Translate Program-Footnote-2717840 -Node: Labels Program717974 -Ref: Labels Program-Footnote-1721335 -Node: Word Sorting721419 -Node: History Sorting725462 -Node: Extract Program727298 -Node: Simple Sed734834 -Node: Igawk Program737896 -Ref: Igawk Program-Footnote-1752200 -Ref: Igawk Program-Footnote-2752401 -Node: Anagram Program752539 -Node: Signature Program755607 -Node: Programs Summary756854 -Node: Programs Exercises758069 -Node: Advanced Features761720 -Node: Nondecimal Data763668 -Node: Array Sorting765245 -Node: Controlling Array Traversal765942 -Node: Array Sorting Functions774222 -Ref: Array Sorting Functions-Footnote-1778129 -Node: Two-way I/O778323 -Ref: Two-way I/O-Footnote-1783267 -Ref: Two-way I/O-Footnote-2783446 -Node: TCP/IP Networking783528 -Node: Profiling786373 -Node: Advanced Features Summary793915 -Node: Internationalization795779 -Node: I18N and L10N797259 -Node: Explaining gettext797945 -Ref: Explaining gettext-Footnote-1802971 -Ref: Explaining gettext-Footnote-2803155 -Node: Programmer i18n803320 -Ref: Programmer i18n-Footnote-1808114 -Node: Translator i18n808163 -Node: String Extraction808957 -Ref: String Extraction-Footnote-1810090 -Node: Printf Ordering810176 -Ref: Printf Ordering-Footnote-1812958 -Node: I18N Portability813022 -Ref: I18N Portability-Footnote-1815471 -Node: I18N Example815534 -Ref: I18N Example-Footnote-1818240 -Node: Gawk I18N818312 -Node: I18N Summary818950 -Node: Debugger820289 -Node: Debugging821311 -Node: Debugging Concepts821752 -Node: Debugging Terms823608 -Node: Awk Debugging826205 -Node: Sample Debugging Session827097 -Node: Debugger Invocation827617 -Node: Finding The Bug828950 -Node: List of Debugger Commands835432 -Node: Breakpoint Control836764 -Node: Debugger Execution Control840428 -Node: Viewing And Changing Data843788 -Node: Execution Stack847146 -Node: Debugger Info848659 -Node: Miscellaneous Debugger Commands852653 -Node: Readline Support857837 -Node: Limitations858729 -Node: Debugging Summary861003 -Node: Arbitrary Precision Arithmetic862171 -Node: Computer Arithmetic863658 -Ref: Computer Arithmetic-Footnote-1868045 -Node: Math Definitions868102 -Ref: table-ieee-formats871391 -Ref: Math Definitions-Footnote-1871931 -Node: MPFR features872034 -Node: FP Math Caution873651 -Ref: FP Math Caution-Footnote-1874701 -Node: Inexactness of computations875070 -Node: Inexact representation876018 -Node: Comparing FP Values877373 -Node: Errors accumulate878337 -Node: Getting Accuracy879770 -Node: Try To Round882429 -Node: Setting precision883328 -Ref: table-predefined-precision-strings884010 -Node: Setting the rounding mode885803 -Ref: table-gawk-rounding-modes886167 -Ref: Setting the rounding mode-Footnote-1889621 -Node: Arbitrary Precision Integers889800 -Ref: Arbitrary Precision Integers-Footnote-1892781 -Node: POSIX Floating Point Problems892930 -Ref: POSIX Floating Point Problems-Footnote-1896806 -Node: Floating point summary896844 -Node: Dynamic Extensions899048 -Node: Extension Intro900601 -Node: Plugin License901866 -Node: Extension Mechanism Outline902551 -Ref: figure-load-extension902975 -Ref: figure-load-new-function904460 -Ref: figure-call-new-function905462 -Node: Extension API Description907446 -Node: Extension API Functions Introduction908896 -Node: General Data Types913763 -Ref: General Data Types-Footnote-1919456 -Node: Requesting Values919755 -Ref: table-value-types-returned920492 -Node: Memory Allocation Functions921450 -Ref: Memory Allocation Functions-Footnote-1924197 -Node: Constructor Functions924293 -Node: Registration Functions926051 -Node: Extension Functions926736 -Node: Exit Callback Functions929038 -Node: Extension Version String930286 -Node: Input Parsers930936 -Node: Output Wrappers940750 -Node: Two-way processors945266 -Node: Printing Messages947470 -Ref: Printing Messages-Footnote-1948547 -Node: Updating `ERRNO'948699 -Node: Accessing Parameters949438 -Node: Symbol Table Access950668 -Node: Symbol table by name951182 -Node: Symbol table by cookie953158 -Ref: Symbol table by cookie-Footnote-1957291 -Node: Cached values957354 -Ref: Cached values-Footnote-1960858 -Node: Array Manipulation960949 -Ref: Array Manipulation-Footnote-1962047 -Node: Array Data Types962086 -Ref: Array Data Types-Footnote-1964789 -Node: Array Functions964881 -Node: Flattening Arrays968755 -Node: Creating Arrays975607 -Node: Extension API Variables980338 -Node: Extension Versioning980974 -Node: Extension API Informational Variables982875 -Node: Extension API Boilerplate983961 -Node: Finding Extensions987765 -Node: Extension Example988325 -Node: Internal File Description989055 -Node: Internal File Ops993146 -Ref: Internal File Ops-Footnote-11004578 -Node: Using Internal File Ops1004718 -Ref: Using Internal File Ops-Footnote-11007065 -Node: Extension Samples1007333 -Node: Extension Sample File Functions1008857 -Node: Extension Sample Fnmatch1016425 -Node: Extension Sample Fork1017907 -Node: Extension Sample Inplace1019120 -Node: Extension Sample Ord1020795 -Node: Extension Sample Readdir1021631 -Ref: table-readdir-file-types1022487 -Node: Extension Sample Revout1023286 -Node: Extension Sample Rev2way1023877 -Node: Extension Sample Read write array1024618 -Node: Extension Sample Readfile1026497 -Node: Extension Sample API Tests1027597 -Node: Extension Sample Time1028122 -Node: gawkextlib1029437 -Node: Extension summary1032250 -Node: Extension Exercises1035943 -Node: Language History1036665 -Node: V7/SVR3.11038308 -Node: SVR41040628 -Node: POSIX1042070 -Node: BTL1043456 -Node: POSIX/GNU1044190 -Node: Feature History1049906 -Node: Common Extensions1062997 -Node: Ranges and Locales1064309 -Ref: Ranges and Locales-Footnote-11068926 -Ref: Ranges and Locales-Footnote-21068953 -Ref: Ranges and Locales-Footnote-31069187 -Node: Contributors1069408 -Node: History summary1074833 -Node: Installation1076202 -Node: Gawk Distribution1077153 -Node: Getting1077637 -Node: Extracting1078461 -Node: Distribution contents1080103 -Node: Unix Installation1085820 -Node: Quick Installation1086437 -Node: Additional Configuration Options1088879 -Node: Configuration Philosophy1090617 -Node: Non-Unix Installation1092968 -Node: PC Installation1093426 -Node: PC Binary Installation1094737 -Node: PC Compiling1096585 -Ref: PC Compiling-Footnote-11099584 -Node: PC Testing1099689 -Node: PC Using1100865 -Node: Cygwin1105017 -Node: MSYS1105826 -Node: VMS Installation1106340 -Node: VMS Compilation1107136 -Ref: VMS Compilation-Footnote-11108358 -Node: VMS Dynamic Extensions1108416 -Node: VMS Installation Details1109789 -Node: VMS Running1112041 -Node: VMS GNV1114875 -Node: VMS Old Gawk1115598 -Node: Bugs1116068 -Node: Other Versions1120072 -Node: Installation summary1126299 -Node: Notes1127355 -Node: Compatibility Mode1128220 -Node: Additions1129002 -Node: Accessing The Source1129927 -Node: Adding Code1131363 -Node: New Ports1137541 -Node: Derived Files1142022 -Ref: Derived Files-Footnote-11147103 -Ref: Derived Files-Footnote-21147137 -Ref: Derived Files-Footnote-31147733 -Node: Future Extensions1147847 -Node: Implementation Limitations1148453 -Node: Extension Design1149701 -Node: Old Extension Problems1150855 -Ref: Old Extension Problems-Footnote-11152372 -Node: Extension New Mechanism Goals1152429 -Ref: Extension New Mechanism Goals-Footnote-11155789 -Node: Extension Other Design Decisions1155978 -Node: Extension Future Growth1158084 -Node: Old Extension Mechanism1158920 -Node: Notes summary1160682 -Node: Basic Concepts1161868 -Node: Basic High Level1162549 -Ref: figure-general-flow1162821 -Ref: figure-process-flow1163420 -Ref: Basic High Level-Footnote-11166649 -Node: Basic Data Typing1166834 -Node: Glossary1170162 -Node: Copying1195314 -Node: GNU Free Documentation License1232870 -Node: Index1258006 +Node: Foreword41858 +Node: Preface46203 +Ref: Preface-Footnote-149226 +Ref: Preface-Footnote-249333 +Node: History49565 +Node: Names51939 +Ref: Names-Footnote-153033 +Node: This Manual53179 +Ref: This Manual-Footnote-158958 +Node: Conventions59058 +Node: Manual History61403 +Ref: Manual History-Footnote-164479 +Ref: Manual History-Footnote-264520 +Node: How To Contribute64594 +Node: Acknowledgments65833 +Node: Getting Started70581 +Node: Running gawk73015 +Node: One-shot74205 +Node: Read Terminal75430 +Ref: Read Terminal-Footnote-177393 +Node: Long77564 +Node: Executable Scripts78958 +Ref: Executable Scripts-Footnote-181759 +Node: Comments81861 +Node: Quoting84334 +Node: DOS Quoting89647 +Node: Sample Data Files90322 +Node: Very Simple92929 +Node: Two Rules97688 +Node: More Complex99582 +Ref: More Complex-Footnote-1102496 +Node: Statements/Lines102581 +Ref: Statements/Lines-Footnote-1107037 +Node: Other Features107302 +Node: When108230 +Ref: When-Footnote-1109986 +Node: Intro Summary110051 +Node: Invoking Gawk110934 +Node: Command Line112449 +Node: Options113240 +Ref: Options-Footnote-1129016 +Node: Other Arguments129041 +Node: Naming Standard Input131703 +Node: Environment Variables132796 +Node: AWKPATH Variable133354 +Ref: AWKPATH Variable-Footnote-1136220 +Ref: AWKPATH Variable-Footnote-2136265 +Node: AWKLIBPATH Variable136525 +Node: Other Environment Variables137284 +Node: Exit Status140941 +Node: Include Files141616 +Node: Loading Shared Libraries145194 +Node: Obsolete146578 +Node: Undocumented147275 +Node: Invoking Summary147542 +Node: Regexp149142 +Node: Regexp Usage150601 +Node: Escape Sequences152634 +Node: Regexp Operators158451 +Ref: Regexp Operators-Footnote-1165882 +Ref: Regexp Operators-Footnote-2166029 +Node: Bracket Expressions166127 +Ref: table-char-classes168149 +Node: GNU Regexp Operators171089 +Node: Case-sensitivity174798 +Ref: Case-sensitivity-Footnote-1177690 +Ref: Case-sensitivity-Footnote-2177925 +Node: Leftmost Longest178033 +Node: Computed Regexps179234 +Node: Regexp Summary182606 +Node: Reading Files184075 +Node: Records186167 +Node: awk split records186889 +Node: gawk split records191747 +Ref: gawk split records-Footnote-1196268 +Node: Fields196305 +Ref: Fields-Footnote-1199269 +Node: Nonconstant Fields199355 +Ref: Nonconstant Fields-Footnote-1201585 +Node: Changing Fields201787 +Node: Field Separators207741 +Node: Default Field Splitting210443 +Node: Regexp Field Splitting211560 +Node: Single Character Fields214887 +Node: Command Line Field Separator215946 +Node: Full Line Fields219372 +Ref: Full Line Fields-Footnote-1219880 +Node: Field Splitting Summary219926 +Ref: Field Splitting Summary-Footnote-1223058 +Node: Constant Size223159 +Node: Splitting By Content227765 +Ref: Splitting By Content-Footnote-1231838 +Node: Multiple Line231878 +Ref: Multiple Line-Footnote-1237734 +Node: Getline237913 +Node: Plain Getline240124 +Node: Getline/Variable242219 +Node: Getline/File243366 +Node: Getline/Variable/File244750 +Ref: Getline/Variable/File-Footnote-1246349 +Node: Getline/Pipe246436 +Node: Getline/Variable/Pipe249122 +Node: Getline/Coprocess250229 +Node: Getline/Variable/Coprocess251481 +Node: Getline Notes252218 +Node: Getline Summary255022 +Ref: table-getline-variants255430 +Node: Read Timeout256342 +Ref: Read Timeout-Footnote-1260169 +Node: Command-line directories260227 +Node: Input Summary261131 +Node: Input Exercises264268 +Node: Printing265001 +Node: Print266723 +Node: Print Examples268216 +Node: Output Separators270995 +Node: OFMT273011 +Node: Printf274369 +Node: Basic Printf275275 +Node: Control Letters276814 +Node: Format Modifiers280805 +Node: Printf Examples286832 +Node: Redirection289296 +Node: Special Files296268 +Node: Special FD296801 +Ref: Special FD-Footnote-1300398 +Node: Special Network300472 +Node: Special Caveats301322 +Node: Close Files And Pipes302118 +Ref: Close Files And Pipes-Footnote-1309279 +Ref: Close Files And Pipes-Footnote-2309427 +Node: Output Summary309577 +Node: Output Exercises310574 +Node: Expressions311254 +Node: Values312439 +Node: Constants313115 +Node: Scalar Constants313795 +Ref: Scalar Constants-Footnote-1314654 +Node: Nondecimal-numbers314904 +Node: Regexp Constants317904 +Node: Using Constant Regexps318379 +Node: Variables321451 +Node: Using Variables322106 +Node: Assignment Options323830 +Node: Conversion325705 +Node: Strings And Numbers326229 +Ref: Strings And Numbers-Footnote-1329291 +Node: Locale influences conversions329400 +Ref: table-locale-affects332117 +Node: All Operators332705 +Node: Arithmetic Ops333335 +Node: Concatenation335840 +Ref: Concatenation-Footnote-1338659 +Node: Assignment Ops338765 +Ref: table-assign-ops343748 +Node: Increment Ops345051 +Node: Truth Values and Conditions348489 +Node: Truth Values349572 +Node: Typing and Comparison350621 +Node: Variable Typing351414 +Node: Comparison Operators355066 +Ref: table-relational-ops355476 +Node: POSIX String Comparison359026 +Ref: POSIX String Comparison-Footnote-1360110 +Node: Boolean Ops360248 +Ref: Boolean Ops-Footnote-1364323 +Node: Conditional Exp364414 +Node: Function Calls366141 +Node: Precedence370021 +Node: Locales373690 +Node: Expressions Summary375321 +Node: Patterns and Actions377862 +Node: Pattern Overview378978 +Node: Regexp Patterns380655 +Node: Expression Patterns381198 +Node: Ranges384978 +Node: BEGIN/END388084 +Node: Using BEGIN/END388846 +Ref: Using BEGIN/END-Footnote-1391582 +Node: I/O And BEGIN/END391688 +Node: BEGINFILE/ENDFILE393959 +Node: Empty396890 +Node: Using Shell Variables397207 +Node: Action Overview399490 +Node: Statements401817 +Node: If Statement403665 +Node: While Statement405163 +Node: Do Statement407207 +Node: For Statement408363 +Node: Switch Statement411515 +Node: Break Statement413903 +Node: Continue Statement415944 +Node: Next Statement417769 +Node: Nextfile Statement420159 +Node: Exit Statement422795 +Node: Built-in Variables425199 +Node: User-modified426326 +Ref: User-modified-Footnote-1434015 +Node: Auto-set434077 +Ref: Auto-set-Footnote-1446659 +Ref: Auto-set-Footnote-2446864 +Node: ARGC and ARGV446920 +Node: Pattern Action Summary450824 +Node: Arrays453047 +Node: Array Basics454596 +Node: Array Intro455422 +Ref: figure-array-elements457395 +Ref: Array Intro-Footnote-1459919 +Node: Reference to Elements460047 +Node: Assigning Elements462497 +Node: Array Example462988 +Node: Scanning an Array464720 +Node: Controlling Scanning467721 +Ref: Controlling Scanning-Footnote-1472894 +Node: Delete473210 +Ref: Delete-Footnote-1475961 +Node: Numeric Array Subscripts476018 +Node: Uninitialized Subscripts478201 +Node: Multidimensional479826 +Node: Multiscanning482939 +Node: Arrays of Arrays484528 +Node: Arrays Summary489191 +Node: Functions491296 +Node: Built-in492169 +Node: Calling Built-in493247 +Node: Numeric Functions495235 +Ref: Numeric Functions-Footnote-1499269 +Ref: Numeric Functions-Footnote-2499626 +Ref: Numeric Functions-Footnote-3499674 +Node: String Functions499943 +Ref: String Functions-Footnote-1522940 +Ref: String Functions-Footnote-2523069 +Ref: String Functions-Footnote-3523317 +Node: Gory Details523404 +Ref: table-sub-escapes525177 +Ref: table-sub-proposed526697 +Ref: table-posix-sub528061 +Ref: table-gensub-escapes529601 +Ref: Gory Details-Footnote-1530777 +Node: I/O Functions530928 +Ref: I/O Functions-Footnote-1538038 +Node: Time Functions538185 +Ref: Time Functions-Footnote-1548649 +Ref: Time Functions-Footnote-2548717 +Ref: Time Functions-Footnote-3548875 +Ref: Time Functions-Footnote-4548986 +Ref: Time Functions-Footnote-5549098 +Ref: Time Functions-Footnote-6549325 +Node: Bitwise Functions549591 +Ref: table-bitwise-ops550153 +Ref: Bitwise Functions-Footnote-1554398 +Node: Type Functions554582 +Node: I18N Functions555724 +Node: User-defined557369 +Node: Definition Syntax558173 +Ref: Definition Syntax-Footnote-1563486 +Node: Function Example563555 +Ref: Function Example-Footnote-1566195 +Node: Function Caveats566217 +Node: Calling A Function566735 +Node: Variable Scope567690 +Node: Pass By Value/Reference570678 +Node: Return Statement574188 +Node: Dynamic Typing577172 +Node: Indirect Calls578101 +Node: Functions Summary587814 +Node: Library Functions590353 +Ref: Library Functions-Footnote-1593971 +Ref: Library Functions-Footnote-2594114 +Node: Library Names594285 +Ref: Library Names-Footnote-1597758 +Ref: Library Names-Footnote-2597978 +Node: General Functions598064 +Node: Strtonum Function599092 +Node: Assert Function601872 +Node: Round Function605198 +Node: Cliff Random Function606739 +Node: Ordinal Functions607755 +Ref: Ordinal Functions-Footnote-1610820 +Ref: Ordinal Functions-Footnote-2611072 +Node: Join Function611283 +Ref: Join Function-Footnote-1613054 +Node: Getlocaltime Function613254 +Node: Readfile Function616990 +Node: Data File Management618829 +Node: Filetrans Function619461 +Node: Rewind Function623530 +Node: File Checking625088 +Ref: File Checking-Footnote-1626220 +Node: Empty Files626421 +Node: Ignoring Assigns628400 +Node: Getopt Function629954 +Ref: Getopt Function-Footnote-1641257 +Node: Passwd Functions641460 +Ref: Passwd Functions-Footnote-1650439 +Node: Group Functions650527 +Ref: Group Functions-Footnote-1658458 +Node: Walking Arrays658671 +Node: Library Functions Summary660274 +Node: Library Exercises661662 +Node: Sample Programs662942 +Node: Running Examples663712 +Node: Clones664440 +Node: Cut Program665664 +Node: Egrep Program675522 +Ref: Egrep Program-Footnote-1683109 +Node: Id Program683219 +Node: Split Program686873 +Ref: Split Program-Footnote-1690411 +Node: Tee Program690539 +Node: Uniq Program693326 +Node: Wc Program700747 +Ref: Wc Program-Footnote-1705012 +Node: Miscellaneous Programs705104 +Node: Dupword Program706317 +Node: Alarm Program708348 +Node: Translate Program713152 +Ref: Translate Program-Footnote-1717543 +Ref: Translate Program-Footnote-2717813 +Node: Labels Program717947 +Ref: Labels Program-Footnote-1721308 +Node: Word Sorting721392 +Node: History Sorting725435 +Node: Extract Program727271 +Node: Simple Sed734807 +Node: Igawk Program737869 +Ref: Igawk Program-Footnote-1752173 +Ref: Igawk Program-Footnote-2752374 +Node: Anagram Program752512 +Node: Signature Program755580 +Node: Programs Summary756827 +Node: Programs Exercises758042 +Node: Advanced Features761693 +Node: Nondecimal Data763641 +Node: Array Sorting765218 +Node: Controlling Array Traversal765915 +Node: Array Sorting Functions774195 +Ref: Array Sorting Functions-Footnote-1778102 +Node: Two-way I/O778296 +Ref: Two-way I/O-Footnote-1783240 +Ref: Two-way I/O-Footnote-2783419 +Node: TCP/IP Networking783501 +Node: Profiling786346 +Node: Advanced Features Summary793888 +Node: Internationalization795752 +Node: I18N and L10N797232 +Node: Explaining gettext797918 +Ref: Explaining gettext-Footnote-1802944 +Ref: Explaining gettext-Footnote-2803128 +Node: Programmer i18n803293 +Ref: Programmer i18n-Footnote-1808087 +Node: Translator i18n808136 +Node: String Extraction808930 +Ref: String Extraction-Footnote-1810063 +Node: Printf Ordering810149 +Ref: Printf Ordering-Footnote-1812931 +Node: I18N Portability812995 +Ref: I18N Portability-Footnote-1815444 +Node: I18N Example815507 +Ref: I18N Example-Footnote-1818213 +Node: Gawk I18N818285 +Node: I18N Summary818923 +Node: Debugger820262 +Node: Debugging821284 +Node: Debugging Concepts821725 +Node: Debugging Terms823581 +Node: Awk Debugging826178 +Node: Sample Debugging Session827070 +Node: Debugger Invocation827590 +Node: Finding The Bug828923 +Node: List of Debugger Commands835405 +Node: Breakpoint Control836737 +Node: Debugger Execution Control840401 +Node: Viewing And Changing Data843761 +Node: Execution Stack847119 +Node: Debugger Info848632 +Node: Miscellaneous Debugger Commands852626 +Node: Readline Support857810 +Node: Limitations858702 +Node: Debugging Summary860976 +Node: Arbitrary Precision Arithmetic862144 +Node: Computer Arithmetic863631 +Ref: Computer Arithmetic-Footnote-1868018 +Node: Math Definitions868075 +Ref: table-ieee-formats871364 +Ref: Math Definitions-Footnote-1871904 +Node: MPFR features872007 +Node: FP Math Caution873624 +Ref: FP Math Caution-Footnote-1874674 +Node: Inexactness of computations875043 +Node: Inexact representation875991 +Node: Comparing FP Values877346 +Node: Errors accumulate878310 +Node: Getting Accuracy879743 +Node: Try To Round882402 +Node: Setting precision883301 +Ref: table-predefined-precision-strings883983 +Node: Setting the rounding mode885776 +Ref: table-gawk-rounding-modes886140 +Ref: Setting the rounding mode-Footnote-1889594 +Node: Arbitrary Precision Integers889773 +Ref: Arbitrary Precision Integers-Footnote-1892754 +Node: POSIX Floating Point Problems892903 +Ref: POSIX Floating Point Problems-Footnote-1896779 +Node: Floating point summary896817 +Node: Dynamic Extensions899021 +Node: Extension Intro900573 +Node: Plugin License901838 +Node: Extension Mechanism Outline902523 +Ref: figure-load-extension902947 +Ref: figure-load-new-function904432 +Ref: figure-call-new-function905434 +Node: Extension API Description907418 +Node: Extension API Functions Introduction908868 +Node: General Data Types913735 +Ref: General Data Types-Footnote-1919428 +Node: Requesting Values919727 +Ref: table-value-types-returned920464 +Node: Memory Allocation Functions921422 +Ref: Memory Allocation Functions-Footnote-1924169 +Node: Constructor Functions924265 +Node: Registration Functions926023 +Node: Extension Functions926708 +Node: Exit Callback Functions929010 +Node: Extension Version String930258 +Node: Input Parsers930908 +Node: Output Wrappers940722 +Node: Two-way processors945238 +Node: Printing Messages947442 +Ref: Printing Messages-Footnote-1948519 +Node: Updating `ERRNO'948671 +Node: Accessing Parameters949410 +Node: Symbol Table Access950640 +Node: Symbol table by name951154 +Node: Symbol table by cookie953130 +Ref: Symbol table by cookie-Footnote-1957263 +Node: Cached values957326 +Ref: Cached values-Footnote-1960830 +Node: Array Manipulation960921 +Ref: Array Manipulation-Footnote-1962019 +Node: Array Data Types962058 +Ref: Array Data Types-Footnote-1964761 +Node: Array Functions964853 +Node: Flattening Arrays968727 +Node: Creating Arrays975579 +Node: Extension API Variables980310 +Node: Extension Versioning980946 +Node: Extension API Informational Variables982847 +Node: Extension API Boilerplate983933 +Node: Finding Extensions987737 +Node: Extension Example988297 +Node: Internal File Description989027 +Node: Internal File Ops993118 +Ref: Internal File Ops-Footnote-11004550 +Node: Using Internal File Ops1004690 +Ref: Using Internal File Ops-Footnote-11007037 +Node: Extension Samples1007305 +Node: Extension Sample File Functions1008829 +Node: Extension Sample Fnmatch1016397 +Node: Extension Sample Fork1017879 +Node: Extension Sample Inplace1019092 +Node: Extension Sample Ord1020767 +Node: Extension Sample Readdir1021603 +Ref: table-readdir-file-types1022459 +Node: Extension Sample Revout1023258 +Node: Extension Sample Rev2way1023849 +Node: Extension Sample Read write array1024590 +Node: Extension Sample Readfile1026469 +Node: Extension Sample API Tests1027569 +Node: Extension Sample Time1028094 +Node: gawkextlib1029409 +Node: Extension summary1032222 +Node: Extension Exercises1035915 +Node: Language History1036637 +Node: V7/SVR3.11038280 +Node: SVR41040600 +Node: POSIX1042042 +Node: BTL1043428 +Node: POSIX/GNU1044162 +Node: Feature History1049878 +Node: Common Extensions1062969 +Node: Ranges and Locales1064281 +Ref: Ranges and Locales-Footnote-11068898 +Ref: Ranges and Locales-Footnote-21068925 +Ref: Ranges and Locales-Footnote-31069159 +Node: Contributors1069380 +Node: History summary1074805 +Node: Installation1076174 +Node: Gawk Distribution1077125 +Node: Getting1077609 +Node: Extracting1078433 +Node: Distribution contents1080075 +Node: Unix Installation1085792 +Node: Quick Installation1086409 +Node: Additional Configuration Options1088851 +Node: Configuration Philosophy1090589 +Node: Non-Unix Installation1092940 +Node: PC Installation1093398 +Node: PC Binary Installation1094709 +Node: PC Compiling1096557 +Ref: PC Compiling-Footnote-11099556 +Node: PC Testing1099661 +Node: PC Using1100837 +Node: Cygwin1104989 +Node: MSYS1105798 +Node: VMS Installation1106312 +Node: VMS Compilation1107108 +Ref: VMS Compilation-Footnote-11108330 +Node: VMS Dynamic Extensions1108388 +Node: VMS Installation Details1109761 +Node: VMS Running1112013 +Node: VMS GNV1114847 +Node: VMS Old Gawk1115570 +Node: Bugs1116040 +Node: Other Versions1120044 +Node: Installation summary1126271 +Node: Notes1127327 +Node: Compatibility Mode1128192 +Node: Additions1128974 +Node: Accessing The Source1129899 +Node: Adding Code1131335 +Node: New Ports1137513 +Node: Derived Files1141994 +Ref: Derived Files-Footnote-11147075 +Ref: Derived Files-Footnote-21147109 +Ref: Derived Files-Footnote-31147705 +Node: Future Extensions1147819 +Node: Implementation Limitations1148425 +Node: Extension Design1149673 +Node: Old Extension Problems1150827 +Ref: Old Extension Problems-Footnote-11152344 +Node: Extension New Mechanism Goals1152401 +Ref: Extension New Mechanism Goals-Footnote-11155761 +Node: Extension Other Design Decisions1155950 +Node: Extension Future Growth1158056 +Node: Old Extension Mechanism1158892 +Node: Notes summary1160654 +Node: Basic Concepts1161840 +Node: Basic High Level1162521 +Ref: figure-general-flow1162793 +Ref: figure-process-flow1163392 +Ref: Basic High Level-Footnote-11166621 +Node: Basic Data Typing1166806 +Node: Glossary1170134 +Node: Copying1195286 +Node: GNU Free Documentation License1232842 +Node: Index1257978  End Tag Table -- cgit v1.2.3 From 6c541fd0f75cd328dd80afec757ecccc833719af Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 29 Aug 2014 13:11:45 +0300 Subject: More doc updates. --- doc/gawk.info | 1507 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 769 insertions(+), 738 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 7e6e1b89..2841d21e 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -170,10 +170,10 @@ entitled "GNU Free Documentation License". * Escape Sequences:: How to write nonprinting characters. * Regexp Operators:: Regular Expression Operators. * Bracket Expressions:: What can go between `[...]'. -* GNU Regexp Operators:: Operators specific to GNU software. -* Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* GNU Regexp Operators:: Operators specific to GNU software. +* Case-sensitivity:: How to do case-insensitive matching. * Regexp Summary:: Regular expressions summary. * Records:: Controlling how data is split into records. @@ -1455,15 +1455,17 @@ end-of-file character may be different. For example, on OS/2, it is As an example, the following program prints a friendly piece of advice (from Douglas Adams's `The Hitchhiker's Guide to the Galaxy'), to keep you from worrying about the complexities of computer -programming (`BEGIN' is a feature we haven't discussed yet): +programming: - $ awk "BEGIN { print \"Don't Panic!\" }" + $ awk "BEGIN { print "Don\47t Panic!" }" -| Don't Panic! - This program does not read any input. The `\' before each of the -inner double quotes is necessary because of the shell's quoting -rules--in particular because it mixes both single quotes and double -quotes.(1) + `awk' executes statements associated with `BEGIN' before reading any +input. If there are no other statements in your program, as is the +case here, `awk' just stops, instead of trying to read input it doesn't +know how to process. The `\47' is a magic way of getting a single +quote into the program, without having to engage in ugly shell quoting +tricks. NOTE: As a side note, if you use Bash as your shell, you should execute the command `set +H' before running this program @@ -1486,12 +1488,6 @@ works is explained shortly). -| What, me worry? Ctrl-d - ---------- Footnotes ---------- - - (1) Although we generally recommend the use of single quotes around -the program text, double quotes are needed here in order to put the -single quote into the message. -  File: gawk.info, Node: Long, Next: Executable Scripts, Prev: Read Terminal, Up: Running gawk @@ -1937,6 +1933,9 @@ different ways to do the same things shown here: awk '{ if (length($0) > max) max = length($0) } END { print max }' data + The code associated with `END' executes after all input has been + read; it's the other side of the coin to `BEGIN'. + * Print the length of the longest line in `data': expand data | awk '{ if (x < length($0)) x = length($0) } @@ -2731,6 +2730,10 @@ arguments, including variable assignments, are included. As each element of `ARGV' is processed, `gawk' sets the variable `ARGIND' to the index in `ARGV' of the current element. + Changing `ARGC' and `ARGV' in your `awk' program lets you control +how `awk' processes the input files; this is described in more detail +in *note ARGC and ARGV::. + The distinction between file name arguments and variable-assignment arguments is made when `awk' is about to open the next input file. At that point in execution, it checks the file name to see whether it is @@ -3225,10 +3228,10 @@ you specify more complicated classes of strings. * Escape Sequences:: How to write nonprinting characters. * Regexp Operators:: Regular Expression Operators. * Bracket Expressions:: What can go between `[...]'. -* GNU Regexp Operators:: Operators specific to GNU software. -* Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* GNU Regexp Operators:: Operators specific to GNU software. +* Case-sensitivity:: How to do case-insensitive matching. * Regexp Summary:: Regular expressions summary.  @@ -3368,17 +3371,19 @@ apply to both string constants and regexp constants: `\/' A literal slash (necessary for regexp constants only). This sequence is used when you want to write a regexp constant that - contains a slash. Because the regexp is delimited by slashes, you - need to escape the slash that is part of the pattern, in order to + contains a slash (such as `/.*:\/home\/[[:alnum:]]+:.*/'; the + `[[:alnum:]]' notation is discussed shortly, in *note Bracket + Expressions::). Because the regexp is delimited by slashes, you + need to escape any slash that is part of the pattern, in order to tell `awk' to keep processing the rest of the regexp. `\"' A literal double quote (necessary for string constants only). This sequence is used when you want to write a string constant - that contains a double quote. Because the string is delimited by - double quotes, you need to escape the quote that is part of the - string, in order to tell `awk' to keep processing the rest of the - string. + that contains a double quote (such as `"He said \"hi!\" to her."'). + Because the string is delimited by double quotes, you need to + escape any quote that is part of the string, in order to tell + `awk' to keep processing the rest of the string. In `gawk', a number of additional two-character sequences that begin with a backslash have special meaning in regexps. *Note GNU Regexp @@ -3616,7 +3621,7 @@ list". regexp operator or function.  -File: gawk.info, Node: Bracket Expressions, Next: GNU Regexp Operators, Prev: Regexp Operators, Up: Regexp +File: gawk.info, Node: Bracket Expressions, Next: Leftmost Longest, Prev: Regexp Operators, Up: Regexp 3.4 Using Bracket Expressions ============================= @@ -3721,9 +3726,118 @@ Equivalence classes classes.  -File: gawk.info, Node: GNU Regexp Operators, Next: Case-sensitivity, Prev: Bracket Expressions, Up: Regexp +File: gawk.info, Node: Leftmost Longest, Next: Computed Regexps, Prev: Bracket Expressions, Up: Regexp + +3.5 How Much Text Matches? +========================== + +Consider the following: + + echo aaaabcd | awk '{ sub(/a+/, ""); print }' + + This example uses the `sub()' function (which we haven't discussed +yet; *note String Functions::) to make a change to the input record. +Here, the regexp `/a+/' indicates "one or more `a' characters," and the +replacement text is `'. + + The input contains four `a' characters. `awk' (and POSIX) regular +expressions always match the leftmost, _longest_ sequence of input +characters that can match. Thus, all four `a' characters are replaced +with `' in this example: + + $ echo aaaabcd | awk '{ sub(/a+/, ""); print }' + -| bcd + + For simple match/no-match tests, this is not so important. But when +doing text matching and substitutions with the `match()', `sub()', +`gsub()', and `gensub()' functions, it is very important. *Note String +Functions::, for more information on these functions. Understanding +this principle is also important for regexp-based record and field +splitting (*note Records::, and also *note Field Separators::). + + +File: gawk.info, Node: Computed Regexps, Next: GNU Regexp Operators, Prev: Leftmost Longest, Up: Regexp + +3.6 Using Dynamic Regexps +========================= + +The righthand side of a `~' or `!~' operator need not be a regexp +constant (i.e., a string of characters between slashes). It may be any +expression. The expression is evaluated and converted to a string if +necessary; the contents of the string are then used as the regexp. A +regexp computed in this way is called a "dynamic regexp" or a "computed +regexp": + + BEGIN { digits_regexp = "[[:digit:]]+" } + $0 ~ digits_regexp { print } + +This sets `digits_regexp' to a regexp that describes one or more digits, +and tests whether the input record matches this regexp. + + NOTE: When using the `~' and `!~' operators, there is a difference + between a regexp constant enclosed in slashes and a string + constant enclosed in double quotes. If you are going to use a + string constant, you have to understand that the string is, in + essence, scanned _twice_: the first time when `awk' reads your + program, and the second time when it goes to match the string on + the lefthand side of the operator with the pattern on the right. + This is true of any string-valued expression (such as + `digits_regexp', shown previously), not just string constants. + + What difference does it make if the string is scanned twice? The +answer has to do with escape sequences, and particularly with +backslashes. To get a backslash into a regular expression inside a +string, you have to type two backslashes. + + For example, `/\*/' is a regexp constant for a literal `*'. Only +one backslash is needed. To do the same thing with a string, you have +to type `"\\*"'. The first backslash escapes the second one so that +the string actually contains the two characters `\' and `*'. + + Given that you can use both regexp and string constants to describe +regular expressions, which should you use? The answer is "regexp +constants," for several reasons: + + * String constants are more complicated to write and more difficult + to read. Using regexp constants makes your programs less + error-prone. Not understanding the difference between the two + kinds of constants is a common source of errors. + + * It is more efficient to use regexp constants. `awk' can note that + you have supplied a regexp and store it internally in a form that + makes pattern matching more efficient. When using a string + constant, `awk' must first convert the string into this internal + form and then perform the pattern matching. + + * Using regexp constants is better form; it shows clearly that you + intend a regexp match. + + Using `\n' in Bracket Expressions of Dynamic Regexps + + Some versions of `awk' do not allow the newline character to be used +inside a bracket expression for a dynamic regexp: + + $ awk '$0 ~ "[ \t\n]"' + error--> awk: newline in character class [ + error--> ]... + error--> source line number 1 + error--> context is + error--> >>> <<< + + But a newline in a regexp constant works with no problem: + + $ awk '$0 ~ /[ \t\n]/' + here is a sample line + -| here is a sample line + Ctrl-d + + `gawk' does not have this problem, and it isn't likely to occur +often in practice, but it's worth noting for future reference. + + +File: gawk.info, Node: GNU Regexp Operators, Next: Case-sensitivity, Prev: Computed Regexps, Up: Regexp -3.5 `gawk'-Specific Regexp Operators +3.7 `gawk'-Specific Regexp Operators ==================================== GNU software that deals with regular expressions provides a number of @@ -3817,9 +3931,9 @@ No options default.  -File: gawk.info, Node: Case-sensitivity, Next: Leftmost Longest, Prev: GNU Regexp Operators, Up: Regexp +File: gawk.info, Node: Case-sensitivity, Next: Regexp Summary, Prev: GNU Regexp Operators, Up: Regexp -3.6 Case Sensitivity in Matching +3.8 Case Sensitivity in Matching ================================ Case is normally significant in regular expressions, both when matching @@ -3892,116 +4006,7 @@ obscure and we don't recommend it. means that `gawk' does the right thing.  -File: gawk.info, Node: Leftmost Longest, Next: Computed Regexps, Prev: Case-sensitivity, Up: Regexp - -3.7 How Much Text Matches? -========================== - -Consider the following: - - echo aaaabcd | awk '{ sub(/a+/, ""); print }' - - This example uses the `sub()' function (which we haven't discussed -yet; *note String Functions::) to make a change to the input record. -Here, the regexp `/a+/' indicates "one or more `a' characters," and the -replacement text is `'. - - The input contains four `a' characters. `awk' (and POSIX) regular -expressions always match the leftmost, _longest_ sequence of input -characters that can match. Thus, all four `a' characters are replaced -with `' in this example: - - $ echo aaaabcd | awk '{ sub(/a+/, ""); print }' - -| bcd - - For simple match/no-match tests, this is not so important. But when -doing text matching and substitutions with the `match()', `sub()', -`gsub()', and `gensub()' functions, it is very important. *Note String -Functions::, for more information on these functions. Understanding -this principle is also important for regexp-based record and field -splitting (*note Records::, and also *note Field Separators::). - - -File: gawk.info, Node: Computed Regexps, Next: Regexp Summary, Prev: Leftmost Longest, Up: Regexp - -3.8 Using Dynamic Regexps -========================= - -The righthand side of a `~' or `!~' operator need not be a regexp -constant (i.e., a string of characters between slashes). It may be any -expression. The expression is evaluated and converted to a string if -necessary; the contents of the string are then used as the regexp. A -regexp computed in this way is called a "dynamic regexp" or a "computed -regexp": - - BEGIN { digits_regexp = "[[:digit:]]+" } - $0 ~ digits_regexp { print } - -This sets `digits_regexp' to a regexp that describes one or more digits, -and tests whether the input record matches this regexp. - - NOTE: When using the `~' and `!~' operators, there is a difference - between a regexp constant enclosed in slashes and a string - constant enclosed in double quotes. If you are going to use a - string constant, you have to understand that the string is, in - essence, scanned _twice_: the first time when `awk' reads your - program, and the second time when it goes to match the string on - the lefthand side of the operator with the pattern on the right. - This is true of any string-valued expression (such as - `digits_regexp', shown previously), not just string constants. - - What difference does it make if the string is scanned twice? The -answer has to do with escape sequences, and particularly with -backslashes. To get a backslash into a regular expression inside a -string, you have to type two backslashes. - - For example, `/\*/' is a regexp constant for a literal `*'. Only -one backslash is needed. To do the same thing with a string, you have -to type `"\\*"'. The first backslash escapes the second one so that -the string actually contains the two characters `\' and `*'. - - Given that you can use both regexp and string constants to describe -regular expressions, which should you use? The answer is "regexp -constants," for several reasons: - - * String constants are more complicated to write and more difficult - to read. Using regexp constants makes your programs less - error-prone. Not understanding the difference between the two - kinds of constants is a common source of errors. - - * It is more efficient to use regexp constants. `awk' can note that - you have supplied a regexp and store it internally in a form that - makes pattern matching more efficient. When using a string - constant, `awk' must first convert the string into this internal - form and then perform the pattern matching. - - * Using regexp constants is better form; it shows clearly that you - intend a regexp match. - - Using `\n' in Bracket Expressions of Dynamic Regexps - - Some versions of `awk' do not allow the newline character to be used -inside a bracket expression for a dynamic regexp: - - $ awk '$0 ~ "[ \t\n]"' - error--> awk: newline in character class [ - error--> ]... - error--> source line number 1 - error--> context is - error--> >>> <<< - - But a newline in a regexp constant works with no problem: - - $ awk '$0 ~ /[ \t\n]/' - here is a sample line - -| here is a sample line - Ctrl-d - - `gawk' does not have this problem, and it isn't likely to occur -often in practice, but it's worth noting for future reference. - - -File: gawk.info, Node: Regexp Summary, Prev: Computed Regexps, Up: Regexp +File: gawk.info, Node: Regexp Summary, Prev: Case-sensitivity, Up: Regexp 3.9 Summary =========== @@ -5388,35 +5393,47 @@ input record and split it up into fields. This is useful if you've finished processing the current record, but want to do some special processing on the next record _right now_. For example: + # Remove text between /* and */, inclusive { - if ((t = index($0, "/*")) != 0) { - # value of `tmp' will be "" if t is 1 - tmp = substr($0, 1, t - 1) - u = index(substr($0, t + 2), "*/") - offset = t + 2 - while (u == 0) { - if (getline <= 0) { + if ((i = index($0, "/*")) != 0) { + out = substr($0, 1, i - 1) # leading part of the string + rest = substr($0, i + 2) # ... */ ... + j = index(rest, "*/") # is */ in trailing part? + if (j > 0) { + rest = substr(rest, j + 2) # remove comment + } else { + while (j == 0) { + # get more text + if (getline <= 0) { m = "unexpected EOF or error" m = (m ": " ERRNO) print m > "/dev/stderr" exit - } - u = index($0, "*/") - offset = 0 - } - # substr() expression will be "" if */ - # occurred at end of line - $0 = tmp substr($0, offset + u + 2) - } - print $0 + } + # build up the line using string concatenation + rest = rest $0 + j = index(rest, "*/") # is */ in trailing part? + if (j != 0) { + rest = substr(rest, j + 2) + break + } + } + } + # build up the output line using string concatenation + $0 = out rest + } + print $0 } This `awk' program deletes C-style comments (`/* ... */') from the -input. By replacing the `print $0' with other statements, you could -perform more complicated processing on the decommented input, such as -searching for matches of a regular expression. (This program has a -subtle problem--it does not work if one comment ends and another begins -on the same line.) +input. It uses a number of features we haven't covered yet, including +string concatenation (*note Concatenation::) and the `index()' and +`substr()' built-in functions (*note String Functions::). By replacing +the `print $0' with other statements, you could perform more +complicated processing on the decommented input, such as searching for +matches of a regular expression. (This program has a subtle +problem--it does not work if one comment ends and another begins on the +same line.) This form of the `getline' command sets `NF', `NR', `FNR', `RT', and the value of `$0'. @@ -5980,8 +5997,8 @@ File: gawk.info, Node: Input Exercises, Prev: Input Summary, Up: Reading File 2. *note Plain Getline::, presented a program to remove C-style comments (`/* ... */') from the input. That program does not work if one comment ends on one line and another one starts later on - the same line. Write a program that does handle multiple comments - on the line. + the same line. That can be fixed by making one simple change. + What is it?  @@ -7312,8 +7329,9 @@ File: gawk.info, Node: Regexp Constants, Prev: Nondecimal-numbers, Up: Consta A regexp constant is a regular expression description enclosed in slashes, such as `/^beginning and end$/'. Most regexps used in `awk' programs are constant, but the `~' and `!~' matching operators can also -match computed or dynamic regexps (which are just ordinary strings or -variables that contain a regexp). +match computed or dynamic regexps (which are typically just ordinary +strings or variables that contain a regexp, but could be a more complex +expression).  File: gawk.info, Node: Using Constant Regexps, Next: Variables, Prev: Constants, Up: Values @@ -8463,7 +8481,7 @@ following program is one way to print lines in between special bracketing lines: $1 == "START" { interested = ! interested; next } - interested == 1 { print } + interested { print } $1 == "END" { interested = ! interested; next } The variable `interested', as with all `awk' variables, starts out @@ -8473,6 +8491,14 @@ using `!'. The next rule prints lines as long as `interested' is true. When a line is seen whose first field is `END', `interested' is toggled back to false.(1) + Most commonly, the `!' operator is used in the conditions of `if' +and `while' statements, where it often makes more sense to phrase the +logic in the negative: + + if (! SOME CONDITION || SOME OTHER CONDITION) { + ... DO WHATEVER PROCESSING ... + } + NOTE: The `next' statement is discussed in *note Next Statement::. `next' tells `awk' to skip the rest of the rules, get the next record, and start processing the rules over again at the top. The @@ -9841,7 +9867,7 @@ reset to one, and processing starts over with the first rule in the program. If the `nextfile' statement causes the end of the input to be reached, then the code in any `END' rules is executed. An exception to this is when `nextfile' is invoked during execution of any statement in -an `END' rule; In this case, it causes the program to stop immediately. +an `END' rule; in this case, it causes the program to stop immediately. *Note BEGIN/END::. The `nextfile' statement is useful when there are many data files to @@ -9851,10 +9877,10 @@ would have to continue scanning the unwanted records. The `nextfile' statement accomplishes this much more efficiently. In `gawk', execution of `nextfile' causes additional things to -happen: any `ENDFILE' rules are executed except in the case as -mentioned below, `ARGIND' is incremented, and any `BEGINFILE' rules are -executed. (`ARGIND' hasn't been introduced yet. *Note Built-in -Variables::.) +happen: any `ENDFILE' rules are executed if `gawk' is not currently in +an `END' or `BEGINFILE' rule, `ARGIND' is incremented, and any +`BEGINFILE' rules are executed. (`ARGIND' hasn't been introduced yet. +*Note Built-in Variables::.) With `gawk', `nextfile' is useful inside a `BEGINFILE' rule to skip over a file that would otherwise cause `gawk' to exit with a fatal @@ -11280,7 +11306,7 @@ might look like this: > line 2 > line 3' | awk '{ l[lines] = $0; ++lines } > END { - > for (i = lines-1; i >= 0; --i) + > for (i = lines - 1; i >= 0; i--) > print l[i] > }' -| line 3 @@ -11301,7 +11327,7 @@ following version of the program works correctly: { l[lines++] = $0 } END { - for (i = lines - 1; i >= 0; --i) + for (i = lines - 1; i >= 0; i--) print l[i] } @@ -14378,8 +14404,9 @@ versions of `awk': ret = 0 for (i = 1; i <= n; i++) { c = substr(str, i, 1) - if ((k = index("01234567", c)) > 0) - k-- # adjust for 1-basing in awk + # index() returns 0 if c not in string, + # includes c == "0" + k = index("1234567", c) ret = ret * 8 + k } @@ -14391,6 +14418,8 @@ versions of `awk': for (i = 1; i <= n; i++) { c = substr(str, i, 1) c = tolower(c) + # index() returns 0 if c not in string, + # includes c == "0" k = index("123456789abcdef", c) ret = ret * 16 + k @@ -14851,7 +14880,7 @@ that might be as follows: This function reads from `file' one record at a time, building up the full contents of the file in the local variable `contents'. It -works, but is not necessarily efficient. +works, but is not necessarily efficient.(1) The following function, based on a suggestion by Denis Shirokov, reads the entire contents of the named file in one shot: @@ -14886,6 +14915,13 @@ string. Thus calling code may use something like: This tests the result to see if it is empty or not. An equivalent test would be `contents == ""'. + ---------- Footnotes ---------- + + (1) Execution time grows quadratically in the size of the input; for +each record, `awk' has to allocate a bigger internal buffer for +`contents', copy the old contents into it, and then append the contents +of the new record. +  File: gawk.info, Node: Data File Management, Next: Getopt Function, Prev: General Functions, Up: Library Functions @@ -15339,8 +15375,7 @@ not an option, and it ends option processing. Continuing on: i = index(options, thisopt) if (i == 0) { if (Opterr) - printf("%c -- invalid option\n", - thisopt) > "/dev/stderr" + printf("%c -- invalid option\n", thisopt) > "/dev/stderr" if (_opti >= length(argv[Optind])) { Optind++ _opti = 0 @@ -30938,10 +30973,9 @@ Index * ! (exclamation point), !~ operator <3>: Comparison Operators. (line 11) * ! (exclamation point), !~ operator <4>: Regexp Constants. (line 6) -* ! (exclamation point), !~ operator <5>: Computed Regexps. (line 6) -* ! (exclamation point), !~ operator <6>: Case-sensitivity. (line 26) +* ! (exclamation point), !~ operator <5>: Case-sensitivity. (line 26) +* ! (exclamation point), !~ operator <6>: Computed Regexps. (line 6) * ! (exclamation point), !~ operator: Regexp Usage. (line 19) -* " (double quote) in shell commands: Read Terminal. (line 25) * " (double quote), in regexp constants: Computed Regexps. (line 29) * " (double quote), in shell commands: Quoting. (line 54) * # (number sign), #! (executable scripts): Executable Scripts. @@ -31129,8 +31163,7 @@ Index * ? (question mark), regexp operator: Regexp Operators. (line 111) * [] (square brackets), regexp operator: Regexp Operators. (line 56) * \ (backslash): Comments. (line 50) -* \ (backslash) in shell commands: Read Terminal. (line 25) -* \ (backslash), \" escape sequence: Escape Sequences. (line 80) +* \ (backslash), \" escape sequence: Escape Sequences. (line 82) * \ (backslash), \' operator (gawk): GNU Regexp Operators. (line 56) * \ (backslash), \/ escape sequence: Escape Sequences. (line 73) @@ -31173,7 +31206,7 @@ Index * \ (backslash), in bracket expressions: Bracket Expressions. (line 17) * \ (backslash), in escape sequences: Escape Sequences. (line 6) * \ (backslash), in escape sequences, POSIX and: Escape Sequences. - (line 116) + (line 118) * \ (backslash), in regexp constants: Computed Regexps. (line 29) * \ (backslash), in shell commands: Quoting. (line 48) * \ (backslash), regexp operator: Regexp Operators. (line 18) @@ -31400,8 +31433,7 @@ Index * awkvars.out file: Options. (line 93) * b debugger command (alias for break): Breakpoint Control. (line 11) * backslash (\): Comments. (line 50) -* backslash (\) in shell commands: Read Terminal. (line 25) -* backslash (\), \" escape sequence: Escape Sequences. (line 80) +* backslash (\), \" escape sequence: Escape Sequences. (line 82) * backslash (\), \' operator (gawk): GNU Regexp Operators. (line 56) * backslash (\), \/ escape sequence: Escape Sequences. (line 73) @@ -31444,7 +31476,7 @@ Index * backslash (\), in bracket expressions: Bracket Expressions. (line 17) * backslash (\), in escape sequences: Escape Sequences. (line 6) * backslash (\), in escape sequences, POSIX and: Escape Sequences. - (line 116) + (line 118) * backslash (\), in regexp constants: Computed Regexps. (line 29) * backslash (\), in shell commands: Quoting. (line 48) * backslash (\), regexp operator: Regexp Operators. (line 18) @@ -31549,7 +31581,7 @@ Index (line 67) * Brian Kernighan's awk <12>: GNU Regexp Operators. (line 83) -* Brian Kernighan's awk <13>: Escape Sequences. (line 120) +* Brian Kernighan's awk <13>: Escape Sequences. (line 122) * Brian Kernighan's awk: When. (line 21) * Brian Kernighan's awk, extensions: BTL. (line 6) * Brian Kernighan's awk, source code: Other Versions. (line 13) @@ -31577,6 +31609,7 @@ Index * built-in variables, conveying information: Auto-set. (line 6) * built-in variables, user-modifiable: User-modified. (line 6) * Busybox Awk: Other Versions. (line 88) +* c.e., See common extensions: Conventions. (line 51) * call by reference: Pass By Value/Reference. (line 47) * call by value: Pass By Value/Reference. @@ -31775,9 +31808,9 @@ Index * dark corner, command-line arguments: Assignment Options. (line 43) * dark corner, continue statement: Continue Statement. (line 44) * dark corner, CONVFMT variable: Strings And Numbers. (line 40) -* dark corner, escape sequences: Other Arguments. (line 31) +* dark corner, escape sequences: Other Arguments. (line 35) * dark corner, escape sequences, for metacharacters: Escape Sequences. - (line 138) + (line 140) * dark corner, exit statement: Exit Statement. (line 30) * dark corner, field separators: Field Splitting Summary. (line 46) @@ -32042,7 +32075,6 @@ Index * dollar sign ($), incrementing fields and arrays: Increment Ops. (line 30) * dollar sign ($), regexp operator: Regexp Operators. (line 35) -* double quote (") in shell commands: Read Terminal. (line 25) * double quote ("), in regexp constants: Computed Regexps. (line 29) * double quote ("), in shell commands: Quoting. (line 54) * down debugger command: Execution Stack. (line 21) @@ -32142,8 +32174,8 @@ Index * exclamation point (!), !~ operator <3>: Comparison Operators. (line 11) * exclamation point (!), !~ operator <4>: Regexp Constants. (line 6) -* exclamation point (!), !~ operator <5>: Computed Regexps. (line 6) -* exclamation point (!), !~ operator <6>: Case-sensitivity. (line 26) +* exclamation point (!), !~ operator <5>: Case-sensitivity. (line 26) +* exclamation point (!), !~ operator <6>: Computed Regexps. (line 6) * exclamation point (!), !~ operator: Regexp Usage. (line 19) * exit statement: Exit Statement. (line 6) * exit status, of gawk: Exit Status. (line 6) @@ -32151,7 +32183,7 @@ Index * exit the debugger: Miscellaneous Debugger Commands. (line 99) * exp: Numeric Functions. (line 18) -* expand utility: Very Simple. (line 69) +* expand utility: Very Simple. (line 72) * Expat XML parser library: gawkextlib. (line 35) * exponent: Numeric Functions. (line 18) * expressions: Expressions. (line 6) @@ -32285,7 +32317,7 @@ Index (line 47) * files, message object, specifying directory of: Explaining gettext. (line 54) -* files, multiple passes over: Other Arguments. (line 49) +* files, multiple passes over: Other Arguments. (line 53) * files, multiple, duplicating output into: Tee Program. (line 6) * files, output, See output files: Close Files And Pipes. (line 6) @@ -32446,7 +32478,7 @@ Index * gawk, ERRNO variable in <4>: Close Files And Pipes. (line 139) * gawk, ERRNO variable in: Getline. (line 19) -* gawk, escape sequences: Escape Sequences. (line 128) +* gawk, escape sequences: Escape Sequences. (line 130) * gawk, extensions, disabling: Options. (line 254) * gawk, features, adding: Adding Code. (line 6) * gawk, features, advanced: Advanced Features. (line 6) @@ -32670,7 +32702,7 @@ Index * input files, examples: Sample Data Files. (line 6) * input files, reading: Reading Files. (line 6) * input files, running awk without: Read Terminal. (line 6) -* input files, variable assignments and: Other Arguments. (line 19) +* input files, variable assignments and: Other Arguments. (line 23) * input pipeline: Getline/Pipe. (line 9) * input record, length of: String Functions. (line 174) * input redirection: Getline/File. (line 6) @@ -32879,7 +32911,7 @@ Index * mawk utility <2>: Nextfile Statement. (line 47) * mawk utility <3>: Concatenation. (line 36) * mawk utility <4>: Getline/Pipe. (line 62) -* mawk utility: Escape Sequences. (line 128) +* mawk utility: Escape Sequences. (line 130) * maximum precision supported by MPFR library: Auto-set. (line 213) * McIlroy, Doug: Glossary. (line 149) * McPhee, Patrick: Contributors. (line 100) @@ -32892,7 +32924,7 @@ Index (line 54) * messages from extensions: Printing Messages. (line 6) * metacharacters in regular expressions: Regexp Operators. (line 6) -* metacharacters, escape sequences for: Escape Sequences. (line 134) +* metacharacters, escape sequences for: Escape Sequences. (line 136) * minimum precision supported by MPFR library: Auto-set. (line 216) * mktime: Time Functions. (line 25) * modifiers, in format specifiers: Format Modifiers. (line 6) @@ -32930,7 +32962,7 @@ Index (line 43) * next file statement: Feature History. (line 169) * next statement <1>: Next Statement. (line 6) -* next statement: Boolean Ops. (line 85) +* next statement: Boolean Ops. (line 93) * next statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 36) * next statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE. (line 49) @@ -33111,14 +33143,14 @@ Index * plus sign (+), += operator: Assignment Ops. (line 82) * plus sign (+), regexp operator: Regexp Operators. (line 105) * pointers to functions: Indirect Calls. (line 6) -* portability: Escape Sequences. (line 98) +* portability: Escape Sequences. (line 100) * portability, #! (executable scripts): Executable Scripts. (line 33) * portability, ** operator and: Arithmetic Ops. (line 81) * portability, **= operator and: Assignment Ops. (line 143) * portability, ARGV variable: Executable Scripts. (line 59) * portability, backslash continuation and: Statements/Lines. (line 30) * portability, backslash in escape sequences: Escape Sequences. - (line 116) + (line 118) * portability, close() function and: Close Files And Pipes. (line 81) * portability, data files as single record: gawk split records. @@ -33157,7 +33189,7 @@ Index * POSIX awk, < operator and: Getline/File. (line 26) * POSIX awk, arithmetic operators and: Arithmetic Ops. (line 30) * POSIX awk, backslashes in string constants: Escape Sequences. - (line 116) + (line 118) * POSIX awk, BEGIN/END patterns: I/O And BEGIN/END. (line 16) * POSIX awk, bracket expressions and: Bracket Expressions. (line 26) * POSIX awk, bracket expressions and, character classes: Bracket Expressions. @@ -33501,7 +33533,6 @@ Index * set watchpoint: Viewing And Changing Data. (line 67) * shadowing of variable values: Definition Syntax. (line 70) -* shell quoting, double quote: Read Terminal. (line 25) * shell quoting, rules for: Quoting. (line 6) * shells, piping commands into: Redirection. (line 142) * shells, quoting: Using Shell Variables. @@ -33538,14 +33569,14 @@ Index * sidebar, A Constant's Base Does Not Affect Its Value: Nondecimal-numbers. (line 64) * sidebar, Backslash Before Regular Characters: Escape Sequences. - (line 114) + (line 116) * sidebar, Changing FS Does Not Affect the Fields: Field Splitting Summary. (line 38) * sidebar, Changing NR and FNR: Auto-set. (line 299) * sidebar, Controlling Output Buffering with system(): I/O Functions. (line 138) * sidebar, Escape Sequences for Metacharacters: Escape Sequences. - (line 132) + (line 134) * sidebar, FS and IGNORECASE: Field Splitting Summary. (line 64) * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions. @@ -33745,8 +33776,8 @@ Index * tilde (~), ~ operator <3>: Comparison Operators. (line 11) * tilde (~), ~ operator <4>: Regexp Constants. (line 6) -* tilde (~), ~ operator <5>: Computed Regexps. (line 6) -* tilde (~), ~ operator <6>: Case-sensitivity. (line 26) +* tilde (~), ~ operator <5>: Case-sensitivity. (line 26) +* tilde (~), ~ operator <6>: Computed Regexps. (line 6) * tilde (~), ~ operator: Regexp Usage. (line 19) * time functions: Time Functions. (line 6) * time, alarm clock example program: Alarm Program. (line 11) @@ -33773,7 +33804,7 @@ Index (line 37) * troubleshooting, awk uses FS not IFS: Field Separators. (line 30) * troubleshooting, backslash before nonspecial character: Escape Sequences. - (line 116) + (line 118) * troubleshooting, division: Arithmetic Ops. (line 44) * troubleshooting, fatal errors, field widths, specifying: Constant Size. (line 23) @@ -33829,7 +33860,7 @@ Index * uniq.awk program: Uniq Program. (line 65) * Unix: Glossary. (line 611) * Unix awk, backslashes in escape sequences: Escape Sequences. - (line 128) + (line 130) * Unix awk, close() function and: Close Files And Pipes. (line 131) * Unix awk, password files, field separators and: Command Line Field Separator. @@ -33852,7 +33883,7 @@ Index * USR1 signal, for dynamic profiling: Profiling. (line 188) * values, numeric: Basic Data Typing. (line 13) * values, string: Basic Data Typing. (line 13) -* variable assignments and input files: Other Arguments. (line 19) +* variable assignments and input files: Other Arguments. (line 23) * variable typing: Typing and Comparison. (line 9) * variables <1>: Basic Data Typing. (line 6) @@ -33966,8 +33997,8 @@ Index * ~ (tilde), ~ operator <3>: Comparison Operators. (line 11) * ~ (tilde), ~ operator <4>: Regexp Constants. (line 6) -* ~ (tilde), ~ operator <5>: Computed Regexps. (line 6) -* ~ (tilde), ~ operator <6>: Case-sensitivity. (line 26) +* ~ (tilde), ~ operator <5>: Case-sensitivity. (line 26) +* ~ (tilde), ~ operator <6>: Computed Regexps. (line 6) * ~ (tilde), ~ operator: Regexp Usage. (line 19) @@ -33993,533 +34024,533 @@ Node: Getting Started70581 Node: Running gawk73015 Node: One-shot74205 Node: Read Terminal75430 -Ref: Read Terminal-Footnote-177393 -Node: Long77564 -Node: Executable Scripts78958 -Ref: Executable Scripts-Footnote-181759 -Node: Comments81861 -Node: Quoting84334 -Node: DOS Quoting89647 -Node: Sample Data Files90322 -Node: Very Simple92929 -Node: Two Rules97688 -Node: More Complex99582 -Ref: More Complex-Footnote-1102496 -Node: Statements/Lines102581 -Ref: Statements/Lines-Footnote-1107037 -Node: Other Features107302 -Node: When108230 -Ref: When-Footnote-1109986 -Node: Intro Summary110051 -Node: Invoking Gawk110934 -Node: Command Line112449 -Node: Options113240 -Ref: Options-Footnote-1129016 -Node: Other Arguments129041 -Node: Naming Standard Input131703 -Node: Environment Variables132796 -Node: AWKPATH Variable133354 -Ref: AWKPATH Variable-Footnote-1136220 -Ref: AWKPATH Variable-Footnote-2136265 -Node: AWKLIBPATH Variable136525 -Node: Other Environment Variables137284 -Node: Exit Status140941 -Node: Include Files141616 -Node: Loading Shared Libraries145194 -Node: Obsolete146578 -Node: Undocumented147275 -Node: Invoking Summary147542 -Node: Regexp149142 -Node: Regexp Usage150601 -Node: Escape Sequences152634 -Node: Regexp Operators158451 -Ref: Regexp Operators-Footnote-1165882 -Ref: Regexp Operators-Footnote-2166029 -Node: Bracket Expressions166127 -Ref: table-char-classes168149 -Node: GNU Regexp Operators171089 -Node: Case-sensitivity174798 -Ref: Case-sensitivity-Footnote-1177690 -Ref: Case-sensitivity-Footnote-2177925 -Node: Leftmost Longest178033 -Node: Computed Regexps179234 -Node: Regexp Summary182606 -Node: Reading Files184075 -Node: Records186167 -Node: awk split records186889 -Node: gawk split records191747 -Ref: gawk split records-Footnote-1196268 -Node: Fields196305 -Ref: Fields-Footnote-1199269 -Node: Nonconstant Fields199355 -Ref: Nonconstant Fields-Footnote-1201585 -Node: Changing Fields201787 -Node: Field Separators207741 -Node: Default Field Splitting210443 -Node: Regexp Field Splitting211560 -Node: Single Character Fields214887 -Node: Command Line Field Separator215946 -Node: Full Line Fields219372 -Ref: Full Line Fields-Footnote-1219880 -Node: Field Splitting Summary219926 -Ref: Field Splitting Summary-Footnote-1223058 -Node: Constant Size223159 -Node: Splitting By Content227765 -Ref: Splitting By Content-Footnote-1231838 -Node: Multiple Line231878 -Ref: Multiple Line-Footnote-1237734 -Node: Getline237913 -Node: Plain Getline240124 -Node: Getline/Variable242219 -Node: Getline/File243366 -Node: Getline/Variable/File244750 -Ref: Getline/Variable/File-Footnote-1246349 -Node: Getline/Pipe246436 -Node: Getline/Variable/Pipe249122 -Node: Getline/Coprocess250229 -Node: Getline/Variable/Coprocess251481 -Node: Getline Notes252218 -Node: Getline Summary255022 -Ref: table-getline-variants255430 -Node: Read Timeout256342 -Ref: Read Timeout-Footnote-1260169 -Node: Command-line directories260227 -Node: Input Summary261131 -Node: Input Exercises264268 -Node: Printing265001 -Node: Print266723 -Node: Print Examples268216 -Node: Output Separators270995 -Node: OFMT273011 -Node: Printf274369 -Node: Basic Printf275275 -Node: Control Letters276814 -Node: Format Modifiers280805 -Node: Printf Examples286832 -Node: Redirection289296 -Node: Special Files296268 -Node: Special FD296801 -Ref: Special FD-Footnote-1300398 -Node: Special Network300472 -Node: Special Caveats301322 -Node: Close Files And Pipes302118 -Ref: Close Files And Pipes-Footnote-1309279 -Ref: Close Files And Pipes-Footnote-2309427 -Node: Output Summary309577 -Node: Output Exercises310574 -Node: Expressions311254 -Node: Values312439 -Node: Constants313115 -Node: Scalar Constants313795 -Ref: Scalar Constants-Footnote-1314654 -Node: Nondecimal-numbers314904 -Node: Regexp Constants317904 -Node: Using Constant Regexps318379 -Node: Variables321451 -Node: Using Variables322106 -Node: Assignment Options323830 -Node: Conversion325705 -Node: Strings And Numbers326229 -Ref: Strings And Numbers-Footnote-1329291 -Node: Locale influences conversions329400 -Ref: table-locale-affects332117 -Node: All Operators332705 -Node: Arithmetic Ops333335 -Node: Concatenation335840 -Ref: Concatenation-Footnote-1338659 -Node: Assignment Ops338765 -Ref: table-assign-ops343748 -Node: Increment Ops345051 -Node: Truth Values and Conditions348489 -Node: Truth Values349572 -Node: Typing and Comparison350621 -Node: Variable Typing351414 -Node: Comparison Operators355066 -Ref: table-relational-ops355476 -Node: POSIX String Comparison359026 -Ref: POSIX String Comparison-Footnote-1360110 -Node: Boolean Ops360248 -Ref: Boolean Ops-Footnote-1364323 -Node: Conditional Exp364414 -Node: Function Calls366141 -Node: Precedence370021 -Node: Locales373690 -Node: Expressions Summary375321 -Node: Patterns and Actions377862 -Node: Pattern Overview378978 -Node: Regexp Patterns380655 -Node: Expression Patterns381198 -Node: Ranges384978 -Node: BEGIN/END388084 -Node: Using BEGIN/END388846 -Ref: Using BEGIN/END-Footnote-1391582 -Node: I/O And BEGIN/END391688 -Node: BEGINFILE/ENDFILE393959 -Node: Empty396890 -Node: Using Shell Variables397207 -Node: Action Overview399490 -Node: Statements401817 -Node: If Statement403665 -Node: While Statement405163 -Node: Do Statement407207 -Node: For Statement408363 -Node: Switch Statement411515 -Node: Break Statement413903 -Node: Continue Statement415944 -Node: Next Statement417769 -Node: Nextfile Statement420159 -Node: Exit Statement422795 -Node: Built-in Variables425199 -Node: User-modified426326 -Ref: User-modified-Footnote-1434015 -Node: Auto-set434077 -Ref: Auto-set-Footnote-1446659 -Ref: Auto-set-Footnote-2446864 -Node: ARGC and ARGV446920 -Node: Pattern Action Summary450824 -Node: Arrays453047 -Node: Array Basics454596 -Node: Array Intro455422 -Ref: figure-array-elements457395 -Ref: Array Intro-Footnote-1459919 -Node: Reference to Elements460047 -Node: Assigning Elements462497 -Node: Array Example462988 -Node: Scanning an Array464720 -Node: Controlling Scanning467721 -Ref: Controlling Scanning-Footnote-1472894 -Node: Delete473210 -Ref: Delete-Footnote-1475961 -Node: Numeric Array Subscripts476018 -Node: Uninitialized Subscripts478201 -Node: Multidimensional479826 -Node: Multiscanning482939 -Node: Arrays of Arrays484528 -Node: Arrays Summary489191 -Node: Functions491296 -Node: Built-in492169 -Node: Calling Built-in493247 -Node: Numeric Functions495235 -Ref: Numeric Functions-Footnote-1499269 -Ref: Numeric Functions-Footnote-2499626 -Ref: Numeric Functions-Footnote-3499674 -Node: String Functions499943 -Ref: String Functions-Footnote-1522940 -Ref: String Functions-Footnote-2523069 -Ref: String Functions-Footnote-3523317 -Node: Gory Details523404 -Ref: table-sub-escapes525177 -Ref: table-sub-proposed526697 -Ref: table-posix-sub528061 -Ref: table-gensub-escapes529601 -Ref: Gory Details-Footnote-1530777 -Node: I/O Functions530928 -Ref: I/O Functions-Footnote-1538038 -Node: Time Functions538185 -Ref: Time Functions-Footnote-1548649 -Ref: Time Functions-Footnote-2548717 -Ref: Time Functions-Footnote-3548875 -Ref: Time Functions-Footnote-4548986 -Ref: Time Functions-Footnote-5549098 -Ref: Time Functions-Footnote-6549325 -Node: Bitwise Functions549591 -Ref: table-bitwise-ops550153 -Ref: Bitwise Functions-Footnote-1554398 -Node: Type Functions554582 -Node: I18N Functions555724 -Node: User-defined557369 -Node: Definition Syntax558173 -Ref: Definition Syntax-Footnote-1563486 -Node: Function Example563555 -Ref: Function Example-Footnote-1566195 -Node: Function Caveats566217 -Node: Calling A Function566735 -Node: Variable Scope567690 -Node: Pass By Value/Reference570678 -Node: Return Statement574188 -Node: Dynamic Typing577172 -Node: Indirect Calls578101 -Node: Functions Summary587814 -Node: Library Functions590353 -Ref: Library Functions-Footnote-1593971 -Ref: Library Functions-Footnote-2594114 -Node: Library Names594285 -Ref: Library Names-Footnote-1597758 -Ref: Library Names-Footnote-2597978 -Node: General Functions598064 -Node: Strtonum Function599092 -Node: Assert Function601872 -Node: Round Function605198 -Node: Cliff Random Function606739 -Node: Ordinal Functions607755 -Ref: Ordinal Functions-Footnote-1610820 -Ref: Ordinal Functions-Footnote-2611072 -Node: Join Function611283 -Ref: Join Function-Footnote-1613054 -Node: Getlocaltime Function613254 -Node: Readfile Function616990 -Node: Data File Management618829 -Node: Filetrans Function619461 -Node: Rewind Function623530 -Node: File Checking625088 -Ref: File Checking-Footnote-1626220 -Node: Empty Files626421 -Node: Ignoring Assigns628400 -Node: Getopt Function629954 -Ref: Getopt Function-Footnote-1641257 -Node: Passwd Functions641460 -Ref: Passwd Functions-Footnote-1650439 -Node: Group Functions650527 -Ref: Group Functions-Footnote-1658458 -Node: Walking Arrays658671 -Node: Library Functions Summary660274 -Node: Library Exercises661662 -Node: Sample Programs662942 -Node: Running Examples663712 -Node: Clones664440 -Node: Cut Program665664 -Node: Egrep Program675522 -Ref: Egrep Program-Footnote-1683109 -Node: Id Program683219 -Node: Split Program686873 -Ref: Split Program-Footnote-1690411 -Node: Tee Program690539 -Node: Uniq Program693326 -Node: Wc Program700747 -Ref: Wc Program-Footnote-1705012 -Node: Miscellaneous Programs705104 -Node: Dupword Program706317 -Node: Alarm Program708348 -Node: Translate Program713152 -Ref: Translate Program-Footnote-1717543 -Ref: Translate Program-Footnote-2717813 -Node: Labels Program717947 -Ref: Labels Program-Footnote-1721308 -Node: Word Sorting721392 -Node: History Sorting725435 -Node: Extract Program727271 -Node: Simple Sed734807 -Node: Igawk Program737869 -Ref: Igawk Program-Footnote-1752173 -Ref: Igawk Program-Footnote-2752374 -Node: Anagram Program752512 -Node: Signature Program755580 -Node: Programs Summary756827 -Node: Programs Exercises758042 -Node: Advanced Features761693 -Node: Nondecimal Data763641 -Node: Array Sorting765218 -Node: Controlling Array Traversal765915 -Node: Array Sorting Functions774195 -Ref: Array Sorting Functions-Footnote-1778102 -Node: Two-way I/O778296 -Ref: Two-way I/O-Footnote-1783240 -Ref: Two-way I/O-Footnote-2783419 -Node: TCP/IP Networking783501 -Node: Profiling786346 -Node: Advanced Features Summary793888 -Node: Internationalization795752 -Node: I18N and L10N797232 -Node: Explaining gettext797918 -Ref: Explaining gettext-Footnote-1802944 -Ref: Explaining gettext-Footnote-2803128 -Node: Programmer i18n803293 -Ref: Programmer i18n-Footnote-1808087 -Node: Translator i18n808136 -Node: String Extraction808930 -Ref: String Extraction-Footnote-1810063 -Node: Printf Ordering810149 -Ref: Printf Ordering-Footnote-1812931 -Node: I18N Portability812995 -Ref: I18N Portability-Footnote-1815444 -Node: I18N Example815507 -Ref: I18N Example-Footnote-1818213 -Node: Gawk I18N818285 -Node: I18N Summary818923 -Node: Debugger820262 -Node: Debugging821284 -Node: Debugging Concepts821725 -Node: Debugging Terms823581 -Node: Awk Debugging826178 -Node: Sample Debugging Session827070 -Node: Debugger Invocation827590 -Node: Finding The Bug828923 -Node: List of Debugger Commands835405 -Node: Breakpoint Control836737 -Node: Debugger Execution Control840401 -Node: Viewing And Changing Data843761 -Node: Execution Stack847119 -Node: Debugger Info848632 -Node: Miscellaneous Debugger Commands852626 -Node: Readline Support857810 -Node: Limitations858702 -Node: Debugging Summary860976 -Node: Arbitrary Precision Arithmetic862144 -Node: Computer Arithmetic863631 -Ref: Computer Arithmetic-Footnote-1868018 -Node: Math Definitions868075 -Ref: table-ieee-formats871364 -Ref: Math Definitions-Footnote-1871904 -Node: MPFR features872007 -Node: FP Math Caution873624 -Ref: FP Math Caution-Footnote-1874674 -Node: Inexactness of computations875043 -Node: Inexact representation875991 -Node: Comparing FP Values877346 -Node: Errors accumulate878310 -Node: Getting Accuracy879743 -Node: Try To Round882402 -Node: Setting precision883301 -Ref: table-predefined-precision-strings883983 -Node: Setting the rounding mode885776 -Ref: table-gawk-rounding-modes886140 -Ref: Setting the rounding mode-Footnote-1889594 -Node: Arbitrary Precision Integers889773 -Ref: Arbitrary Precision Integers-Footnote-1892754 -Node: POSIX Floating Point Problems892903 -Ref: POSIX Floating Point Problems-Footnote-1896779 -Node: Floating point summary896817 -Node: Dynamic Extensions899021 -Node: Extension Intro900573 -Node: Plugin License901838 -Node: Extension Mechanism Outline902523 -Ref: figure-load-extension902947 -Ref: figure-load-new-function904432 -Ref: figure-call-new-function905434 -Node: Extension API Description907418 -Node: Extension API Functions Introduction908868 -Node: General Data Types913735 -Ref: General Data Types-Footnote-1919428 -Node: Requesting Values919727 -Ref: table-value-types-returned920464 -Node: Memory Allocation Functions921422 -Ref: Memory Allocation Functions-Footnote-1924169 -Node: Constructor Functions924265 -Node: Registration Functions926023 -Node: Extension Functions926708 -Node: Exit Callback Functions929010 -Node: Extension Version String930258 -Node: Input Parsers930908 -Node: Output Wrappers940722 -Node: Two-way processors945238 -Node: Printing Messages947442 -Ref: Printing Messages-Footnote-1948519 -Node: Updating `ERRNO'948671 -Node: Accessing Parameters949410 -Node: Symbol Table Access950640 -Node: Symbol table by name951154 -Node: Symbol table by cookie953130 -Ref: Symbol table by cookie-Footnote-1957263 -Node: Cached values957326 -Ref: Cached values-Footnote-1960830 -Node: Array Manipulation960921 -Ref: Array Manipulation-Footnote-1962019 -Node: Array Data Types962058 -Ref: Array Data Types-Footnote-1964761 -Node: Array Functions964853 -Node: Flattening Arrays968727 -Node: Creating Arrays975579 -Node: Extension API Variables980310 -Node: Extension Versioning980946 -Node: Extension API Informational Variables982847 -Node: Extension API Boilerplate983933 -Node: Finding Extensions987737 -Node: Extension Example988297 -Node: Internal File Description989027 -Node: Internal File Ops993118 -Ref: Internal File Ops-Footnote-11004550 -Node: Using Internal File Ops1004690 -Ref: Using Internal File Ops-Footnote-11007037 -Node: Extension Samples1007305 -Node: Extension Sample File Functions1008829 -Node: Extension Sample Fnmatch1016397 -Node: Extension Sample Fork1017879 -Node: Extension Sample Inplace1019092 -Node: Extension Sample Ord1020767 -Node: Extension Sample Readdir1021603 -Ref: table-readdir-file-types1022459 -Node: Extension Sample Revout1023258 -Node: Extension Sample Rev2way1023849 -Node: Extension Sample Read write array1024590 -Node: Extension Sample Readfile1026469 -Node: Extension Sample API Tests1027569 -Node: Extension Sample Time1028094 -Node: gawkextlib1029409 -Node: Extension summary1032222 -Node: Extension Exercises1035915 -Node: Language History1036637 -Node: V7/SVR3.11038280 -Node: SVR41040600 -Node: POSIX1042042 -Node: BTL1043428 -Node: POSIX/GNU1044162 -Node: Feature History1049878 -Node: Common Extensions1062969 -Node: Ranges and Locales1064281 -Ref: Ranges and Locales-Footnote-11068898 -Ref: Ranges and Locales-Footnote-21068925 -Ref: Ranges and Locales-Footnote-31069159 -Node: Contributors1069380 -Node: History summary1074805 -Node: Installation1076174 -Node: Gawk Distribution1077125 -Node: Getting1077609 -Node: Extracting1078433 -Node: Distribution contents1080075 -Node: Unix Installation1085792 -Node: Quick Installation1086409 -Node: Additional Configuration Options1088851 -Node: Configuration Philosophy1090589 -Node: Non-Unix Installation1092940 -Node: PC Installation1093398 -Node: PC Binary Installation1094709 -Node: PC Compiling1096557 -Ref: PC Compiling-Footnote-11099556 -Node: PC Testing1099661 -Node: PC Using1100837 -Node: Cygwin1104989 -Node: MSYS1105798 -Node: VMS Installation1106312 -Node: VMS Compilation1107108 -Ref: VMS Compilation-Footnote-11108330 -Node: VMS Dynamic Extensions1108388 -Node: VMS Installation Details1109761 -Node: VMS Running1112013 -Node: VMS GNV1114847 -Node: VMS Old Gawk1115570 -Node: Bugs1116040 -Node: Other Versions1120044 -Node: Installation summary1126271 -Node: Notes1127327 -Node: Compatibility Mode1128192 -Node: Additions1128974 -Node: Accessing The Source1129899 -Node: Adding Code1131335 -Node: New Ports1137513 -Node: Derived Files1141994 -Ref: Derived Files-Footnote-11147075 -Ref: Derived Files-Footnote-21147109 -Ref: Derived Files-Footnote-31147705 -Node: Future Extensions1147819 -Node: Implementation Limitations1148425 -Node: Extension Design1149673 -Node: Old Extension Problems1150827 -Ref: Old Extension Problems-Footnote-11152344 -Node: Extension New Mechanism Goals1152401 -Ref: Extension New Mechanism Goals-Footnote-11155761 -Node: Extension Other Design Decisions1155950 -Node: Extension Future Growth1158056 -Node: Old Extension Mechanism1158892 -Node: Notes summary1160654 -Node: Basic Concepts1161840 -Node: Basic High Level1162521 -Ref: figure-general-flow1162793 -Ref: figure-process-flow1163392 -Ref: Basic High Level-Footnote-11166621 -Node: Basic Data Typing1166806 -Node: Glossary1170134 -Node: Copying1195286 -Node: GNU Free Documentation License1232842 -Node: Index1257978 +Node: Long77455 +Node: Executable Scripts78849 +Ref: Executable Scripts-Footnote-181650 +Node: Comments81752 +Node: Quoting84225 +Node: DOS Quoting89538 +Node: Sample Data Files90213 +Node: Very Simple92820 +Node: Two Rules97705 +Node: More Complex99599 +Ref: More Complex-Footnote-1102513 +Node: Statements/Lines102598 +Ref: Statements/Lines-Footnote-1107054 +Node: Other Features107319 +Node: When108247 +Ref: When-Footnote-1110003 +Node: Intro Summary110068 +Node: Invoking Gawk110951 +Node: Command Line112466 +Node: Options113257 +Ref: Options-Footnote-1129033 +Node: Other Arguments129058 +Node: Naming Standard Input131886 +Node: Environment Variables132979 +Node: AWKPATH Variable133537 +Ref: AWKPATH Variable-Footnote-1136403 +Ref: AWKPATH Variable-Footnote-2136448 +Node: AWKLIBPATH Variable136708 +Node: Other Environment Variables137467 +Node: Exit Status141124 +Node: Include Files141799 +Node: Loading Shared Libraries145377 +Node: Obsolete146761 +Node: Undocumented147458 +Node: Invoking Summary147725 +Node: Regexp149325 +Node: Regexp Usage150784 +Node: Escape Sequences152817 +Node: Regexp Operators158805 +Ref: Regexp Operators-Footnote-1166236 +Ref: Regexp Operators-Footnote-2166383 +Node: Bracket Expressions166481 +Ref: table-char-classes168499 +Node: Leftmost Longest171439 +Node: Computed Regexps172643 +Node: GNU Regexp Operators176021 +Node: Case-sensitivity179727 +Ref: Case-sensitivity-Footnote-1182617 +Ref: Case-sensitivity-Footnote-2182852 +Node: Regexp Summary182960 +Node: Reading Files184429 +Node: Records186521 +Node: awk split records187243 +Node: gawk split records192101 +Ref: gawk split records-Footnote-1196622 +Node: Fields196659 +Ref: Fields-Footnote-1199623 +Node: Nonconstant Fields199709 +Ref: Nonconstant Fields-Footnote-1201939 +Node: Changing Fields202141 +Node: Field Separators208095 +Node: Default Field Splitting210797 +Node: Regexp Field Splitting211914 +Node: Single Character Fields215241 +Node: Command Line Field Separator216300 +Node: Full Line Fields219726 +Ref: Full Line Fields-Footnote-1220234 +Node: Field Splitting Summary220280 +Ref: Field Splitting Summary-Footnote-1223412 +Node: Constant Size223513 +Node: Splitting By Content228119 +Ref: Splitting By Content-Footnote-1232192 +Node: Multiple Line232232 +Ref: Multiple Line-Footnote-1238088 +Node: Getline238267 +Node: Plain Getline240478 +Node: Getline/Variable243184 +Node: Getline/File244331 +Node: Getline/Variable/File245715 +Ref: Getline/Variable/File-Footnote-1247314 +Node: Getline/Pipe247401 +Node: Getline/Variable/Pipe250087 +Node: Getline/Coprocess251194 +Node: Getline/Variable/Coprocess252446 +Node: Getline Notes253183 +Node: Getline Summary255987 +Ref: table-getline-variants256395 +Node: Read Timeout257307 +Ref: Read Timeout-Footnote-1261134 +Node: Command-line directories261192 +Node: Input Summary262096 +Node: Input Exercises265233 +Node: Printing265961 +Node: Print267683 +Node: Print Examples269176 +Node: Output Separators271955 +Node: OFMT273971 +Node: Printf275329 +Node: Basic Printf276235 +Node: Control Letters277774 +Node: Format Modifiers281765 +Node: Printf Examples287792 +Node: Redirection290256 +Node: Special Files297228 +Node: Special FD297761 +Ref: Special FD-Footnote-1301358 +Node: Special Network301432 +Node: Special Caveats302282 +Node: Close Files And Pipes303078 +Ref: Close Files And Pipes-Footnote-1310239 +Ref: Close Files And Pipes-Footnote-2310387 +Node: Output Summary310537 +Node: Output Exercises311534 +Node: Expressions312214 +Node: Values313399 +Node: Constants314075 +Node: Scalar Constants314755 +Ref: Scalar Constants-Footnote-1315614 +Node: Nondecimal-numbers315864 +Node: Regexp Constants318864 +Node: Using Constant Regexps319389 +Node: Variables322461 +Node: Using Variables323116 +Node: Assignment Options324840 +Node: Conversion326715 +Node: Strings And Numbers327239 +Ref: Strings And Numbers-Footnote-1330301 +Node: Locale influences conversions330410 +Ref: table-locale-affects333127 +Node: All Operators333715 +Node: Arithmetic Ops334345 +Node: Concatenation336850 +Ref: Concatenation-Footnote-1339669 +Node: Assignment Ops339775 +Ref: table-assign-ops344758 +Node: Increment Ops346061 +Node: Truth Values and Conditions349499 +Node: Truth Values350582 +Node: Typing and Comparison351631 +Node: Variable Typing352424 +Node: Comparison Operators356076 +Ref: table-relational-ops356486 +Node: POSIX String Comparison360036 +Ref: POSIX String Comparison-Footnote-1361120 +Node: Boolean Ops361258 +Ref: Boolean Ops-Footnote-1365597 +Node: Conditional Exp365688 +Node: Function Calls367415 +Node: Precedence371295 +Node: Locales374964 +Node: Expressions Summary376595 +Node: Patterns and Actions379136 +Node: Pattern Overview380252 +Node: Regexp Patterns381929 +Node: Expression Patterns382472 +Node: Ranges386252 +Node: BEGIN/END389358 +Node: Using BEGIN/END390120 +Ref: Using BEGIN/END-Footnote-1392856 +Node: I/O And BEGIN/END392962 +Node: BEGINFILE/ENDFILE395233 +Node: Empty398164 +Node: Using Shell Variables398481 +Node: Action Overview400764 +Node: Statements403091 +Node: If Statement404939 +Node: While Statement406437 +Node: Do Statement408481 +Node: For Statement409637 +Node: Switch Statement412789 +Node: Break Statement415177 +Node: Continue Statement417218 +Node: Next Statement419043 +Node: Nextfile Statement421433 +Node: Exit Statement424090 +Node: Built-in Variables426494 +Node: User-modified427621 +Ref: User-modified-Footnote-1435310 +Node: Auto-set435372 +Ref: Auto-set-Footnote-1447954 +Ref: Auto-set-Footnote-2448159 +Node: ARGC and ARGV448215 +Node: Pattern Action Summary452119 +Node: Arrays454342 +Node: Array Basics455891 +Node: Array Intro456717 +Ref: figure-array-elements458690 +Ref: Array Intro-Footnote-1461214 +Node: Reference to Elements461342 +Node: Assigning Elements463792 +Node: Array Example464283 +Node: Scanning an Array466015 +Node: Controlling Scanning469016 +Ref: Controlling Scanning-Footnote-1474189 +Node: Delete474505 +Ref: Delete-Footnote-1477256 +Node: Numeric Array Subscripts477313 +Node: Uninitialized Subscripts479496 +Node: Multidimensional481123 +Node: Multiscanning484236 +Node: Arrays of Arrays485825 +Node: Arrays Summary490488 +Node: Functions492593 +Node: Built-in493466 +Node: Calling Built-in494544 +Node: Numeric Functions496532 +Ref: Numeric Functions-Footnote-1500566 +Ref: Numeric Functions-Footnote-2500923 +Ref: Numeric Functions-Footnote-3500971 +Node: String Functions501240 +Ref: String Functions-Footnote-1524237 +Ref: String Functions-Footnote-2524366 +Ref: String Functions-Footnote-3524614 +Node: Gory Details524701 +Ref: table-sub-escapes526474 +Ref: table-sub-proposed527994 +Ref: table-posix-sub529358 +Ref: table-gensub-escapes530898 +Ref: Gory Details-Footnote-1532074 +Node: I/O Functions532225 +Ref: I/O Functions-Footnote-1539335 +Node: Time Functions539482 +Ref: Time Functions-Footnote-1549946 +Ref: Time Functions-Footnote-2550014 +Ref: Time Functions-Footnote-3550172 +Ref: Time Functions-Footnote-4550283 +Ref: Time Functions-Footnote-5550395 +Ref: Time Functions-Footnote-6550622 +Node: Bitwise Functions550888 +Ref: table-bitwise-ops551450 +Ref: Bitwise Functions-Footnote-1555695 +Node: Type Functions555879 +Node: I18N Functions557021 +Node: User-defined558666 +Node: Definition Syntax559470 +Ref: Definition Syntax-Footnote-1564783 +Node: Function Example564852 +Ref: Function Example-Footnote-1567492 +Node: Function Caveats567514 +Node: Calling A Function568032 +Node: Variable Scope568987 +Node: Pass By Value/Reference571975 +Node: Return Statement575485 +Node: Dynamic Typing578469 +Node: Indirect Calls579398 +Node: Functions Summary589111 +Node: Library Functions591650 +Ref: Library Functions-Footnote-1595268 +Ref: Library Functions-Footnote-2595411 +Node: Library Names595582 +Ref: Library Names-Footnote-1599055 +Ref: Library Names-Footnote-2599275 +Node: General Functions599361 +Node: Strtonum Function600389 +Node: Assert Function603263 +Node: Round Function606589 +Node: Cliff Random Function608130 +Node: Ordinal Functions609146 +Ref: Ordinal Functions-Footnote-1612211 +Ref: Ordinal Functions-Footnote-2612463 +Node: Join Function612674 +Ref: Join Function-Footnote-1614445 +Node: Getlocaltime Function614645 +Node: Readfile Function618381 +Ref: Readfile Function-Footnote-1620259 +Node: Data File Management620487 +Node: Filetrans Function621119 +Node: Rewind Function625188 +Node: File Checking626746 +Ref: File Checking-Footnote-1627878 +Node: Empty Files628079 +Node: Ignoring Assigns630058 +Node: Getopt Function631612 +Ref: Getopt Function-Footnote-1642876 +Node: Passwd Functions643079 +Ref: Passwd Functions-Footnote-1652058 +Node: Group Functions652146 +Ref: Group Functions-Footnote-1660077 +Node: Walking Arrays660290 +Node: Library Functions Summary661893 +Node: Library Exercises663281 +Node: Sample Programs664561 +Node: Running Examples665331 +Node: Clones666059 +Node: Cut Program667283 +Node: Egrep Program677141 +Ref: Egrep Program-Footnote-1684728 +Node: Id Program684838 +Node: Split Program688492 +Ref: Split Program-Footnote-1692030 +Node: Tee Program692158 +Node: Uniq Program694945 +Node: Wc Program702366 +Ref: Wc Program-Footnote-1706631 +Node: Miscellaneous Programs706723 +Node: Dupword Program707936 +Node: Alarm Program709967 +Node: Translate Program714771 +Ref: Translate Program-Footnote-1719162 +Ref: Translate Program-Footnote-2719432 +Node: Labels Program719566 +Ref: Labels Program-Footnote-1722927 +Node: Word Sorting723011 +Node: History Sorting727054 +Node: Extract Program728890 +Node: Simple Sed736426 +Node: Igawk Program739488 +Ref: Igawk Program-Footnote-1753792 +Ref: Igawk Program-Footnote-2753993 +Node: Anagram Program754131 +Node: Signature Program757199 +Node: Programs Summary758446 +Node: Programs Exercises759661 +Node: Advanced Features763312 +Node: Nondecimal Data765260 +Node: Array Sorting766837 +Node: Controlling Array Traversal767534 +Node: Array Sorting Functions775814 +Ref: Array Sorting Functions-Footnote-1779721 +Node: Two-way I/O779915 +Ref: Two-way I/O-Footnote-1784859 +Ref: Two-way I/O-Footnote-2785038 +Node: TCP/IP Networking785120 +Node: Profiling787965 +Node: Advanced Features Summary795507 +Node: Internationalization797371 +Node: I18N and L10N798851 +Node: Explaining gettext799537 +Ref: Explaining gettext-Footnote-1804563 +Ref: Explaining gettext-Footnote-2804747 +Node: Programmer i18n804912 +Ref: Programmer i18n-Footnote-1809706 +Node: Translator i18n809755 +Node: String Extraction810549 +Ref: String Extraction-Footnote-1811682 +Node: Printf Ordering811768 +Ref: Printf Ordering-Footnote-1814550 +Node: I18N Portability814614 +Ref: I18N Portability-Footnote-1817063 +Node: I18N Example817126 +Ref: I18N Example-Footnote-1819832 +Node: Gawk I18N819904 +Node: I18N Summary820542 +Node: Debugger821881 +Node: Debugging822903 +Node: Debugging Concepts823344 +Node: Debugging Terms825200 +Node: Awk Debugging827797 +Node: Sample Debugging Session828689 +Node: Debugger Invocation829209 +Node: Finding The Bug830542 +Node: List of Debugger Commands837024 +Node: Breakpoint Control838356 +Node: Debugger Execution Control842020 +Node: Viewing And Changing Data845380 +Node: Execution Stack848738 +Node: Debugger Info850251 +Node: Miscellaneous Debugger Commands854245 +Node: Readline Support859429 +Node: Limitations860321 +Node: Debugging Summary862595 +Node: Arbitrary Precision Arithmetic863763 +Node: Computer Arithmetic865250 +Ref: Computer Arithmetic-Footnote-1869637 +Node: Math Definitions869694 +Ref: table-ieee-formats872983 +Ref: Math Definitions-Footnote-1873523 +Node: MPFR features873626 +Node: FP Math Caution875243 +Ref: FP Math Caution-Footnote-1876293 +Node: Inexactness of computations876662 +Node: Inexact representation877610 +Node: Comparing FP Values878965 +Node: Errors accumulate879929 +Node: Getting Accuracy881362 +Node: Try To Round884021 +Node: Setting precision884920 +Ref: table-predefined-precision-strings885602 +Node: Setting the rounding mode887395 +Ref: table-gawk-rounding-modes887759 +Ref: Setting the rounding mode-Footnote-1891213 +Node: Arbitrary Precision Integers891392 +Ref: Arbitrary Precision Integers-Footnote-1894373 +Node: POSIX Floating Point Problems894522 +Ref: POSIX Floating Point Problems-Footnote-1898398 +Node: Floating point summary898436 +Node: Dynamic Extensions900640 +Node: Extension Intro902192 +Node: Plugin License903457 +Node: Extension Mechanism Outline904142 +Ref: figure-load-extension904566 +Ref: figure-load-new-function906051 +Ref: figure-call-new-function907053 +Node: Extension API Description909037 +Node: Extension API Functions Introduction910487 +Node: General Data Types915354 +Ref: General Data Types-Footnote-1921047 +Node: Requesting Values921346 +Ref: table-value-types-returned922083 +Node: Memory Allocation Functions923041 +Ref: Memory Allocation Functions-Footnote-1925788 +Node: Constructor Functions925884 +Node: Registration Functions927642 +Node: Extension Functions928327 +Node: Exit Callback Functions930629 +Node: Extension Version String931877 +Node: Input Parsers932527 +Node: Output Wrappers942341 +Node: Two-way processors946857 +Node: Printing Messages949061 +Ref: Printing Messages-Footnote-1950138 +Node: Updating `ERRNO'950290 +Node: Accessing Parameters951029 +Node: Symbol Table Access952259 +Node: Symbol table by name952773 +Node: Symbol table by cookie954749 +Ref: Symbol table by cookie-Footnote-1958882 +Node: Cached values958945 +Ref: Cached values-Footnote-1962449 +Node: Array Manipulation962540 +Ref: Array Manipulation-Footnote-1963638 +Node: Array Data Types963677 +Ref: Array Data Types-Footnote-1966380 +Node: Array Functions966472 +Node: Flattening Arrays970346 +Node: Creating Arrays977198 +Node: Extension API Variables981929 +Node: Extension Versioning982565 +Node: Extension API Informational Variables984466 +Node: Extension API Boilerplate985552 +Node: Finding Extensions989356 +Node: Extension Example989916 +Node: Internal File Description990646 +Node: Internal File Ops994737 +Ref: Internal File Ops-Footnote-11006169 +Node: Using Internal File Ops1006309 +Ref: Using Internal File Ops-Footnote-11008656 +Node: Extension Samples1008924 +Node: Extension Sample File Functions1010448 +Node: Extension Sample Fnmatch1018016 +Node: Extension Sample Fork1019498 +Node: Extension Sample Inplace1020711 +Node: Extension Sample Ord1022386 +Node: Extension Sample Readdir1023222 +Ref: table-readdir-file-types1024078 +Node: Extension Sample Revout1024877 +Node: Extension Sample Rev2way1025468 +Node: Extension Sample Read write array1026209 +Node: Extension Sample Readfile1028088 +Node: Extension Sample API Tests1029188 +Node: Extension Sample Time1029713 +Node: gawkextlib1031028 +Node: Extension summary1033841 +Node: Extension Exercises1037534 +Node: Language History1038256 +Node: V7/SVR3.11039899 +Node: SVR41042219 +Node: POSIX1043661 +Node: BTL1045047 +Node: POSIX/GNU1045781 +Node: Feature History1051497 +Node: Common Extensions1064588 +Node: Ranges and Locales1065900 +Ref: Ranges and Locales-Footnote-11070517 +Ref: Ranges and Locales-Footnote-21070544 +Ref: Ranges and Locales-Footnote-31070778 +Node: Contributors1070999 +Node: History summary1076424 +Node: Installation1077793 +Node: Gawk Distribution1078744 +Node: Getting1079228 +Node: Extracting1080052 +Node: Distribution contents1081694 +Node: Unix Installation1087411 +Node: Quick Installation1088028 +Node: Additional Configuration Options1090470 +Node: Configuration Philosophy1092208 +Node: Non-Unix Installation1094559 +Node: PC Installation1095017 +Node: PC Binary Installation1096328 +Node: PC Compiling1098176 +Ref: PC Compiling-Footnote-11101175 +Node: PC Testing1101280 +Node: PC Using1102456 +Node: Cygwin1106608 +Node: MSYS1107417 +Node: VMS Installation1107931 +Node: VMS Compilation1108727 +Ref: VMS Compilation-Footnote-11109949 +Node: VMS Dynamic Extensions1110007 +Node: VMS Installation Details1111380 +Node: VMS Running1113632 +Node: VMS GNV1116466 +Node: VMS Old Gawk1117189 +Node: Bugs1117659 +Node: Other Versions1121663 +Node: Installation summary1127890 +Node: Notes1128946 +Node: Compatibility Mode1129811 +Node: Additions1130593 +Node: Accessing The Source1131518 +Node: Adding Code1132954 +Node: New Ports1139132 +Node: Derived Files1143613 +Ref: Derived Files-Footnote-11148694 +Ref: Derived Files-Footnote-21148728 +Ref: Derived Files-Footnote-31149324 +Node: Future Extensions1149438 +Node: Implementation Limitations1150044 +Node: Extension Design1151292 +Node: Old Extension Problems1152446 +Ref: Old Extension Problems-Footnote-11153963 +Node: Extension New Mechanism Goals1154020 +Ref: Extension New Mechanism Goals-Footnote-11157380 +Node: Extension Other Design Decisions1157569 +Node: Extension Future Growth1159675 +Node: Old Extension Mechanism1160511 +Node: Notes summary1162273 +Node: Basic Concepts1163459 +Node: Basic High Level1164140 +Ref: figure-general-flow1164412 +Ref: figure-process-flow1165011 +Ref: Basic High Level-Footnote-11168240 +Node: Basic Data Typing1168425 +Node: Glossary1171753 +Node: Copying1196905 +Node: GNU Free Documentation License1234461 +Node: Index1259597  End Tag Table -- cgit v1.2.3 From 00f86a1d837f838a715dc879076325f772c4c5c9 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 1 Sep 2014 22:40:55 +0300 Subject: Index @ stuff in doc. --- doc/gawk.info | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 2841d21e..8d71f77c 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -31161,6 +31161,10 @@ Index * ? (question mark), regexp operator <1>: GNU Regexp Operators. (line 59) * ? (question mark), regexp operator: Regexp Operators. (line 111) +* @-notation for indirect function calls: Indirect Calls. (line 47) +* @include directive: Include Files. (line 8) +* @load directive: Loading Shared Libraries. + (line 8) * [] (square brackets), regexp operator: Regexp Operators. (line 56) * \ (backslash): Comments. (line 50) * \ (backslash), \" escape sequence: Escape Sequences. (line 82) @@ -32229,6 +32233,8 @@ Index * extensions, common, single character fields: Single Character Fields. (line 6) * extensions, in gawk, not in POSIX awk: POSIX/GNU. (line 6) +* extensions, loading, @load directive: Loading Shared Libraries. + (line 8) * extensions, mawk: Common Extensions. (line 6) * extensions, where to find: gawkextlib. (line 6) * extract.awk program: Extract Program. (line 79) @@ -32279,6 +32285,7 @@ Index * FIELDWIDTHS variable <1>: User-modified. (line 37) * FIELDWIDTHS variable: Constant Size. (line 23) * file descriptors: Special FD. (line 6) +* file inclusion, @include directive: Include Files. (line 8) * file names, distinguishing: Auto-set. (line 56) * file names, in compatibility mode: Special Caveats. (line 9) * file names, standard streams in gawk: Special FD. (line 46) @@ -32405,6 +32412,7 @@ Index * FUNCTAB array: Auto-set. (line 115) * function calls: Function Calls. (line 6) * function calls, indirect: Indirect Calls. (line 6) +* function calls, indirect, @-notation for: Indirect Calls. (line 47) * function definition example: Function Example. (line 6) * function pointers: Indirect Calls. (line 6) * functions, arrays as parameters to: Pass By Value/Reference. @@ -32685,10 +32693,12 @@ Index * in operator, testing if array element exists: Reference to Elements. (line 38) * in operator, use in loops: Scanning an Array. (line 17) +* including files, @include directive: Include Files. (line 8) * increment operators: Increment Ops. (line 6) * index: String Functions. (line 155) * indexing arrays: Array Intro. (line 50) * indirect function calls: Indirect Calls. (line 6) +* indirect function calls, @-notation: Indirect Calls. (line 47) * infinite precision: Arbitrary Precision Arithmetic. (line 6) * info debugger command: Debugger Info. (line 13) @@ -32861,6 +32871,8 @@ Index * list debugger command: Miscellaneous Debugger Commands. (line 72) * list function definitions, in debugger: Debugger Info. (line 30) +* loading extensions, @load directive: Loading Shared Libraries. + (line 8) * loading, extensions: Options. (line 173) * local variables, in a function: Variable Scope. (line 6) * locale categories: Explaining gettext. (line 81) -- cgit v1.2.3 From f84a4ffb830e5f9ce138cb74fae99ad930805723 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 2 Sep 2014 06:03:05 +0300 Subject: Fix debugger walkthrough. --- doc/gawk.info | 69 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 34 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 8d71f77c..c8212732 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -20524,7 +20524,7 @@ options. (`gawk' is not designed to debug command-line programs, only programs contained in files.) In our case, we invoke the debugger like this: - $ gawk -D -f getopt.awk -f join.awk -f uniq.awk inputfile + $ gawk -D -f getopt.awk -f join.awk -f uniq.awk -1 inputfile where both `getopt.awk' and `uniq.awk' are in `$AWKPATH'. (Experienced users of GDB or similar debuggers should note that this syntax is @@ -20576,7 +20576,7 @@ for a breakpoint in `uniq.awk' is at the beginning of the function To set the breakpoint, use the `b' (breakpoint) command: gawk> b are_equal - -| Breakpoint 1 set at file `awklib/eg/prog/uniq.awk', line 64 + -| Breakpoint 1 set at file `awklib/eg/prog/uniq.awk', line 63 The debugger tells us the file and line number where the breakpoint is. Now type `r' or `run' and the program runs until it hits the @@ -20586,8 +20586,8 @@ breakpoint for the first time: -| Starting program: -| Stopping in Rule ... -| Breakpoint 1, are_equal(n, m, clast, cline, alast, aline) - at `awklib/eg/prog/uniq.awk':64 - -| 64 if (fcount == 0 && charcount == 0) + at `awklib/eg/prog/uniq.awk':63 + -| 63 if (fcount == 0 && charcount == 0) gawk> Now we can look at what's going on inside our program. First of all, @@ -20597,11 +20597,11 @@ the current stack frames: gawk> bt -| #0 are_equal(n, m, clast, cline, alast, aline) - at `awklib/eg/prog/uniq.awk':69 - -| #1 in main() at `awklib/eg/prog/uniq.awk':89 + at `awklib/eg/prog/uniq.awk':68 + -| #1 in main() at `awklib/eg/prog/uniq.awk':88 This tells us that `are_equal()' was called by the main program at -line 89 of `uniq.awk'. (This is not a big surprise, since this is the +line 88 of `uniq.awk'. (This is not a big surprise, since this is the only call to `are_equal()' in the program, but in more complex programs, knowing who called a function and with what parameters can be the key to finding the source of the problem.) @@ -20620,13 +20620,13 @@ function was called without arguments (*note Function Calls::). A more useful variable to display might be the current record: gawk> p $0 - -| $0 = string ("gawk is a wonderful program!") + -| $0 = "gawk is a wonderful program!" This might be a bit puzzling at first since this is the second line of our test input above. Let's look at `NR': gawk> p NR - -| NR = number (2) + -| NR = 2 So we can see that `are_equal()' was only called for the second record of the file. Of course, this is because our program contains a rule for @@ -20640,7 +20640,7 @@ of the file. Of course, this is because our program contains a rule for OK, let's just check that that rule worked correctly: gawk> p last - -| last = string ("awk is a wonderful program!") + -| last = "awk is a wonderful program!" Everything we have done so far has verified that the program has worked as planned, up to and including the call to `are_equal()', so @@ -20649,38 +20649,39 @@ must begin "stepping through" the lines of `are_equal()'. We start by typing `n' (for "next"): gawk> n - -| 67 if (fcount > 0) { + -| 66 if (fcount > 0) { - This tells us that `gawk' is now ready to execute line 67, which + This tells us that `gawk' is now ready to execute line 66, which decides whether to give the lines the special "field skipping" treatment -indicated by the `-f' command-line option. (Notice that we skipped -from where we were before at line 64 to here, since the condition in -line 64 `if (fcount == 0 && charcount == 0)' was false.) +indicated by the `-1' command-line option. (Notice that we skipped +from where we were before at line 63 to here, since the condition in +line 63 `if (fcount == 0 && charcount == 0)' was false.) Continuing to step, we now get to the splitting of the current and last records: gawk> n - -| 68 n = split(last, alast) + -| 67 n = split(last, alast) gawk> n - -| 69 m = split($0, aline) + -| 68 m = split($0, aline) At this point, we should be curious to see what our records were split into, so we try to look: gawk> p n m alast aline - -| n = number (5) - -| m = number (5) + -| n = 5 + -| m = untyped variable -| alast = array, 5 elements - -| aline = array, 5 elements + -| aline = untyped variable (The `p' command can take more than one argument, similar to `awk''s `print' statement.) This is kind of disappointing, though. All we found out is that -there are five elements in each of our arrays. Useful enough (we now -know that none of the words were accidentally left out), but what if we -want to see inside the array? +there are five elements in `alast'; `m' and `aline' don't have values +yet since we are at line 68 but haven't executed it yet. This +information is useful enough (we now know that none of the words were +accidentally left out), but what if we want to see inside the array? The first choice would be to use subscripts: @@ -20690,25 +20691,25 @@ want to see inside the array? Oops! gawk> p alast[1] - -| alast["1"] = string ("awk") + -| alast["1"] = "awk" This would be kind of slow for a 100-member array, though, so `gawk' provides a shortcut (reminiscent of another language not to be mentioned): gawk> p @alast - -| alast["1"] = string ("awk") - -| alast["2"] = string ("is") - -| alast["3"] = string ("a") - -| alast["4"] = string ("wonderful") - -| alast["5"] = string ("program!") + -| alast["1"] = "awk" + -| alast["2"] = "is" + -| alast["3"] = "a" + -| alast["4"] = "wonderful" + -| alast["5"] = "program!" It looks like we got this far OK. Let's take another step or two: gawk> n - -| 70 clast = join(alast, fcount, n) + -| 69 clast = join(alast, fcount, n) gawk> n - -| 71 cline = join(aline, fcount, m) + -| 70 cline = join(aline, fcount, m) Well, here we are at our error (sorry to spoil the suspense). What we had in mind was to join the fields starting from the second one to @@ -20716,8 +20717,8 @@ make the virtual record to compare, and if the first field was numbered zero, this would work. Let's look at what we've got: gawk> p cline clast - -| cline = string ("gawk is a wonderful program!") - -| clast = string ("awk is a wonderful program!") + -| cline = "gawk is a wonderful program!" + -| clast = "awk is a wonderful program!" Hey, those look pretty familiar! They're just our original, unaltered, input records. A little thinking (the human brain is still @@ -34386,7 +34387,7 @@ Node: Debugging Terms825200 Node: Awk Debugging827797 Node: Sample Debugging Session828689 Node: Debugger Invocation829209 -Node: Finding The Bug830542 +Node: Finding The Bug830545 Node: List of Debugger Commands837024 Node: Breakpoint Control838356 Node: Debugger Execution Control842020 -- cgit v1.2.3 From a0d7edfff1b489e50ae8751429ebf925948b746f Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 4 Sep 2014 08:49:02 +0300 Subject: Documentation fixes and improvements. --- doc/gawk.info | 1094 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 552 insertions(+), 542 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index c8212732..1e6e93f5 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2222,7 +2222,7 @@ determining the type of a variable, and array sorting. As we develop our presentation of the `awk' language, we introduce most of the variables and many of the functions. They are described -systematically in *note Built-in Variables::, and *note Built-in::. +systematically in *note Built-in Variables::, and in *note Built-in::.  File: gawk.info, Node: When, Next: Intro Summary, Prev: Other Features, Up: Getting Started @@ -14880,7 +14880,7 @@ that might be as follows: This function reads from `file' one record at a time, building up the full contents of the file in the local variable `contents'. It -works, but is not necessarily efficient.(1) +works, but is not necessarily efficient. The following function, based on a suggestion by Denis Shirokov, reads the entire contents of the named file in one shot: @@ -14915,13 +14915,6 @@ string. Thus calling code may use something like: This tests the result to see if it is empty or not. An equivalent test would be `contents == ""'. - ---------- Footnotes ---------- - - (1) Execution time grows quadratically in the size of the input; for -each record, `awk' has to allocate a bigger internal buffer for -`contents', copy the old contents into it, and then append the contents -of the new record. -  File: gawk.info, Node: Data File Management, Next: Getopt Function, Prev: General Functions, Up: Library Functions @@ -17054,7 +17047,7 @@ standard output, `/dev/stdout': else if (c == "c") do_count++ else if (index("0123456789", c) != 0) { - # getopt requires args to options + # getopt() requires args to options # this messes us up for things like -5 if (Optarg ~ /^[[:digit:]]+$/) fcount = (c Optarg) + 0 @@ -17651,8 +17644,8 @@ program. enclosed in square brackets (`[a-z]') and quoted, to prevent the shell from attempting a file name expansion. This is not a feature. - (2) This program was written before `gawk' acquired the ability to -split each character in a string into separate array elements. + (2) This program was also written before `gawk' acquired the ability +to split each character in a string into separate array elements.  File: gawk.info, Node: Labels Program, Next: Word Sorting, Prev: Translate Program, Up: Miscellaneous Programs @@ -18745,23 +18738,35 @@ File: gawk.info, Node: Programs Exercises, Prev: Programs Summary, Up: Sample 5. The `split.awk' program (*note Split Program::) assumes that letters are contiguous in the character set, which isn't true for - EBCDIC systems. Fix this problem. - - 6. Why can't the `wc.awk' program (*note Wc Program::) just use the + EBCDIC systems. Fix this problem. (Hint: Consider a different + way to work through the alphabet, without relying on `ord()' and + `chr()'.) + + 6. In `uniq.awk' (*note Uniq Program::, the logic for choosing which + lines to print represents a "state machine", which is "a device + that can be in one of a set number of stable conditions depending + on its previous condition and on the present values of its + inputs."(1) Brian Kernighan suggests that "an alternative approach + to state mechines is to just read the input into an array, then + use indexing. It's almost always easier code, and for most inputs + where you would use this, just as fast." Rewrite the logic to + follow this suggestion. + + 7. Why can't the `wc.awk' program (*note Wc Program::) just use the value of `FNR' in `endfile()'? Hint: Examine the code in *note Filetrans Function::. - 7. Manipulation of individual characters in the `translate' program + 8. Manipulation of individual characters in the `translate' program (*note Translate Program::) is painful using standard `awk' functions. Given that `gawk' can split strings into individual characters using `""' as the separator, how might you use this feature to simplify the program? - 8. The `extract.awk' program (*note Extract Program::) was written + 9. The `extract.awk' program (*note Extract Program::) was written before `gawk' had the `gensub()' function. Use it to simplify the code. - 9. Compare the performance of the `awksed.awk' program (*note Simple + 10. Compare the performance of the `awksed.awk' program (*note Simple Sed::) with the more straightforward: BEGIN { @@ -18772,16 +18777,16 @@ File: gawk.info, Node: Programs Exercises, Prev: Programs Summary, Up: Sample { gsub(pat, repl); print } - 10. What are the advantages and disadvantages of `awksed.awk' versus + 11. What are the advantages and disadvantages of `awksed.awk' versus the real `sed' utility? - 11. In *note Igawk Program::, we mentioned that not trying to save the + 12. In *note Igawk Program::, we mentioned that not trying to save the line read with `getline' in the `pathto()' function when testing for the file's accessibility for use with the main program simplifies things considerably. What problem does this engender though? - 12. As an additional example of the idea that it is not always + 13. As an additional example of the idea that it is not always necessary to add new features to a program, consider the idea of having two files in a directory in the search path: @@ -18804,10 +18809,15 @@ File: gawk.info, Node: Programs Exercises, Prev: Programs Summary, Up: Sample `@include' statements for the desired library functions. Make this change. - 13. Modify `anagram.awk' (*note Anagram Program::), to avoid the use + 14. Modify `anagram.awk' (*note Anagram Program::), to avoid the use of the external `sort' utility. + ---------- Footnotes ---------- + + (1) This is the definition returned from entering `define: state +machine' into Google. +  File: gawk.info, Node: Advanced Features, Next: Internationalization, Prev: Sample Programs, Up: Top @@ -21358,7 +21368,7 @@ some limitations. A few which are worth being aware of are: what your mistake was, though, you'll feel like a real guru. * If you perused the dump of opcodes in *note Miscellaneous Debugger - Commands::, (or if you are already familiar with `gawk' internals), + Commands:: (or if you are already familiar with `gawk' internals), you will realize that much of the internal manipulation of data in `gawk', as in many interpreters, is done on a stack. `Op_push', `Op_pop', etc., are the "bread and butter" of most `gawk' code. @@ -32060,7 +32070,7 @@ Index (line 66) * directories, command-line: Command-line directories. (line 6) -* directories, searching: Programs Exercises. (line 63) +* directories, searching: Programs Exercises. (line 75) * directories, searching for loadable extensions: AWKLIBPATH Variable. (line 6) * directories, searching for source files: AWKPATH Variable. (line 6) @@ -32341,7 +32351,7 @@ Index * files, reading, multiline records: Multiple Line. (line 6) * files, searching for regular expressions: Egrep Program. (line 6) * files, skipping: File Checking. (line 6) -* files, source, search path for: Programs Exercises. (line 63) +* files, source, search path for: Programs Exercises. (line 75) * files, splitting: Split Program. (line 6) * files, Texinfo, extracting programs from: Extract Program. (line 6) * find substring in string: String Functions. (line 155) @@ -33509,11 +33519,11 @@ Index * search in string: String Functions. (line 155) * search paths <1>: VMS Running. (line 58) * search paths <2>: PC Using. (line 10) -* search paths: Programs Exercises. (line 63) +* search paths: Programs Exercises. (line 75) * search paths, for loadable extensions: AWKLIBPATH Variable. (line 6) * search paths, for source files <1>: VMS Running. (line 58) * search paths, for source files <2>: PC Using. (line 10) -* search paths, for source files <3>: Programs Exercises. (line 63) +* search paths, for source files <3>: Programs Exercises. (line 75) * search paths, for source files: AWKPATH Variable. (line 6) * searching, files for regular expressions: Egrep Program. (line 6) * searching, for words: Dupword Program. (line 6) @@ -33660,7 +33670,7 @@ Index * source code, QSE Awk: Other Versions. (line 131) * source code, QuikTrim Awk: Other Versions. (line 135) * source code, Solaris awk: Other Versions. (line 96) -* source files, search path for: Programs Exercises. (line 63) +* source files, search path for: Programs Exercises. (line 75) * sparse arrays: Array Intro. (line 72) * Spencer, Henry: Glossary. (line 11) * split: String Functions. (line 313) @@ -34051,519 +34061,519 @@ Ref: More Complex-Footnote-1102513 Node: Statements/Lines102598 Ref: Statements/Lines-Footnote-1107054 Node: Other Features107319 -Node: When108247 -Ref: When-Footnote-1110003 -Node: Intro Summary110068 -Node: Invoking Gawk110951 -Node: Command Line112466 -Node: Options113257 -Ref: Options-Footnote-1129033 -Node: Other Arguments129058 -Node: Naming Standard Input131886 -Node: Environment Variables132979 -Node: AWKPATH Variable133537 -Ref: AWKPATH Variable-Footnote-1136403 -Ref: AWKPATH Variable-Footnote-2136448 -Node: AWKLIBPATH Variable136708 -Node: Other Environment Variables137467 -Node: Exit Status141124 -Node: Include Files141799 -Node: Loading Shared Libraries145377 -Node: Obsolete146761 -Node: Undocumented147458 -Node: Invoking Summary147725 -Node: Regexp149325 -Node: Regexp Usage150784 -Node: Escape Sequences152817 -Node: Regexp Operators158805 -Ref: Regexp Operators-Footnote-1166236 -Ref: Regexp Operators-Footnote-2166383 -Node: Bracket Expressions166481 -Ref: table-char-classes168499 -Node: Leftmost Longest171439 -Node: Computed Regexps172643 -Node: GNU Regexp Operators176021 -Node: Case-sensitivity179727 -Ref: Case-sensitivity-Footnote-1182617 -Ref: Case-sensitivity-Footnote-2182852 -Node: Regexp Summary182960 -Node: Reading Files184429 -Node: Records186521 -Node: awk split records187243 -Node: gawk split records192101 -Ref: gawk split records-Footnote-1196622 -Node: Fields196659 -Ref: Fields-Footnote-1199623 -Node: Nonconstant Fields199709 -Ref: Nonconstant Fields-Footnote-1201939 -Node: Changing Fields202141 -Node: Field Separators208095 -Node: Default Field Splitting210797 -Node: Regexp Field Splitting211914 -Node: Single Character Fields215241 -Node: Command Line Field Separator216300 -Node: Full Line Fields219726 -Ref: Full Line Fields-Footnote-1220234 -Node: Field Splitting Summary220280 -Ref: Field Splitting Summary-Footnote-1223412 -Node: Constant Size223513 -Node: Splitting By Content228119 -Ref: Splitting By Content-Footnote-1232192 -Node: Multiple Line232232 -Ref: Multiple Line-Footnote-1238088 -Node: Getline238267 -Node: Plain Getline240478 -Node: Getline/Variable243184 -Node: Getline/File244331 -Node: Getline/Variable/File245715 -Ref: Getline/Variable/File-Footnote-1247314 -Node: Getline/Pipe247401 -Node: Getline/Variable/Pipe250087 -Node: Getline/Coprocess251194 -Node: Getline/Variable/Coprocess252446 -Node: Getline Notes253183 -Node: Getline Summary255987 -Ref: table-getline-variants256395 -Node: Read Timeout257307 -Ref: Read Timeout-Footnote-1261134 -Node: Command-line directories261192 -Node: Input Summary262096 -Node: Input Exercises265233 -Node: Printing265961 -Node: Print267683 -Node: Print Examples269176 -Node: Output Separators271955 -Node: OFMT273971 -Node: Printf275329 -Node: Basic Printf276235 -Node: Control Letters277774 -Node: Format Modifiers281765 -Node: Printf Examples287792 -Node: Redirection290256 -Node: Special Files297228 -Node: Special FD297761 -Ref: Special FD-Footnote-1301358 -Node: Special Network301432 -Node: Special Caveats302282 -Node: Close Files And Pipes303078 -Ref: Close Files And Pipes-Footnote-1310239 -Ref: Close Files And Pipes-Footnote-2310387 -Node: Output Summary310537 -Node: Output Exercises311534 -Node: Expressions312214 -Node: Values313399 -Node: Constants314075 -Node: Scalar Constants314755 -Ref: Scalar Constants-Footnote-1315614 -Node: Nondecimal-numbers315864 -Node: Regexp Constants318864 -Node: Using Constant Regexps319389 -Node: Variables322461 -Node: Using Variables323116 -Node: Assignment Options324840 -Node: Conversion326715 -Node: Strings And Numbers327239 -Ref: Strings And Numbers-Footnote-1330301 -Node: Locale influences conversions330410 -Ref: table-locale-affects333127 -Node: All Operators333715 -Node: Arithmetic Ops334345 -Node: Concatenation336850 -Ref: Concatenation-Footnote-1339669 -Node: Assignment Ops339775 -Ref: table-assign-ops344758 -Node: Increment Ops346061 -Node: Truth Values and Conditions349499 -Node: Truth Values350582 -Node: Typing and Comparison351631 -Node: Variable Typing352424 -Node: Comparison Operators356076 -Ref: table-relational-ops356486 -Node: POSIX String Comparison360036 -Ref: POSIX String Comparison-Footnote-1361120 -Node: Boolean Ops361258 -Ref: Boolean Ops-Footnote-1365597 -Node: Conditional Exp365688 -Node: Function Calls367415 -Node: Precedence371295 -Node: Locales374964 -Node: Expressions Summary376595 -Node: Patterns and Actions379136 -Node: Pattern Overview380252 -Node: Regexp Patterns381929 -Node: Expression Patterns382472 -Node: Ranges386252 -Node: BEGIN/END389358 -Node: Using BEGIN/END390120 -Ref: Using BEGIN/END-Footnote-1392856 -Node: I/O And BEGIN/END392962 -Node: BEGINFILE/ENDFILE395233 -Node: Empty398164 -Node: Using Shell Variables398481 -Node: Action Overview400764 -Node: Statements403091 -Node: If Statement404939 -Node: While Statement406437 -Node: Do Statement408481 -Node: For Statement409637 -Node: Switch Statement412789 -Node: Break Statement415177 -Node: Continue Statement417218 -Node: Next Statement419043 -Node: Nextfile Statement421433 -Node: Exit Statement424090 -Node: Built-in Variables426494 -Node: User-modified427621 -Ref: User-modified-Footnote-1435310 -Node: Auto-set435372 -Ref: Auto-set-Footnote-1447954 -Ref: Auto-set-Footnote-2448159 -Node: ARGC and ARGV448215 -Node: Pattern Action Summary452119 -Node: Arrays454342 -Node: Array Basics455891 -Node: Array Intro456717 -Ref: figure-array-elements458690 -Ref: Array Intro-Footnote-1461214 -Node: Reference to Elements461342 -Node: Assigning Elements463792 -Node: Array Example464283 -Node: Scanning an Array466015 -Node: Controlling Scanning469016 -Ref: Controlling Scanning-Footnote-1474189 -Node: Delete474505 -Ref: Delete-Footnote-1477256 -Node: Numeric Array Subscripts477313 -Node: Uninitialized Subscripts479496 -Node: Multidimensional481123 -Node: Multiscanning484236 -Node: Arrays of Arrays485825 -Node: Arrays Summary490488 -Node: Functions492593 -Node: Built-in493466 -Node: Calling Built-in494544 -Node: Numeric Functions496532 -Ref: Numeric Functions-Footnote-1500566 -Ref: Numeric Functions-Footnote-2500923 -Ref: Numeric Functions-Footnote-3500971 -Node: String Functions501240 -Ref: String Functions-Footnote-1524237 -Ref: String Functions-Footnote-2524366 -Ref: String Functions-Footnote-3524614 -Node: Gory Details524701 -Ref: table-sub-escapes526474 -Ref: table-sub-proposed527994 -Ref: table-posix-sub529358 -Ref: table-gensub-escapes530898 -Ref: Gory Details-Footnote-1532074 -Node: I/O Functions532225 -Ref: I/O Functions-Footnote-1539335 -Node: Time Functions539482 -Ref: Time Functions-Footnote-1549946 -Ref: Time Functions-Footnote-2550014 -Ref: Time Functions-Footnote-3550172 -Ref: Time Functions-Footnote-4550283 -Ref: Time Functions-Footnote-5550395 -Ref: Time Functions-Footnote-6550622 -Node: Bitwise Functions550888 -Ref: table-bitwise-ops551450 -Ref: Bitwise Functions-Footnote-1555695 -Node: Type Functions555879 -Node: I18N Functions557021 -Node: User-defined558666 -Node: Definition Syntax559470 -Ref: Definition Syntax-Footnote-1564783 -Node: Function Example564852 -Ref: Function Example-Footnote-1567492 -Node: Function Caveats567514 -Node: Calling A Function568032 -Node: Variable Scope568987 -Node: Pass By Value/Reference571975 -Node: Return Statement575485 -Node: Dynamic Typing578469 -Node: Indirect Calls579398 -Node: Functions Summary589111 -Node: Library Functions591650 -Ref: Library Functions-Footnote-1595268 -Ref: Library Functions-Footnote-2595411 -Node: Library Names595582 -Ref: Library Names-Footnote-1599055 -Ref: Library Names-Footnote-2599275 -Node: General Functions599361 -Node: Strtonum Function600389 -Node: Assert Function603263 -Node: Round Function606589 -Node: Cliff Random Function608130 -Node: Ordinal Functions609146 -Ref: Ordinal Functions-Footnote-1612211 -Ref: Ordinal Functions-Footnote-2612463 -Node: Join Function612674 -Ref: Join Function-Footnote-1614445 -Node: Getlocaltime Function614645 -Node: Readfile Function618381 -Ref: Readfile Function-Footnote-1620259 -Node: Data File Management620487 -Node: Filetrans Function621119 -Node: Rewind Function625188 -Node: File Checking626746 -Ref: File Checking-Footnote-1627878 -Node: Empty Files628079 -Node: Ignoring Assigns630058 -Node: Getopt Function631612 -Ref: Getopt Function-Footnote-1642876 -Node: Passwd Functions643079 -Ref: Passwd Functions-Footnote-1652058 -Node: Group Functions652146 -Ref: Group Functions-Footnote-1660077 -Node: Walking Arrays660290 -Node: Library Functions Summary661893 -Node: Library Exercises663281 -Node: Sample Programs664561 -Node: Running Examples665331 -Node: Clones666059 -Node: Cut Program667283 -Node: Egrep Program677141 -Ref: Egrep Program-Footnote-1684728 -Node: Id Program684838 -Node: Split Program688492 -Ref: Split Program-Footnote-1692030 -Node: Tee Program692158 -Node: Uniq Program694945 -Node: Wc Program702366 -Ref: Wc Program-Footnote-1706631 -Node: Miscellaneous Programs706723 -Node: Dupword Program707936 -Node: Alarm Program709967 -Node: Translate Program714771 -Ref: Translate Program-Footnote-1719162 -Ref: Translate Program-Footnote-2719432 -Node: Labels Program719566 -Ref: Labels Program-Footnote-1722927 -Node: Word Sorting723011 -Node: History Sorting727054 -Node: Extract Program728890 -Node: Simple Sed736426 -Node: Igawk Program739488 -Ref: Igawk Program-Footnote-1753792 -Ref: Igawk Program-Footnote-2753993 -Node: Anagram Program754131 -Node: Signature Program757199 -Node: Programs Summary758446 -Node: Programs Exercises759661 -Node: Advanced Features763312 -Node: Nondecimal Data765260 -Node: Array Sorting766837 -Node: Controlling Array Traversal767534 -Node: Array Sorting Functions775814 -Ref: Array Sorting Functions-Footnote-1779721 -Node: Two-way I/O779915 -Ref: Two-way I/O-Footnote-1784859 -Ref: Two-way I/O-Footnote-2785038 -Node: TCP/IP Networking785120 -Node: Profiling787965 -Node: Advanced Features Summary795507 -Node: Internationalization797371 -Node: I18N and L10N798851 -Node: Explaining gettext799537 -Ref: Explaining gettext-Footnote-1804563 -Ref: Explaining gettext-Footnote-2804747 -Node: Programmer i18n804912 -Ref: Programmer i18n-Footnote-1809706 -Node: Translator i18n809755 -Node: String Extraction810549 -Ref: String Extraction-Footnote-1811682 -Node: Printf Ordering811768 -Ref: Printf Ordering-Footnote-1814550 -Node: I18N Portability814614 -Ref: I18N Portability-Footnote-1817063 -Node: I18N Example817126 -Ref: I18N Example-Footnote-1819832 -Node: Gawk I18N819904 -Node: I18N Summary820542 -Node: Debugger821881 -Node: Debugging822903 -Node: Debugging Concepts823344 -Node: Debugging Terms825200 -Node: Awk Debugging827797 -Node: Sample Debugging Session828689 -Node: Debugger Invocation829209 -Node: Finding The Bug830545 -Node: List of Debugger Commands837024 -Node: Breakpoint Control838356 -Node: Debugger Execution Control842020 -Node: Viewing And Changing Data845380 -Node: Execution Stack848738 -Node: Debugger Info850251 -Node: Miscellaneous Debugger Commands854245 -Node: Readline Support859429 -Node: Limitations860321 -Node: Debugging Summary862595 -Node: Arbitrary Precision Arithmetic863763 -Node: Computer Arithmetic865250 -Ref: Computer Arithmetic-Footnote-1869637 -Node: Math Definitions869694 -Ref: table-ieee-formats872983 -Ref: Math Definitions-Footnote-1873523 -Node: MPFR features873626 -Node: FP Math Caution875243 -Ref: FP Math Caution-Footnote-1876293 -Node: Inexactness of computations876662 -Node: Inexact representation877610 -Node: Comparing FP Values878965 -Node: Errors accumulate879929 -Node: Getting Accuracy881362 -Node: Try To Round884021 -Node: Setting precision884920 -Ref: table-predefined-precision-strings885602 -Node: Setting the rounding mode887395 -Ref: table-gawk-rounding-modes887759 -Ref: Setting the rounding mode-Footnote-1891213 -Node: Arbitrary Precision Integers891392 -Ref: Arbitrary Precision Integers-Footnote-1894373 -Node: POSIX Floating Point Problems894522 -Ref: POSIX Floating Point Problems-Footnote-1898398 -Node: Floating point summary898436 -Node: Dynamic Extensions900640 -Node: Extension Intro902192 -Node: Plugin License903457 -Node: Extension Mechanism Outline904142 -Ref: figure-load-extension904566 -Ref: figure-load-new-function906051 -Ref: figure-call-new-function907053 -Node: Extension API Description909037 -Node: Extension API Functions Introduction910487 -Node: General Data Types915354 -Ref: General Data Types-Footnote-1921047 -Node: Requesting Values921346 -Ref: table-value-types-returned922083 -Node: Memory Allocation Functions923041 -Ref: Memory Allocation Functions-Footnote-1925788 -Node: Constructor Functions925884 -Node: Registration Functions927642 -Node: Extension Functions928327 -Node: Exit Callback Functions930629 -Node: Extension Version String931877 -Node: Input Parsers932527 -Node: Output Wrappers942341 -Node: Two-way processors946857 -Node: Printing Messages949061 -Ref: Printing Messages-Footnote-1950138 -Node: Updating `ERRNO'950290 -Node: Accessing Parameters951029 -Node: Symbol Table Access952259 -Node: Symbol table by name952773 -Node: Symbol table by cookie954749 -Ref: Symbol table by cookie-Footnote-1958882 -Node: Cached values958945 -Ref: Cached values-Footnote-1962449 -Node: Array Manipulation962540 -Ref: Array Manipulation-Footnote-1963638 -Node: Array Data Types963677 -Ref: Array Data Types-Footnote-1966380 -Node: Array Functions966472 -Node: Flattening Arrays970346 -Node: Creating Arrays977198 -Node: Extension API Variables981929 -Node: Extension Versioning982565 -Node: Extension API Informational Variables984466 -Node: Extension API Boilerplate985552 -Node: Finding Extensions989356 -Node: Extension Example989916 -Node: Internal File Description990646 -Node: Internal File Ops994737 -Ref: Internal File Ops-Footnote-11006169 -Node: Using Internal File Ops1006309 -Ref: Using Internal File Ops-Footnote-11008656 -Node: Extension Samples1008924 -Node: Extension Sample File Functions1010448 -Node: Extension Sample Fnmatch1018016 -Node: Extension Sample Fork1019498 -Node: Extension Sample Inplace1020711 -Node: Extension Sample Ord1022386 -Node: Extension Sample Readdir1023222 -Ref: table-readdir-file-types1024078 -Node: Extension Sample Revout1024877 -Node: Extension Sample Rev2way1025468 -Node: Extension Sample Read write array1026209 -Node: Extension Sample Readfile1028088 -Node: Extension Sample API Tests1029188 -Node: Extension Sample Time1029713 -Node: gawkextlib1031028 -Node: Extension summary1033841 -Node: Extension Exercises1037534 -Node: Language History1038256 -Node: V7/SVR3.11039899 -Node: SVR41042219 -Node: POSIX1043661 -Node: BTL1045047 -Node: POSIX/GNU1045781 -Node: Feature History1051497 -Node: Common Extensions1064588 -Node: Ranges and Locales1065900 -Ref: Ranges and Locales-Footnote-11070517 -Ref: Ranges and Locales-Footnote-21070544 -Ref: Ranges and Locales-Footnote-31070778 -Node: Contributors1070999 -Node: History summary1076424 -Node: Installation1077793 -Node: Gawk Distribution1078744 -Node: Getting1079228 -Node: Extracting1080052 -Node: Distribution contents1081694 -Node: Unix Installation1087411 -Node: Quick Installation1088028 -Node: Additional Configuration Options1090470 -Node: Configuration Philosophy1092208 -Node: Non-Unix Installation1094559 -Node: PC Installation1095017 -Node: PC Binary Installation1096328 -Node: PC Compiling1098176 -Ref: PC Compiling-Footnote-11101175 -Node: PC Testing1101280 -Node: PC Using1102456 -Node: Cygwin1106608 -Node: MSYS1107417 -Node: VMS Installation1107931 -Node: VMS Compilation1108727 -Ref: VMS Compilation-Footnote-11109949 -Node: VMS Dynamic Extensions1110007 -Node: VMS Installation Details1111380 -Node: VMS Running1113632 -Node: VMS GNV1116466 -Node: VMS Old Gawk1117189 -Node: Bugs1117659 -Node: Other Versions1121663 -Node: Installation summary1127890 -Node: Notes1128946 -Node: Compatibility Mode1129811 -Node: Additions1130593 -Node: Accessing The Source1131518 -Node: Adding Code1132954 -Node: New Ports1139132 -Node: Derived Files1143613 -Ref: Derived Files-Footnote-11148694 -Ref: Derived Files-Footnote-21148728 -Ref: Derived Files-Footnote-31149324 -Node: Future Extensions1149438 -Node: Implementation Limitations1150044 -Node: Extension Design1151292 -Node: Old Extension Problems1152446 -Ref: Old Extension Problems-Footnote-11153963 -Node: Extension New Mechanism Goals1154020 -Ref: Extension New Mechanism Goals-Footnote-11157380 -Node: Extension Other Design Decisions1157569 -Node: Extension Future Growth1159675 -Node: Old Extension Mechanism1160511 -Node: Notes summary1162273 -Node: Basic Concepts1163459 -Node: Basic High Level1164140 -Ref: figure-general-flow1164412 -Ref: figure-process-flow1165011 -Ref: Basic High Level-Footnote-11168240 -Node: Basic Data Typing1168425 -Node: Glossary1171753 -Node: Copying1196905 -Node: GNU Free Documentation License1234461 -Node: Index1259597 +Node: When108250 +Ref: When-Footnote-1110006 +Node: Intro Summary110071 +Node: Invoking Gawk110954 +Node: Command Line112469 +Node: Options113260 +Ref: Options-Footnote-1129036 +Node: Other Arguments129061 +Node: Naming Standard Input131889 +Node: Environment Variables132982 +Node: AWKPATH Variable133540 +Ref: AWKPATH Variable-Footnote-1136406 +Ref: AWKPATH Variable-Footnote-2136451 +Node: AWKLIBPATH Variable136711 +Node: Other Environment Variables137470 +Node: Exit Status141127 +Node: Include Files141802 +Node: Loading Shared Libraries145380 +Node: Obsolete146764 +Node: Undocumented147461 +Node: Invoking Summary147728 +Node: Regexp149328 +Node: Regexp Usage150787 +Node: Escape Sequences152820 +Node: Regexp Operators158808 +Ref: Regexp Operators-Footnote-1166239 +Ref: Regexp Operators-Footnote-2166386 +Node: Bracket Expressions166484 +Ref: table-char-classes168502 +Node: Leftmost Longest171442 +Node: Computed Regexps172646 +Node: GNU Regexp Operators176024 +Node: Case-sensitivity179730 +Ref: Case-sensitivity-Footnote-1182620 +Ref: Case-sensitivity-Footnote-2182855 +Node: Regexp Summary182963 +Node: Reading Files184432 +Node: Records186524 +Node: awk split records187246 +Node: gawk split records192104 +Ref: gawk split records-Footnote-1196625 +Node: Fields196662 +Ref: Fields-Footnote-1199626 +Node: Nonconstant Fields199712 +Ref: Nonconstant Fields-Footnote-1201942 +Node: Changing Fields202144 +Node: Field Separators208098 +Node: Default Field Splitting210800 +Node: Regexp Field Splitting211917 +Node: Single Character Fields215244 +Node: Command Line Field Separator216303 +Node: Full Line Fields219729 +Ref: Full Line Fields-Footnote-1220237 +Node: Field Splitting Summary220283 +Ref: Field Splitting Summary-Footnote-1223415 +Node: Constant Size223516 +Node: Splitting By Content228122 +Ref: Splitting By Content-Footnote-1232195 +Node: Multiple Line232235 +Ref: Multiple Line-Footnote-1238091 +Node: Getline238270 +Node: Plain Getline240481 +Node: Getline/Variable243187 +Node: Getline/File244334 +Node: Getline/Variable/File245718 +Ref: Getline/Variable/File-Footnote-1247317 +Node: Getline/Pipe247404 +Node: Getline/Variable/Pipe250090 +Node: Getline/Coprocess251197 +Node: Getline/Variable/Coprocess252449 +Node: Getline Notes253186 +Node: Getline Summary255990 +Ref: table-getline-variants256398 +Node: Read Timeout257310 +Ref: Read Timeout-Footnote-1261137 +Node: Command-line directories261195 +Node: Input Summary262099 +Node: Input Exercises265236 +Node: Printing265964 +Node: Print267686 +Node: Print Examples269179 +Node: Output Separators271958 +Node: OFMT273974 +Node: Printf275332 +Node: Basic Printf276238 +Node: Control Letters277777 +Node: Format Modifiers281768 +Node: Printf Examples287795 +Node: Redirection290259 +Node: Special Files297231 +Node: Special FD297764 +Ref: Special FD-Footnote-1301361 +Node: Special Network301435 +Node: Special Caveats302285 +Node: Close Files And Pipes303081 +Ref: Close Files And Pipes-Footnote-1310242 +Ref: Close Files And Pipes-Footnote-2310390 +Node: Output Summary310540 +Node: Output Exercises311537 +Node: Expressions312217 +Node: Values313402 +Node: Constants314078 +Node: Scalar Constants314758 +Ref: Scalar Constants-Footnote-1315617 +Node: Nondecimal-numbers315867 +Node: Regexp Constants318867 +Node: Using Constant Regexps319392 +Node: Variables322464 +Node: Using Variables323119 +Node: Assignment Options324843 +Node: Conversion326718 +Node: Strings And Numbers327242 +Ref: Strings And Numbers-Footnote-1330304 +Node: Locale influences conversions330413 +Ref: table-locale-affects333130 +Node: All Operators333718 +Node: Arithmetic Ops334348 +Node: Concatenation336853 +Ref: Concatenation-Footnote-1339672 +Node: Assignment Ops339778 +Ref: table-assign-ops344761 +Node: Increment Ops346064 +Node: Truth Values and Conditions349502 +Node: Truth Values350585 +Node: Typing and Comparison351634 +Node: Variable Typing352427 +Node: Comparison Operators356079 +Ref: table-relational-ops356489 +Node: POSIX String Comparison360039 +Ref: POSIX String Comparison-Footnote-1361123 +Node: Boolean Ops361261 +Ref: Boolean Ops-Footnote-1365600 +Node: Conditional Exp365691 +Node: Function Calls367418 +Node: Precedence371298 +Node: Locales374967 +Node: Expressions Summary376598 +Node: Patterns and Actions379139 +Node: Pattern Overview380255 +Node: Regexp Patterns381932 +Node: Expression Patterns382475 +Node: Ranges386255 +Node: BEGIN/END389361 +Node: Using BEGIN/END390123 +Ref: Using BEGIN/END-Footnote-1392859 +Node: I/O And BEGIN/END392965 +Node: BEGINFILE/ENDFILE395236 +Node: Empty398167 +Node: Using Shell Variables398484 +Node: Action Overview400767 +Node: Statements403094 +Node: If Statement404942 +Node: While Statement406440 +Node: Do Statement408484 +Node: For Statement409640 +Node: Switch Statement412792 +Node: Break Statement415180 +Node: Continue Statement417221 +Node: Next Statement419046 +Node: Nextfile Statement421436 +Node: Exit Statement424093 +Node: Built-in Variables426497 +Node: User-modified427624 +Ref: User-modified-Footnote-1435313 +Node: Auto-set435375 +Ref: Auto-set-Footnote-1447957 +Ref: Auto-set-Footnote-2448162 +Node: ARGC and ARGV448218 +Node: Pattern Action Summary452122 +Node: Arrays454345 +Node: Array Basics455894 +Node: Array Intro456720 +Ref: figure-array-elements458693 +Ref: Array Intro-Footnote-1461217 +Node: Reference to Elements461345 +Node: Assigning Elements463795 +Node: Array Example464286 +Node: Scanning an Array466018 +Node: Controlling Scanning469019 +Ref: Controlling Scanning-Footnote-1474192 +Node: Delete474508 +Ref: Delete-Footnote-1477259 +Node: Numeric Array Subscripts477316 +Node: Uninitialized Subscripts479499 +Node: Multidimensional481126 +Node: Multiscanning484239 +Node: Arrays of Arrays485828 +Node: Arrays Summary490491 +Node: Functions492596 +Node: Built-in493469 +Node: Calling Built-in494547 +Node: Numeric Functions496535 +Ref: Numeric Functions-Footnote-1500569 +Ref: Numeric Functions-Footnote-2500926 +Ref: Numeric Functions-Footnote-3500974 +Node: String Functions501243 +Ref: String Functions-Footnote-1524240 +Ref: String Functions-Footnote-2524369 +Ref: String Functions-Footnote-3524617 +Node: Gory Details524704 +Ref: table-sub-escapes526477 +Ref: table-sub-proposed527997 +Ref: table-posix-sub529361 +Ref: table-gensub-escapes530901 +Ref: Gory Details-Footnote-1532077 +Node: I/O Functions532228 +Ref: I/O Functions-Footnote-1539338 +Node: Time Functions539485 +Ref: Time Functions-Footnote-1549949 +Ref: Time Functions-Footnote-2550017 +Ref: Time Functions-Footnote-3550175 +Ref: Time Functions-Footnote-4550286 +Ref: Time Functions-Footnote-5550398 +Ref: Time Functions-Footnote-6550625 +Node: Bitwise Functions550891 +Ref: table-bitwise-ops551453 +Ref: Bitwise Functions-Footnote-1555698 +Node: Type Functions555882 +Node: I18N Functions557024 +Node: User-defined558669 +Node: Definition Syntax559473 +Ref: Definition Syntax-Footnote-1564786 +Node: Function Example564855 +Ref: Function Example-Footnote-1567495 +Node: Function Caveats567517 +Node: Calling A Function568035 +Node: Variable Scope568990 +Node: Pass By Value/Reference571978 +Node: Return Statement575488 +Node: Dynamic Typing578472 +Node: Indirect Calls579401 +Node: Functions Summary589114 +Node: Library Functions591653 +Ref: Library Functions-Footnote-1595271 +Ref: Library Functions-Footnote-2595414 +Node: Library Names595585 +Ref: Library Names-Footnote-1599058 +Ref: Library Names-Footnote-2599278 +Node: General Functions599364 +Node: Strtonum Function600392 +Node: Assert Function603266 +Node: Round Function606592 +Node: Cliff Random Function608133 +Node: Ordinal Functions609149 +Ref: Ordinal Functions-Footnote-1612214 +Ref: Ordinal Functions-Footnote-2612466 +Node: Join Function612677 +Ref: Join Function-Footnote-1614448 +Node: Getlocaltime Function614648 +Node: Readfile Function618384 +Node: Data File Management620223 +Node: Filetrans Function620855 +Node: Rewind Function624924 +Node: File Checking626482 +Ref: File Checking-Footnote-1627614 +Node: Empty Files627815 +Node: Ignoring Assigns629794 +Node: Getopt Function631348 +Ref: Getopt Function-Footnote-1642612 +Node: Passwd Functions642815 +Ref: Passwd Functions-Footnote-1651794 +Node: Group Functions651882 +Ref: Group Functions-Footnote-1659813 +Node: Walking Arrays660026 +Node: Library Functions Summary661629 +Node: Library Exercises663017 +Node: Sample Programs664297 +Node: Running Examples665067 +Node: Clones665795 +Node: Cut Program667019 +Node: Egrep Program676877 +Ref: Egrep Program-Footnote-1684464 +Node: Id Program684574 +Node: Split Program688228 +Ref: Split Program-Footnote-1691766 +Node: Tee Program691894 +Node: Uniq Program694681 +Node: Wc Program702104 +Ref: Wc Program-Footnote-1706369 +Node: Miscellaneous Programs706461 +Node: Dupword Program707674 +Node: Alarm Program709705 +Node: Translate Program714509 +Ref: Translate Program-Footnote-1718900 +Ref: Translate Program-Footnote-2719170 +Node: Labels Program719309 +Ref: Labels Program-Footnote-1722670 +Node: Word Sorting722754 +Node: History Sorting726797 +Node: Extract Program728633 +Node: Simple Sed736169 +Node: Igawk Program739231 +Ref: Igawk Program-Footnote-1753535 +Ref: Igawk Program-Footnote-2753736 +Node: Anagram Program753874 +Node: Signature Program756942 +Node: Programs Summary758189 +Node: Programs Exercises759404 +Ref: Programs Exercises-Footnote-1763791 +Node: Advanced Features763882 +Node: Nondecimal Data765830 +Node: Array Sorting767407 +Node: Controlling Array Traversal768104 +Node: Array Sorting Functions776384 +Ref: Array Sorting Functions-Footnote-1780291 +Node: Two-way I/O780485 +Ref: Two-way I/O-Footnote-1785429 +Ref: Two-way I/O-Footnote-2785608 +Node: TCP/IP Networking785690 +Node: Profiling788535 +Node: Advanced Features Summary796077 +Node: Internationalization797941 +Node: I18N and L10N799421 +Node: Explaining gettext800107 +Ref: Explaining gettext-Footnote-1805133 +Ref: Explaining gettext-Footnote-2805317 +Node: Programmer i18n805482 +Ref: Programmer i18n-Footnote-1810276 +Node: Translator i18n810325 +Node: String Extraction811119 +Ref: String Extraction-Footnote-1812252 +Node: Printf Ordering812338 +Ref: Printf Ordering-Footnote-1815120 +Node: I18N Portability815184 +Ref: I18N Portability-Footnote-1817633 +Node: I18N Example817696 +Ref: I18N Example-Footnote-1820402 +Node: Gawk I18N820474 +Node: I18N Summary821112 +Node: Debugger822451 +Node: Debugging823473 +Node: Debugging Concepts823914 +Node: Debugging Terms825770 +Node: Awk Debugging828367 +Node: Sample Debugging Session829259 +Node: Debugger Invocation829779 +Node: Finding The Bug831115 +Node: List of Debugger Commands837594 +Node: Breakpoint Control838926 +Node: Debugger Execution Control842590 +Node: Viewing And Changing Data845950 +Node: Execution Stack849308 +Node: Debugger Info850821 +Node: Miscellaneous Debugger Commands854815 +Node: Readline Support859999 +Node: Limitations860891 +Node: Debugging Summary863164 +Node: Arbitrary Precision Arithmetic864332 +Node: Computer Arithmetic865819 +Ref: Computer Arithmetic-Footnote-1870206 +Node: Math Definitions870263 +Ref: table-ieee-formats873552 +Ref: Math Definitions-Footnote-1874092 +Node: MPFR features874195 +Node: FP Math Caution875812 +Ref: FP Math Caution-Footnote-1876862 +Node: Inexactness of computations877231 +Node: Inexact representation878179 +Node: Comparing FP Values879534 +Node: Errors accumulate880498 +Node: Getting Accuracy881931 +Node: Try To Round884590 +Node: Setting precision885489 +Ref: table-predefined-precision-strings886171 +Node: Setting the rounding mode887964 +Ref: table-gawk-rounding-modes888328 +Ref: Setting the rounding mode-Footnote-1891782 +Node: Arbitrary Precision Integers891961 +Ref: Arbitrary Precision Integers-Footnote-1894942 +Node: POSIX Floating Point Problems895091 +Ref: POSIX Floating Point Problems-Footnote-1898967 +Node: Floating point summary899005 +Node: Dynamic Extensions901209 +Node: Extension Intro902761 +Node: Plugin License904026 +Node: Extension Mechanism Outline904711 +Ref: figure-load-extension905135 +Ref: figure-load-new-function906620 +Ref: figure-call-new-function907622 +Node: Extension API Description909606 +Node: Extension API Functions Introduction911056 +Node: General Data Types915923 +Ref: General Data Types-Footnote-1921616 +Node: Requesting Values921915 +Ref: table-value-types-returned922652 +Node: Memory Allocation Functions923610 +Ref: Memory Allocation Functions-Footnote-1926357 +Node: Constructor Functions926453 +Node: Registration Functions928211 +Node: Extension Functions928896 +Node: Exit Callback Functions931198 +Node: Extension Version String932446 +Node: Input Parsers933096 +Node: Output Wrappers942910 +Node: Two-way processors947426 +Node: Printing Messages949630 +Ref: Printing Messages-Footnote-1950707 +Node: Updating `ERRNO'950859 +Node: Accessing Parameters951598 +Node: Symbol Table Access952828 +Node: Symbol table by name953342 +Node: Symbol table by cookie955318 +Ref: Symbol table by cookie-Footnote-1959451 +Node: Cached values959514 +Ref: Cached values-Footnote-1963018 +Node: Array Manipulation963109 +Ref: Array Manipulation-Footnote-1964207 +Node: Array Data Types964246 +Ref: Array Data Types-Footnote-1966949 +Node: Array Functions967041 +Node: Flattening Arrays970915 +Node: Creating Arrays977767 +Node: Extension API Variables982498 +Node: Extension Versioning983134 +Node: Extension API Informational Variables985035 +Node: Extension API Boilerplate986121 +Node: Finding Extensions989925 +Node: Extension Example990485 +Node: Internal File Description991215 +Node: Internal File Ops995306 +Ref: Internal File Ops-Footnote-11006738 +Node: Using Internal File Ops1006878 +Ref: Using Internal File Ops-Footnote-11009225 +Node: Extension Samples1009493 +Node: Extension Sample File Functions1011017 +Node: Extension Sample Fnmatch1018585 +Node: Extension Sample Fork1020067 +Node: Extension Sample Inplace1021280 +Node: Extension Sample Ord1022955 +Node: Extension Sample Readdir1023791 +Ref: table-readdir-file-types1024647 +Node: Extension Sample Revout1025446 +Node: Extension Sample Rev2way1026037 +Node: Extension Sample Read write array1026778 +Node: Extension Sample Readfile1028657 +Node: Extension Sample API Tests1029757 +Node: Extension Sample Time1030282 +Node: gawkextlib1031597 +Node: Extension summary1034410 +Node: Extension Exercises1038103 +Node: Language History1038825 +Node: V7/SVR3.11040468 +Node: SVR41042788 +Node: POSIX1044230 +Node: BTL1045616 +Node: POSIX/GNU1046350 +Node: Feature History1052066 +Node: Common Extensions1065157 +Node: Ranges and Locales1066469 +Ref: Ranges and Locales-Footnote-11071086 +Ref: Ranges and Locales-Footnote-21071113 +Ref: Ranges and Locales-Footnote-31071347 +Node: Contributors1071568 +Node: History summary1076993 +Node: Installation1078362 +Node: Gawk Distribution1079313 +Node: Getting1079797 +Node: Extracting1080621 +Node: Distribution contents1082263 +Node: Unix Installation1087980 +Node: Quick Installation1088597 +Node: Additional Configuration Options1091039 +Node: Configuration Philosophy1092777 +Node: Non-Unix Installation1095128 +Node: PC Installation1095586 +Node: PC Binary Installation1096897 +Node: PC Compiling1098745 +Ref: PC Compiling-Footnote-11101744 +Node: PC Testing1101849 +Node: PC Using1103025 +Node: Cygwin1107177 +Node: MSYS1107986 +Node: VMS Installation1108500 +Node: VMS Compilation1109296 +Ref: VMS Compilation-Footnote-11110518 +Node: VMS Dynamic Extensions1110576 +Node: VMS Installation Details1111949 +Node: VMS Running1114201 +Node: VMS GNV1117035 +Node: VMS Old Gawk1117758 +Node: Bugs1118228 +Node: Other Versions1122232 +Node: Installation summary1128459 +Node: Notes1129515 +Node: Compatibility Mode1130380 +Node: Additions1131162 +Node: Accessing The Source1132087 +Node: Adding Code1133523 +Node: New Ports1139701 +Node: Derived Files1144182 +Ref: Derived Files-Footnote-11149263 +Ref: Derived Files-Footnote-21149297 +Ref: Derived Files-Footnote-31149893 +Node: Future Extensions1150007 +Node: Implementation Limitations1150613 +Node: Extension Design1151861 +Node: Old Extension Problems1153015 +Ref: Old Extension Problems-Footnote-11154532 +Node: Extension New Mechanism Goals1154589 +Ref: Extension New Mechanism Goals-Footnote-11157949 +Node: Extension Other Design Decisions1158138 +Node: Extension Future Growth1160244 +Node: Old Extension Mechanism1161080 +Node: Notes summary1162842 +Node: Basic Concepts1164028 +Node: Basic High Level1164709 +Ref: figure-general-flow1164981 +Ref: figure-process-flow1165580 +Ref: Basic High Level-Footnote-11168809 +Node: Basic Data Typing1168994 +Node: Glossary1172322 +Node: Copying1197474 +Node: GNU Free Documentation License1235030 +Node: Index1260166  End Tag Table -- cgit v1.2.3 From 611353597e20081bd0c72617e24fa5ff4c63dac1 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 4 Sep 2014 09:38:08 +0300 Subject: Make indirect calls work on built-in and extension functions. --- doc/gawk.info | 600 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 303 insertions(+), 297 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 1e6e93f5..f008ecfa 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -13853,7 +13853,7 @@ File: gawk.info, Node: Indirect Calls, Next: Functions Summary, Prev: User-de 9.3 Indirect Function Calls =========================== -This section describes a `gawk'-specific extension. +This section describes an advanced, `gawk'-specific extension. Often, you may wish to defer the choice of function to call until runtime. For example, you may have different kinds of records, each of @@ -13892,7 +13892,7 @@ your test scores: This style of programming works, but can be awkward. With "indirect" function calls, you tell `gawk' to use the _value_ of a variable as the -name of the function to call. +_name_ of the function to call. The syntax is similar to that of a regular function call: an identifier immediately followed by a left parenthesis, any arguments, @@ -13934,7 +13934,6 @@ using indirect function calls. Otherwise they perform the expected computations and are not unusual. # For each record, print the class name and the requested statistics - { class_name = $1 gsub(/_/, " ", class_name) # Replace _ with spaces @@ -14121,11 +14120,11 @@ names of the two comparison functions: Remember that you must supply a leading `@' in front of an indirect function call. - Unfortunately, indirect function calls cannot be used with the -built-in functions. However, you can generally write "wrapper" -functions which call the built-in ones, and those can be called -indirectly. (Other than, perhaps, the mathematical functions, there is -not a lot of reason to try to call the built-in functions indirectly.) + Starting with version 4.1.2 of `gawk', indirect function calls may +also be used with built-in functions and with extension functions +(*note Dynamic Extensions::). The only thing you cannot do is pass a +regular expression constant to a built-in function through an indirect +function call.(1) `gawk' does its best to make indirect function calls efficient. For example, in the following case: @@ -14133,7 +14132,12 @@ example, in the following case: for (i = 1; i <= n; i++) @the_func() -`gawk' will look up the actual function to call only once. +`gawk' looks up the actual function to call only once. + + ---------- Footnotes ---------- + + (1) This may change in a future version; recheck the documentation +that comes with your version of `gawk' to see if it has.  File: gawk.info, Node: Functions Summary, Prev: Indirect Calls, Up: Functions @@ -14170,7 +14174,9 @@ File: gawk.info, Node: Functions Summary, Prev: Indirect Calls, Up: Functions * User-defined functions may call other user-defined (and built-in) functions and may call themselves recursively. Function parameters - "hide" any global variables of the same names. + "hide" any global variables of the same names. You cannot use the + name of a reserved variable (such as `ARGC') as the name of a + parameter in user-defined functions. * Scalar values are passed to user-defined functions by value. Array parameters are passed by reference; any changes made by the @@ -14186,10 +14192,9 @@ File: gawk.info, Node: Functions Summary, Prev: Indirect Calls, Up: Functions either scalar or array. * `gawk' provides indirect function calls using a special syntax. - By setting a variable to the name of a user-defined function, you - can determine at runtime what function will be called at that - point in the program. This is equivalent to function pointers in C - and C++. + By setting a variable to the name of a function, you can determine + at runtime what function will be called at that point in the + program. This is equivalent to function pointers in C and C++.  @@ -34292,288 +34297,289 @@ Node: Pass By Value/Reference571978 Node: Return Statement575488 Node: Dynamic Typing578472 Node: Indirect Calls579401 -Node: Functions Summary589114 -Node: Library Functions591653 -Ref: Library Functions-Footnote-1595271 -Ref: Library Functions-Footnote-2595414 -Node: Library Names595585 -Ref: Library Names-Footnote-1599058 -Ref: Library Names-Footnote-2599278 -Node: General Functions599364 -Node: Strtonum Function600392 -Node: Assert Function603266 -Node: Round Function606592 -Node: Cliff Random Function608133 -Node: Ordinal Functions609149 -Ref: Ordinal Functions-Footnote-1612214 -Ref: Ordinal Functions-Footnote-2612466 -Node: Join Function612677 -Ref: Join Function-Footnote-1614448 -Node: Getlocaltime Function614648 -Node: Readfile Function618384 -Node: Data File Management620223 -Node: Filetrans Function620855 -Node: Rewind Function624924 -Node: File Checking626482 -Ref: File Checking-Footnote-1627614 -Node: Empty Files627815 -Node: Ignoring Assigns629794 -Node: Getopt Function631348 -Ref: Getopt Function-Footnote-1642612 -Node: Passwd Functions642815 -Ref: Passwd Functions-Footnote-1651794 -Node: Group Functions651882 -Ref: Group Functions-Footnote-1659813 -Node: Walking Arrays660026 -Node: Library Functions Summary661629 -Node: Library Exercises663017 -Node: Sample Programs664297 -Node: Running Examples665067 -Node: Clones665795 -Node: Cut Program667019 -Node: Egrep Program676877 -Ref: Egrep Program-Footnote-1684464 -Node: Id Program684574 -Node: Split Program688228 -Ref: Split Program-Footnote-1691766 -Node: Tee Program691894 -Node: Uniq Program694681 -Node: Wc Program702104 -Ref: Wc Program-Footnote-1706369 -Node: Miscellaneous Programs706461 -Node: Dupword Program707674 -Node: Alarm Program709705 -Node: Translate Program714509 -Ref: Translate Program-Footnote-1718900 -Ref: Translate Program-Footnote-2719170 -Node: Labels Program719309 -Ref: Labels Program-Footnote-1722670 -Node: Word Sorting722754 -Node: History Sorting726797 -Node: Extract Program728633 -Node: Simple Sed736169 -Node: Igawk Program739231 -Ref: Igawk Program-Footnote-1753535 -Ref: Igawk Program-Footnote-2753736 -Node: Anagram Program753874 -Node: Signature Program756942 -Node: Programs Summary758189 -Node: Programs Exercises759404 -Ref: Programs Exercises-Footnote-1763791 -Node: Advanced Features763882 -Node: Nondecimal Data765830 -Node: Array Sorting767407 -Node: Controlling Array Traversal768104 -Node: Array Sorting Functions776384 -Ref: Array Sorting Functions-Footnote-1780291 -Node: Two-way I/O780485 -Ref: Two-way I/O-Footnote-1785429 -Ref: Two-way I/O-Footnote-2785608 -Node: TCP/IP Networking785690 -Node: Profiling788535 -Node: Advanced Features Summary796077 -Node: Internationalization797941 -Node: I18N and L10N799421 -Node: Explaining gettext800107 -Ref: Explaining gettext-Footnote-1805133 -Ref: Explaining gettext-Footnote-2805317 -Node: Programmer i18n805482 -Ref: Programmer i18n-Footnote-1810276 -Node: Translator i18n810325 -Node: String Extraction811119 -Ref: String Extraction-Footnote-1812252 -Node: Printf Ordering812338 -Ref: Printf Ordering-Footnote-1815120 -Node: I18N Portability815184 -Ref: I18N Portability-Footnote-1817633 -Node: I18N Example817696 -Ref: I18N Example-Footnote-1820402 -Node: Gawk I18N820474 -Node: I18N Summary821112 -Node: Debugger822451 -Node: Debugging823473 -Node: Debugging Concepts823914 -Node: Debugging Terms825770 -Node: Awk Debugging828367 -Node: Sample Debugging Session829259 -Node: Debugger Invocation829779 -Node: Finding The Bug831115 -Node: List of Debugger Commands837594 -Node: Breakpoint Control838926 -Node: Debugger Execution Control842590 -Node: Viewing And Changing Data845950 -Node: Execution Stack849308 -Node: Debugger Info850821 -Node: Miscellaneous Debugger Commands854815 -Node: Readline Support859999 -Node: Limitations860891 -Node: Debugging Summary863164 -Node: Arbitrary Precision Arithmetic864332 -Node: Computer Arithmetic865819 -Ref: Computer Arithmetic-Footnote-1870206 -Node: Math Definitions870263 -Ref: table-ieee-formats873552 -Ref: Math Definitions-Footnote-1874092 -Node: MPFR features874195 -Node: FP Math Caution875812 -Ref: FP Math Caution-Footnote-1876862 -Node: Inexactness of computations877231 -Node: Inexact representation878179 -Node: Comparing FP Values879534 -Node: Errors accumulate880498 -Node: Getting Accuracy881931 -Node: Try To Round884590 -Node: Setting precision885489 -Ref: table-predefined-precision-strings886171 -Node: Setting the rounding mode887964 -Ref: table-gawk-rounding-modes888328 -Ref: Setting the rounding mode-Footnote-1891782 -Node: Arbitrary Precision Integers891961 -Ref: Arbitrary Precision Integers-Footnote-1894942 -Node: POSIX Floating Point Problems895091 -Ref: POSIX Floating Point Problems-Footnote-1898967 -Node: Floating point summary899005 -Node: Dynamic Extensions901209 -Node: Extension Intro902761 -Node: Plugin License904026 -Node: Extension Mechanism Outline904711 -Ref: figure-load-extension905135 -Ref: figure-load-new-function906620 -Ref: figure-call-new-function907622 -Node: Extension API Description909606 -Node: Extension API Functions Introduction911056 -Node: General Data Types915923 -Ref: General Data Types-Footnote-1921616 -Node: Requesting Values921915 -Ref: table-value-types-returned922652 -Node: Memory Allocation Functions923610 -Ref: Memory Allocation Functions-Footnote-1926357 -Node: Constructor Functions926453 -Node: Registration Functions928211 -Node: Extension Functions928896 -Node: Exit Callback Functions931198 -Node: Extension Version String932446 -Node: Input Parsers933096 -Node: Output Wrappers942910 -Node: Two-way processors947426 -Node: Printing Messages949630 -Ref: Printing Messages-Footnote-1950707 -Node: Updating `ERRNO'950859 -Node: Accessing Parameters951598 -Node: Symbol Table Access952828 -Node: Symbol table by name953342 -Node: Symbol table by cookie955318 -Ref: Symbol table by cookie-Footnote-1959451 -Node: Cached values959514 -Ref: Cached values-Footnote-1963018 -Node: Array Manipulation963109 -Ref: Array Manipulation-Footnote-1964207 -Node: Array Data Types964246 -Ref: Array Data Types-Footnote-1966949 -Node: Array Functions967041 -Node: Flattening Arrays970915 -Node: Creating Arrays977767 -Node: Extension API Variables982498 -Node: Extension Versioning983134 -Node: Extension API Informational Variables985035 -Node: Extension API Boilerplate986121 -Node: Finding Extensions989925 -Node: Extension Example990485 -Node: Internal File Description991215 -Node: Internal File Ops995306 -Ref: Internal File Ops-Footnote-11006738 -Node: Using Internal File Ops1006878 -Ref: Using Internal File Ops-Footnote-11009225 -Node: Extension Samples1009493 -Node: Extension Sample File Functions1011017 -Node: Extension Sample Fnmatch1018585 -Node: Extension Sample Fork1020067 -Node: Extension Sample Inplace1021280 -Node: Extension Sample Ord1022955 -Node: Extension Sample Readdir1023791 -Ref: table-readdir-file-types1024647 -Node: Extension Sample Revout1025446 -Node: Extension Sample Rev2way1026037 -Node: Extension Sample Read write array1026778 -Node: Extension Sample Readfile1028657 -Node: Extension Sample API Tests1029757 -Node: Extension Sample Time1030282 -Node: gawkextlib1031597 -Node: Extension summary1034410 -Node: Extension Exercises1038103 -Node: Language History1038825 -Node: V7/SVR3.11040468 -Node: SVR41042788 -Node: POSIX1044230 -Node: BTL1045616 -Node: POSIX/GNU1046350 -Node: Feature History1052066 -Node: Common Extensions1065157 -Node: Ranges and Locales1066469 -Ref: Ranges and Locales-Footnote-11071086 -Ref: Ranges and Locales-Footnote-21071113 -Ref: Ranges and Locales-Footnote-31071347 -Node: Contributors1071568 -Node: History summary1076993 -Node: Installation1078362 -Node: Gawk Distribution1079313 -Node: Getting1079797 -Node: Extracting1080621 -Node: Distribution contents1082263 -Node: Unix Installation1087980 -Node: Quick Installation1088597 -Node: Additional Configuration Options1091039 -Node: Configuration Philosophy1092777 -Node: Non-Unix Installation1095128 -Node: PC Installation1095586 -Node: PC Binary Installation1096897 -Node: PC Compiling1098745 -Ref: PC Compiling-Footnote-11101744 -Node: PC Testing1101849 -Node: PC Using1103025 -Node: Cygwin1107177 -Node: MSYS1107986 -Node: VMS Installation1108500 -Node: VMS Compilation1109296 -Ref: VMS Compilation-Footnote-11110518 -Node: VMS Dynamic Extensions1110576 -Node: VMS Installation Details1111949 -Node: VMS Running1114201 -Node: VMS GNV1117035 -Node: VMS Old Gawk1117758 -Node: Bugs1118228 -Node: Other Versions1122232 -Node: Installation summary1128459 -Node: Notes1129515 -Node: Compatibility Mode1130380 -Node: Additions1131162 -Node: Accessing The Source1132087 -Node: Adding Code1133523 -Node: New Ports1139701 -Node: Derived Files1144182 -Ref: Derived Files-Footnote-11149263 -Ref: Derived Files-Footnote-21149297 -Ref: Derived Files-Footnote-31149893 -Node: Future Extensions1150007 -Node: Implementation Limitations1150613 -Node: Extension Design1151861 -Node: Old Extension Problems1153015 -Ref: Old Extension Problems-Footnote-11154532 -Node: Extension New Mechanism Goals1154589 -Ref: Extension New Mechanism Goals-Footnote-11157949 -Node: Extension Other Design Decisions1158138 -Node: Extension Future Growth1160244 -Node: Old Extension Mechanism1161080 -Node: Notes summary1162842 -Node: Basic Concepts1164028 -Node: Basic High Level1164709 -Ref: figure-general-flow1164981 -Ref: figure-process-flow1165580 -Ref: Basic High Level-Footnote-11168809 -Node: Basic Data Typing1168994 -Node: Glossary1172322 -Node: Copying1197474 -Node: GNU Free Documentation License1235030 -Node: Index1260166 +Ref: Indirect Calls-Footnote-1589117 +Node: Functions Summary589245 +Node: Library Functions591895 +Ref: Library Functions-Footnote-1595513 +Ref: Library Functions-Footnote-2595656 +Node: Library Names595827 +Ref: Library Names-Footnote-1599300 +Ref: Library Names-Footnote-2599520 +Node: General Functions599606 +Node: Strtonum Function600634 +Node: Assert Function603508 +Node: Round Function606834 +Node: Cliff Random Function608375 +Node: Ordinal Functions609391 +Ref: Ordinal Functions-Footnote-1612456 +Ref: Ordinal Functions-Footnote-2612708 +Node: Join Function612919 +Ref: Join Function-Footnote-1614690 +Node: Getlocaltime Function614890 +Node: Readfile Function618626 +Node: Data File Management620465 +Node: Filetrans Function621097 +Node: Rewind Function625166 +Node: File Checking626724 +Ref: File Checking-Footnote-1627856 +Node: Empty Files628057 +Node: Ignoring Assigns630036 +Node: Getopt Function631590 +Ref: Getopt Function-Footnote-1642854 +Node: Passwd Functions643057 +Ref: Passwd Functions-Footnote-1652036 +Node: Group Functions652124 +Ref: Group Functions-Footnote-1660055 +Node: Walking Arrays660268 +Node: Library Functions Summary661871 +Node: Library Exercises663259 +Node: Sample Programs664539 +Node: Running Examples665309 +Node: Clones666037 +Node: Cut Program667261 +Node: Egrep Program677119 +Ref: Egrep Program-Footnote-1684706 +Node: Id Program684816 +Node: Split Program688470 +Ref: Split Program-Footnote-1692008 +Node: Tee Program692136 +Node: Uniq Program694923 +Node: Wc Program702346 +Ref: Wc Program-Footnote-1706611 +Node: Miscellaneous Programs706703 +Node: Dupword Program707916 +Node: Alarm Program709947 +Node: Translate Program714751 +Ref: Translate Program-Footnote-1719142 +Ref: Translate Program-Footnote-2719412 +Node: Labels Program719551 +Ref: Labels Program-Footnote-1722912 +Node: Word Sorting722996 +Node: History Sorting727039 +Node: Extract Program728875 +Node: Simple Sed736411 +Node: Igawk Program739473 +Ref: Igawk Program-Footnote-1753777 +Ref: Igawk Program-Footnote-2753978 +Node: Anagram Program754116 +Node: Signature Program757184 +Node: Programs Summary758431 +Node: Programs Exercises759646 +Ref: Programs Exercises-Footnote-1764033 +Node: Advanced Features764124 +Node: Nondecimal Data766072 +Node: Array Sorting767649 +Node: Controlling Array Traversal768346 +Node: Array Sorting Functions776626 +Ref: Array Sorting Functions-Footnote-1780533 +Node: Two-way I/O780727 +Ref: Two-way I/O-Footnote-1785671 +Ref: Two-way I/O-Footnote-2785850 +Node: TCP/IP Networking785932 +Node: Profiling788777 +Node: Advanced Features Summary796319 +Node: Internationalization798183 +Node: I18N and L10N799663 +Node: Explaining gettext800349 +Ref: Explaining gettext-Footnote-1805375 +Ref: Explaining gettext-Footnote-2805559 +Node: Programmer i18n805724 +Ref: Programmer i18n-Footnote-1810518 +Node: Translator i18n810567 +Node: String Extraction811361 +Ref: String Extraction-Footnote-1812494 +Node: Printf Ordering812580 +Ref: Printf Ordering-Footnote-1815362 +Node: I18N Portability815426 +Ref: I18N Portability-Footnote-1817875 +Node: I18N Example817938 +Ref: I18N Example-Footnote-1820644 +Node: Gawk I18N820716 +Node: I18N Summary821354 +Node: Debugger822693 +Node: Debugging823715 +Node: Debugging Concepts824156 +Node: Debugging Terms826012 +Node: Awk Debugging828609 +Node: Sample Debugging Session829501 +Node: Debugger Invocation830021 +Node: Finding The Bug831357 +Node: List of Debugger Commands837836 +Node: Breakpoint Control839168 +Node: Debugger Execution Control842832 +Node: Viewing And Changing Data846192 +Node: Execution Stack849550 +Node: Debugger Info851063 +Node: Miscellaneous Debugger Commands855057 +Node: Readline Support860241 +Node: Limitations861133 +Node: Debugging Summary863406 +Node: Arbitrary Precision Arithmetic864574 +Node: Computer Arithmetic866061 +Ref: Computer Arithmetic-Footnote-1870448 +Node: Math Definitions870505 +Ref: table-ieee-formats873794 +Ref: Math Definitions-Footnote-1874334 +Node: MPFR features874437 +Node: FP Math Caution876054 +Ref: FP Math Caution-Footnote-1877104 +Node: Inexactness of computations877473 +Node: Inexact representation878421 +Node: Comparing FP Values879776 +Node: Errors accumulate880740 +Node: Getting Accuracy882173 +Node: Try To Round884832 +Node: Setting precision885731 +Ref: table-predefined-precision-strings886413 +Node: Setting the rounding mode888206 +Ref: table-gawk-rounding-modes888570 +Ref: Setting the rounding mode-Footnote-1892024 +Node: Arbitrary Precision Integers892203 +Ref: Arbitrary Precision Integers-Footnote-1895184 +Node: POSIX Floating Point Problems895333 +Ref: POSIX Floating Point Problems-Footnote-1899209 +Node: Floating point summary899247 +Node: Dynamic Extensions901451 +Node: Extension Intro903003 +Node: Plugin License904268 +Node: Extension Mechanism Outline904953 +Ref: figure-load-extension905377 +Ref: figure-load-new-function906862 +Ref: figure-call-new-function907864 +Node: Extension API Description909848 +Node: Extension API Functions Introduction911298 +Node: General Data Types916165 +Ref: General Data Types-Footnote-1921858 +Node: Requesting Values922157 +Ref: table-value-types-returned922894 +Node: Memory Allocation Functions923852 +Ref: Memory Allocation Functions-Footnote-1926599 +Node: Constructor Functions926695 +Node: Registration Functions928453 +Node: Extension Functions929138 +Node: Exit Callback Functions931440 +Node: Extension Version String932688 +Node: Input Parsers933338 +Node: Output Wrappers943152 +Node: Two-way processors947668 +Node: Printing Messages949872 +Ref: Printing Messages-Footnote-1950949 +Node: Updating `ERRNO'951101 +Node: Accessing Parameters951840 +Node: Symbol Table Access953070 +Node: Symbol table by name953584 +Node: Symbol table by cookie955560 +Ref: Symbol table by cookie-Footnote-1959693 +Node: Cached values959756 +Ref: Cached values-Footnote-1963260 +Node: Array Manipulation963351 +Ref: Array Manipulation-Footnote-1964449 +Node: Array Data Types964488 +Ref: Array Data Types-Footnote-1967191 +Node: Array Functions967283 +Node: Flattening Arrays971157 +Node: Creating Arrays978009 +Node: Extension API Variables982740 +Node: Extension Versioning983376 +Node: Extension API Informational Variables985277 +Node: Extension API Boilerplate986363 +Node: Finding Extensions990167 +Node: Extension Example990727 +Node: Internal File Description991457 +Node: Internal File Ops995548 +Ref: Internal File Ops-Footnote-11006980 +Node: Using Internal File Ops1007120 +Ref: Using Internal File Ops-Footnote-11009467 +Node: Extension Samples1009735 +Node: Extension Sample File Functions1011259 +Node: Extension Sample Fnmatch1018827 +Node: Extension Sample Fork1020309 +Node: Extension Sample Inplace1021522 +Node: Extension Sample Ord1023197 +Node: Extension Sample Readdir1024033 +Ref: table-readdir-file-types1024889 +Node: Extension Sample Revout1025688 +Node: Extension Sample Rev2way1026279 +Node: Extension Sample Read write array1027020 +Node: Extension Sample Readfile1028899 +Node: Extension Sample API Tests1029999 +Node: Extension Sample Time1030524 +Node: gawkextlib1031839 +Node: Extension summary1034652 +Node: Extension Exercises1038345 +Node: Language History1039067 +Node: V7/SVR3.11040710 +Node: SVR41043030 +Node: POSIX1044472 +Node: BTL1045858 +Node: POSIX/GNU1046592 +Node: Feature History1052308 +Node: Common Extensions1065399 +Node: Ranges and Locales1066711 +Ref: Ranges and Locales-Footnote-11071328 +Ref: Ranges and Locales-Footnote-21071355 +Ref: Ranges and Locales-Footnote-31071589 +Node: Contributors1071810 +Node: History summary1077235 +Node: Installation1078604 +Node: Gawk Distribution1079555 +Node: Getting1080039 +Node: Extracting1080863 +Node: Distribution contents1082505 +Node: Unix Installation1088222 +Node: Quick Installation1088839 +Node: Additional Configuration Options1091281 +Node: Configuration Philosophy1093019 +Node: Non-Unix Installation1095370 +Node: PC Installation1095828 +Node: PC Binary Installation1097139 +Node: PC Compiling1098987 +Ref: PC Compiling-Footnote-11101986 +Node: PC Testing1102091 +Node: PC Using1103267 +Node: Cygwin1107419 +Node: MSYS1108228 +Node: VMS Installation1108742 +Node: VMS Compilation1109538 +Ref: VMS Compilation-Footnote-11110760 +Node: VMS Dynamic Extensions1110818 +Node: VMS Installation Details1112191 +Node: VMS Running1114443 +Node: VMS GNV1117277 +Node: VMS Old Gawk1118000 +Node: Bugs1118470 +Node: Other Versions1122474 +Node: Installation summary1128701 +Node: Notes1129757 +Node: Compatibility Mode1130622 +Node: Additions1131404 +Node: Accessing The Source1132329 +Node: Adding Code1133765 +Node: New Ports1139943 +Node: Derived Files1144424 +Ref: Derived Files-Footnote-11149505 +Ref: Derived Files-Footnote-21149539 +Ref: Derived Files-Footnote-31150135 +Node: Future Extensions1150249 +Node: Implementation Limitations1150855 +Node: Extension Design1152103 +Node: Old Extension Problems1153257 +Ref: Old Extension Problems-Footnote-11154774 +Node: Extension New Mechanism Goals1154831 +Ref: Extension New Mechanism Goals-Footnote-11158191 +Node: Extension Other Design Decisions1158380 +Node: Extension Future Growth1160486 +Node: Old Extension Mechanism1161322 +Node: Notes summary1163084 +Node: Basic Concepts1164270 +Node: Basic High Level1164951 +Ref: figure-general-flow1165223 +Ref: figure-process-flow1165822 +Ref: Basic High Level-Footnote-11169051 +Node: Basic Data Typing1169236 +Node: Glossary1172564 +Node: Copying1197716 +Node: GNU Free Documentation License1235272 +Node: Index1260408  End Tag Table -- cgit v1.2.3 From 0f5cb955662136ad4a93e35db5721dd986dfd55b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 5 Sep 2014 11:21:38 +0300 Subject: Add builtin functions to FUNCTAB and PROCINFO["identifiers"] and doc. --- doc/gawk.info | 776 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 390 insertions(+), 386 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index f008ecfa..0d7505a5 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -10269,7 +10269,8 @@ Options::), they are not special. `FUNCTAB #' An array whose indices and corresponding values are the names of - all the user-defined or extension functions in the program. + all the built-in, user-defined and extension functions in the + program. NOTE: Attempting to use the `delete' statement with the `FUNCTAB' array causes a fatal error. Any attempt to assign @@ -10305,9 +10306,12 @@ Options::), they are not special. `"array"' The identifier is an array. + `"builtin"' + The identifier is a built-in function. + `"extension"' The identifier is an extension function loaded via - `@load'. + `@load' or `-l'. `"scalar"' The identifier is a scalar. @@ -31836,7 +31840,7 @@ Index (line 46) * dark corner, FILENAME variable <1>: Auto-set. (line 90) * dark corner, FILENAME variable: Getline Notes. (line 19) -* dark corner, FNR/NR variables: Auto-set. (line 301) +* dark corner, FNR/NR variables: Auto-set. (line 305) * dark corner, format-control characters: Control Letters. (line 18) * dark corner, FS as null string: Single Character Fields. (line 20) @@ -32050,7 +32054,7 @@ Index (line 260) * differences in awk and gawk, print/printf statements: Format Modifiers. (line 13) -* differences in awk and gawk, PROCINFO array: Auto-set. (line 128) +* differences in awk and gawk, PROCINFO array: Auto-set. (line 129) * differences in awk and gawk, read timeouts: Read Timeout. (line 6) * differences in awk and gawk, record separators: awk split records. (line 124) @@ -32060,7 +32064,7 @@ Index (line 26) * differences in awk and gawk, RS/RT variables: gawk split records. (line 58) -* differences in awk and gawk, RT variable: Auto-set. (line 257) +* differences in awk and gawk, RT variable: Auto-set. (line 261) * differences in awk and gawk, single-character fields: Single Character Fields. (line 6) * differences in awk and gawk, split() function: String Functions. @@ -32068,7 +32072,7 @@ Index * differences in awk and gawk, strings: Scalar Constants. (line 20) * differences in awk and gawk, strings, storing: gawk split records. (line 77) -* differences in awk and gawk, SYMTAB variable: Auto-set. (line 261) +* differences in awk and gawk, SYMTAB variable: Auto-set. (line 265) * differences in awk and gawk, TEXTDOMAIN variable: User-modified. (line 152) * differences in awk and gawk, trunc-mod operation: Arithmetic Ops. @@ -32107,8 +32111,8 @@ Index * dynamically loaded extensions: Dynamic Extensions. (line 6) * e debugger command (alias for enable): Breakpoint Control. (line 73) * EBCDIC: Ordinal Functions. (line 45) -* effective group ID of gawk user: Auto-set. (line 133) -* effective user ID of gawk user: Auto-set. (line 137) +* effective group ID of gawk user: Auto-set. (line 134) +* effective user ID of gawk user: Auto-set. (line 138) * egrep utility <1>: Egrep Program. (line 6) * egrep utility: Bracket Expressions. (line 26) * egrep.awk program: Egrep Program. (line 54) @@ -32223,7 +32227,7 @@ Index (line 6) * extension API version: Extension Versioning. (line 6) -* extension API, version number: Auto-set. (line 224) +* extension API, version number: Auto-set. (line 228) * extension example: Extension Example. (line 6) * extension registration: Registration Functions. (line 6) @@ -32375,7 +32379,7 @@ Index (line 12) * FNR variable <1>: Auto-set. (line 99) * FNR variable: Records. (line 6) -* FNR variable, changing: Auto-set. (line 301) +* FNR variable, changing: Auto-set. (line 305) * for statement: For Statement. (line 6) * for statement, looping over arrays: Scanning an Array. (line 20) * fork() extension function: Extension Sample Fork. @@ -32476,7 +32480,7 @@ Index * G-d: Acknowledgments. (line 92) * Garfinkle, Scott: Contributors. (line 34) * gawk program, dynamic profiling: Profiling. (line 179) -* gawk version: Auto-set. (line 199) +* gawk version: Auto-set. (line 203) * gawk, ARGIND variable in: Other Arguments. (line 12) * gawk, awk and <1>: This Manual. (line 14) * gawk, awk and: Preface. (line 21) @@ -32545,7 +32549,7 @@ Index * gawk, OS/2 version of: PC Using. (line 16) * gawk, PROCINFO array in <1>: Two-way I/O. (line 99) * gawk, PROCINFO array in <2>: Time Functions. (line 47) -* gawk, PROCINFO array in: Auto-set. (line 128) +* gawk, PROCINFO array in: Auto-set. (line 129) * gawk, regexp constants and: Using Constant Regexps. (line 28) * gawk, regular expressions, case sensitivity: Case-sensitivity. @@ -32553,14 +32557,14 @@ Index * gawk, regular expressions, operators: GNU Regexp Operators. (line 6) * gawk, regular expressions, precedence: Regexp Operators. (line 161) -* gawk, RT variable in <1>: Auto-set. (line 257) +* gawk, RT variable in <1>: Auto-set. (line 261) * gawk, RT variable in <2>: Multiple Line. (line 129) * gawk, RT variable in: awk split records. (line 124) * gawk, See Also awk: Preface. (line 34) * gawk, source code, obtaining: Getting. (line 6) * gawk, splitting fields and: Constant Size. (line 88) * gawk, string-translation functions: I18N Functions. (line 6) -* gawk, SYMTAB array in: Auto-set. (line 261) +* gawk, SYMTAB array in: Auto-set. (line 265) * gawk, TEXTDOMAIN variable in: User-modified. (line 152) * gawk, timestamps: Time Functions. (line 6) * gawk, uses for: Preface. (line 34) @@ -32646,7 +32650,7 @@ Index * Grigera, Juan: Contributors. (line 57) * group database, reading: Group Functions. (line 6) * group file: Group Functions. (line 6) -* group ID of gawk user: Auto-set. (line 172) +* group ID of gawk user: Auto-set. (line 176) * groups, information about: Group Functions. (line 6) * gsub <1>: String Functions. (line 139) * gsub: Using Constant Regexps. @@ -32940,7 +32944,7 @@ Index * mawk utility <3>: Concatenation. (line 36) * mawk utility <4>: Getline/Pipe. (line 62) * mawk utility: Escape Sequences. (line 130) -* maximum precision supported by MPFR library: Auto-set. (line 213) +* maximum precision supported by MPFR library: Auto-set. (line 217) * McIlroy, Doug: Glossary. (line 149) * McPhee, Patrick: Contributors. (line 100) * message object files: Explaining gettext. (line 42) @@ -32953,7 +32957,7 @@ Index * messages from extensions: Printing Messages. (line 6) * metacharacters in regular expressions: Regexp Operators. (line 6) * metacharacters, escape sequences for: Escape Sequences. (line 136) -* minimum precision supported by MPFR library: Auto-set. (line 216) +* minimum precision supported by MPFR library: Auto-set. (line 220) * mktime: Time Functions. (line 25) * modifiers, in format specifiers: Format Modifiers. (line 6) * monetary information, localization: Explaining gettext. (line 104) @@ -33013,9 +33017,9 @@ Index * non-existent array elements: Reference to Elements. (line 23) * not Boolean-logic operator: Boolean Ops. (line 6) -* NR variable <1>: Auto-set. (line 123) +* NR variable <1>: Auto-set. (line 124) * NR variable: Records. (line 6) -* NR variable, changing: Auto-set. (line 301) +* NR variable, changing: Auto-set. (line 305) * null strings <1>: Basic Data Typing. (line 26) * null strings <2>: Truth Values. (line 6) * null strings <3>: Regexp Field Splitting. @@ -33129,7 +33133,7 @@ Index * p debugger command (alias for print): Viewing And Changing Data. (line 36) * Papadopoulos, Panos: Contributors. (line 128) -* parent process ID of gawk process: Auto-set. (line 181) +* parent process ID of gawk process: Auto-set. (line 185) * parentheses (), in a profile: Profiling. (line 146) * parentheses (), regexp operator: Regexp Operators. (line 81) * password file: Passwd Functions. (line 16) @@ -33292,24 +33296,24 @@ Index * printing, unduplicated lines of text: Uniq Program. (line 6) * printing, user information: Id Program. (line 6) * private variables: Library Names. (line 11) -* process group idIDof gawk process: Auto-set. (line 175) -* process ID of gawk process: Auto-set. (line 178) +* process group idIDof gawk process: Auto-set. (line 179) +* process ID of gawk process: Auto-set. (line 182) * processes, two-way communications with: Two-way I/O. (line 6) * processing data: Basic High Level. (line 6) * PROCINFO array <1>: Passwd Functions. (line 6) * PROCINFO array <2>: Time Functions. (line 47) -* PROCINFO array: Auto-set. (line 128) +* PROCINFO array: Auto-set. (line 129) * PROCINFO array, and communications via ptys: Two-way I/O. (line 99) * PROCINFO array, and group membership: Group Functions. (line 6) * PROCINFO array, and user and group ID numbers: Id Program. (line 15) * PROCINFO array, testing the field splitting: Passwd Functions. (line 161) -* PROCINFO array, uses: Auto-set. (line 234) +* PROCINFO array, uses: Auto-set. (line 238) * PROCINFO, values of sorted_in: Controlling Scanning. (line 26) * profiling awk programs: Profiling. (line 6) * profiling awk programs, dynamically: Profiling. (line 179) -* program identifiers: Auto-set. (line 146) +* program identifiers: Auto-set. (line 147) * program, definition of: Getting Started. (line 21) * programming conventions, --non-decimal-data option: Nondecimal Data. (line 36) @@ -33468,7 +33472,7 @@ Index * right shift: Bitwise Functions. (line 52) * right shift, bitwise: Bitwise Functions. (line 32) * Ritchie, Dennis: Basic Data Typing. (line 54) -* RLENGTH variable: Auto-set. (line 244) +* RLENGTH variable: Auto-set. (line 248) * RLENGTH variable, match() function and: String Functions. (line 224) * Robbins, Arnold <1>: Future Extensions. (line 6) * Robbins, Arnold <2>: Bugs. (line 32) @@ -33494,9 +33498,9 @@ Index * RS variable: awk split records. (line 12) * RS variable, multiline records and: Multiple Line. (line 17) * rshift: Bitwise Functions. (line 52) -* RSTART variable: Auto-set. (line 250) +* RSTART variable: Auto-set. (line 254) * RSTART variable, match() function and: String Functions. (line 224) -* RT variable <1>: Auto-set. (line 257) +* RT variable <1>: Auto-set. (line 261) * RT variable <2>: Multiple Line. (line 129) * RT variable: awk split records. (line 124) * Rubin, Paul <1>: Contributors. (line 15) @@ -33516,7 +33520,7 @@ Index * scanning arrays: Scanning an Array. (line 6) * scanning multidimensional arrays: Multiscanning. (line 11) * Schorr, Andrew <1>: Contributors. (line 133) -* Schorr, Andrew <2>: Auto-set. (line 284) +* Schorr, Andrew <2>: Auto-set. (line 288) * Schorr, Andrew: Acknowledgments. (line 60) * Schreiber, Bert: Acknowledgments. (line 38) * Schreiber, Rita: Acknowledgments. (line 38) @@ -33600,7 +33604,7 @@ Index (line 116) * sidebar, Changing FS Does Not Affect the Fields: Field Splitting Summary. (line 38) -* sidebar, Changing NR and FNR: Auto-set. (line 299) +* sidebar, Changing NR and FNR: Auto-set. (line 303) * sidebar, Controlling Output Buffering with system(): I/O Functions. (line 138) * sidebar, Escape Sequences for Metacharacters: Escape Sequences. @@ -33763,9 +33767,9 @@ Index * substr: String Functions. (line 479) * substring: String Functions. (line 479) * Sumner, Andrew: Other Versions. (line 64) -* supplementary groups of gawk process: Auto-set. (line 229) +* supplementary groups of gawk process: Auto-set. (line 233) * switch statement: Switch Statement. (line 6) -* SYMTAB array: Auto-set. (line 261) +* SYMTAB array: Auto-set. (line 265) * syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops. (line 148) * system: I/O Functions. (line 75) @@ -33943,10 +33947,10 @@ Index * variables, uninitialized, as array subscripts: Uninitialized Subscripts. (line 6) * variables, user-defined: Variables. (line 6) -* version of gawk: Auto-set. (line 199) -* version of gawk extension API: Auto-set. (line 224) -* version of GNU MP library: Auto-set. (line 210) -* version of GNU MPFR library: Auto-set. (line 206) +* version of gawk: Auto-set. (line 203) +* version of gawk extension API: Auto-set. (line 228) +* version of GNU MP library: Auto-set. (line 214) +* version of GNU MPFR library: Auto-set. (line 210) * vertical bar (|): Regexp Operators. (line 70) * vertical bar (|), | operator (I/O) <1>: Precedence. (line 65) * vertical bar (|), | operator (I/O): Getline/Pipe. (line 9) @@ -34231,355 +34235,355 @@ Node: Built-in Variables426497 Node: User-modified427624 Ref: User-modified-Footnote-1435313 Node: Auto-set435375 -Ref: Auto-set-Footnote-1447957 -Ref: Auto-set-Footnote-2448162 -Node: ARGC and ARGV448218 -Node: Pattern Action Summary452122 -Node: Arrays454345 -Node: Array Basics455894 -Node: Array Intro456720 -Ref: figure-array-elements458693 -Ref: Array Intro-Footnote-1461217 -Node: Reference to Elements461345 -Node: Assigning Elements463795 -Node: Array Example464286 -Node: Scanning an Array466018 -Node: Controlling Scanning469019 -Ref: Controlling Scanning-Footnote-1474192 -Node: Delete474508 -Ref: Delete-Footnote-1477259 -Node: Numeric Array Subscripts477316 -Node: Uninitialized Subscripts479499 -Node: Multidimensional481126 -Node: Multiscanning484239 -Node: Arrays of Arrays485828 -Node: Arrays Summary490491 -Node: Functions492596 -Node: Built-in493469 -Node: Calling Built-in494547 -Node: Numeric Functions496535 -Ref: Numeric Functions-Footnote-1500569 -Ref: Numeric Functions-Footnote-2500926 -Ref: Numeric Functions-Footnote-3500974 -Node: String Functions501243 -Ref: String Functions-Footnote-1524240 -Ref: String Functions-Footnote-2524369 -Ref: String Functions-Footnote-3524617 -Node: Gory Details524704 -Ref: table-sub-escapes526477 -Ref: table-sub-proposed527997 -Ref: table-posix-sub529361 -Ref: table-gensub-escapes530901 -Ref: Gory Details-Footnote-1532077 -Node: I/O Functions532228 -Ref: I/O Functions-Footnote-1539338 -Node: Time Functions539485 -Ref: Time Functions-Footnote-1549949 -Ref: Time Functions-Footnote-2550017 -Ref: Time Functions-Footnote-3550175 -Ref: Time Functions-Footnote-4550286 -Ref: Time Functions-Footnote-5550398 -Ref: Time Functions-Footnote-6550625 -Node: Bitwise Functions550891 -Ref: table-bitwise-ops551453 -Ref: Bitwise Functions-Footnote-1555698 -Node: Type Functions555882 -Node: I18N Functions557024 -Node: User-defined558669 -Node: Definition Syntax559473 -Ref: Definition Syntax-Footnote-1564786 -Node: Function Example564855 -Ref: Function Example-Footnote-1567495 -Node: Function Caveats567517 -Node: Calling A Function568035 -Node: Variable Scope568990 -Node: Pass By Value/Reference571978 -Node: Return Statement575488 -Node: Dynamic Typing578472 -Node: Indirect Calls579401 -Ref: Indirect Calls-Footnote-1589117 -Node: Functions Summary589245 -Node: Library Functions591895 -Ref: Library Functions-Footnote-1595513 -Ref: Library Functions-Footnote-2595656 -Node: Library Names595827 -Ref: Library Names-Footnote-1599300 -Ref: Library Names-Footnote-2599520 -Node: General Functions599606 -Node: Strtonum Function600634 -Node: Assert Function603508 -Node: Round Function606834 -Node: Cliff Random Function608375 -Node: Ordinal Functions609391 -Ref: Ordinal Functions-Footnote-1612456 -Ref: Ordinal Functions-Footnote-2612708 -Node: Join Function612919 -Ref: Join Function-Footnote-1614690 -Node: Getlocaltime Function614890 -Node: Readfile Function618626 -Node: Data File Management620465 -Node: Filetrans Function621097 -Node: Rewind Function625166 -Node: File Checking626724 -Ref: File Checking-Footnote-1627856 -Node: Empty Files628057 -Node: Ignoring Assigns630036 -Node: Getopt Function631590 -Ref: Getopt Function-Footnote-1642854 -Node: Passwd Functions643057 -Ref: Passwd Functions-Footnote-1652036 -Node: Group Functions652124 -Ref: Group Functions-Footnote-1660055 -Node: Walking Arrays660268 -Node: Library Functions Summary661871 -Node: Library Exercises663259 -Node: Sample Programs664539 -Node: Running Examples665309 -Node: Clones666037 -Node: Cut Program667261 -Node: Egrep Program677119 -Ref: Egrep Program-Footnote-1684706 -Node: Id Program684816 -Node: Split Program688470 -Ref: Split Program-Footnote-1692008 -Node: Tee Program692136 -Node: Uniq Program694923 -Node: Wc Program702346 -Ref: Wc Program-Footnote-1706611 -Node: Miscellaneous Programs706703 -Node: Dupword Program707916 -Node: Alarm Program709947 -Node: Translate Program714751 -Ref: Translate Program-Footnote-1719142 -Ref: Translate Program-Footnote-2719412 -Node: Labels Program719551 -Ref: Labels Program-Footnote-1722912 -Node: Word Sorting722996 -Node: History Sorting727039 -Node: Extract Program728875 -Node: Simple Sed736411 -Node: Igawk Program739473 -Ref: Igawk Program-Footnote-1753777 -Ref: Igawk Program-Footnote-2753978 -Node: Anagram Program754116 -Node: Signature Program757184 -Node: Programs Summary758431 -Node: Programs Exercises759646 -Ref: Programs Exercises-Footnote-1764033 -Node: Advanced Features764124 -Node: Nondecimal Data766072 -Node: Array Sorting767649 -Node: Controlling Array Traversal768346 -Node: Array Sorting Functions776626 -Ref: Array Sorting Functions-Footnote-1780533 -Node: Two-way I/O780727 -Ref: Two-way I/O-Footnote-1785671 -Ref: Two-way I/O-Footnote-2785850 -Node: TCP/IP Networking785932 -Node: Profiling788777 -Node: Advanced Features Summary796319 -Node: Internationalization798183 -Node: I18N and L10N799663 -Node: Explaining gettext800349 -Ref: Explaining gettext-Footnote-1805375 -Ref: Explaining gettext-Footnote-2805559 -Node: Programmer i18n805724 -Ref: Programmer i18n-Footnote-1810518 -Node: Translator i18n810567 -Node: String Extraction811361 -Ref: String Extraction-Footnote-1812494 -Node: Printf Ordering812580 -Ref: Printf Ordering-Footnote-1815362 -Node: I18N Portability815426 -Ref: I18N Portability-Footnote-1817875 -Node: I18N Example817938 -Ref: I18N Example-Footnote-1820644 -Node: Gawk I18N820716 -Node: I18N Summary821354 -Node: Debugger822693 -Node: Debugging823715 -Node: Debugging Concepts824156 -Node: Debugging Terms826012 -Node: Awk Debugging828609 -Node: Sample Debugging Session829501 -Node: Debugger Invocation830021 -Node: Finding The Bug831357 -Node: List of Debugger Commands837836 -Node: Breakpoint Control839168 -Node: Debugger Execution Control842832 -Node: Viewing And Changing Data846192 -Node: Execution Stack849550 -Node: Debugger Info851063 -Node: Miscellaneous Debugger Commands855057 -Node: Readline Support860241 -Node: Limitations861133 -Node: Debugging Summary863406 -Node: Arbitrary Precision Arithmetic864574 -Node: Computer Arithmetic866061 -Ref: Computer Arithmetic-Footnote-1870448 -Node: Math Definitions870505 -Ref: table-ieee-formats873794 -Ref: Math Definitions-Footnote-1874334 -Node: MPFR features874437 -Node: FP Math Caution876054 -Ref: FP Math Caution-Footnote-1877104 -Node: Inexactness of computations877473 -Node: Inexact representation878421 -Node: Comparing FP Values879776 -Node: Errors accumulate880740 -Node: Getting Accuracy882173 -Node: Try To Round884832 -Node: Setting precision885731 -Ref: table-predefined-precision-strings886413 -Node: Setting the rounding mode888206 -Ref: table-gawk-rounding-modes888570 -Ref: Setting the rounding mode-Footnote-1892024 -Node: Arbitrary Precision Integers892203 -Ref: Arbitrary Precision Integers-Footnote-1895184 -Node: POSIX Floating Point Problems895333 -Ref: POSIX Floating Point Problems-Footnote-1899209 -Node: Floating point summary899247 -Node: Dynamic Extensions901451 -Node: Extension Intro903003 -Node: Plugin License904268 -Node: Extension Mechanism Outline904953 -Ref: figure-load-extension905377 -Ref: figure-load-new-function906862 -Ref: figure-call-new-function907864 -Node: Extension API Description909848 -Node: Extension API Functions Introduction911298 -Node: General Data Types916165 -Ref: General Data Types-Footnote-1921858 -Node: Requesting Values922157 -Ref: table-value-types-returned922894 -Node: Memory Allocation Functions923852 -Ref: Memory Allocation Functions-Footnote-1926599 -Node: Constructor Functions926695 -Node: Registration Functions928453 -Node: Extension Functions929138 -Node: Exit Callback Functions931440 -Node: Extension Version String932688 -Node: Input Parsers933338 -Node: Output Wrappers943152 -Node: Two-way processors947668 -Node: Printing Messages949872 -Ref: Printing Messages-Footnote-1950949 -Node: Updating `ERRNO'951101 -Node: Accessing Parameters951840 -Node: Symbol Table Access953070 -Node: Symbol table by name953584 -Node: Symbol table by cookie955560 -Ref: Symbol table by cookie-Footnote-1959693 -Node: Cached values959756 -Ref: Cached values-Footnote-1963260 -Node: Array Manipulation963351 -Ref: Array Manipulation-Footnote-1964449 -Node: Array Data Types964488 -Ref: Array Data Types-Footnote-1967191 -Node: Array Functions967283 -Node: Flattening Arrays971157 -Node: Creating Arrays978009 -Node: Extension API Variables982740 -Node: Extension Versioning983376 -Node: Extension API Informational Variables985277 -Node: Extension API Boilerplate986363 -Node: Finding Extensions990167 -Node: Extension Example990727 -Node: Internal File Description991457 -Node: Internal File Ops995548 -Ref: Internal File Ops-Footnote-11006980 -Node: Using Internal File Ops1007120 -Ref: Using Internal File Ops-Footnote-11009467 -Node: Extension Samples1009735 -Node: Extension Sample File Functions1011259 -Node: Extension Sample Fnmatch1018827 -Node: Extension Sample Fork1020309 -Node: Extension Sample Inplace1021522 -Node: Extension Sample Ord1023197 -Node: Extension Sample Readdir1024033 -Ref: table-readdir-file-types1024889 -Node: Extension Sample Revout1025688 -Node: Extension Sample Rev2way1026279 -Node: Extension Sample Read write array1027020 -Node: Extension Sample Readfile1028899 -Node: Extension Sample API Tests1029999 -Node: Extension Sample Time1030524 -Node: gawkextlib1031839 -Node: Extension summary1034652 -Node: Extension Exercises1038345 -Node: Language History1039067 -Node: V7/SVR3.11040710 -Node: SVR41043030 -Node: POSIX1044472 -Node: BTL1045858 -Node: POSIX/GNU1046592 -Node: Feature History1052308 -Node: Common Extensions1065399 -Node: Ranges and Locales1066711 -Ref: Ranges and Locales-Footnote-11071328 -Ref: Ranges and Locales-Footnote-21071355 -Ref: Ranges and Locales-Footnote-31071589 -Node: Contributors1071810 -Node: History summary1077235 -Node: Installation1078604 -Node: Gawk Distribution1079555 -Node: Getting1080039 -Node: Extracting1080863 -Node: Distribution contents1082505 -Node: Unix Installation1088222 -Node: Quick Installation1088839 -Node: Additional Configuration Options1091281 -Node: Configuration Philosophy1093019 -Node: Non-Unix Installation1095370 -Node: PC Installation1095828 -Node: PC Binary Installation1097139 -Node: PC Compiling1098987 -Ref: PC Compiling-Footnote-11101986 -Node: PC Testing1102091 -Node: PC Using1103267 -Node: Cygwin1107419 -Node: MSYS1108228 -Node: VMS Installation1108742 -Node: VMS Compilation1109538 -Ref: VMS Compilation-Footnote-11110760 -Node: VMS Dynamic Extensions1110818 -Node: VMS Installation Details1112191 -Node: VMS Running1114443 -Node: VMS GNV1117277 -Node: VMS Old Gawk1118000 -Node: Bugs1118470 -Node: Other Versions1122474 -Node: Installation summary1128701 -Node: Notes1129757 -Node: Compatibility Mode1130622 -Node: Additions1131404 -Node: Accessing The Source1132329 -Node: Adding Code1133765 -Node: New Ports1139943 -Node: Derived Files1144424 -Ref: Derived Files-Footnote-11149505 -Ref: Derived Files-Footnote-21149539 -Ref: Derived Files-Footnote-31150135 -Node: Future Extensions1150249 -Node: Implementation Limitations1150855 -Node: Extension Design1152103 -Node: Old Extension Problems1153257 -Ref: Old Extension Problems-Footnote-11154774 -Node: Extension New Mechanism Goals1154831 -Ref: Extension New Mechanism Goals-Footnote-11158191 -Node: Extension Other Design Decisions1158380 -Node: Extension Future Growth1160486 -Node: Old Extension Mechanism1161322 -Node: Notes summary1163084 -Node: Basic Concepts1164270 -Node: Basic High Level1164951 -Ref: figure-general-flow1165223 -Ref: figure-process-flow1165822 -Ref: Basic High Level-Footnote-11169051 -Node: Basic Data Typing1169236 -Node: Glossary1172564 -Node: Copying1197716 -Node: GNU Free Documentation License1235272 -Node: Index1260408 +Ref: Auto-set-Footnote-1448057 +Ref: Auto-set-Footnote-2448262 +Node: ARGC and ARGV448318 +Node: Pattern Action Summary452222 +Node: Arrays454445 +Node: Array Basics455994 +Node: Array Intro456820 +Ref: figure-array-elements458793 +Ref: Array Intro-Footnote-1461317 +Node: Reference to Elements461445 +Node: Assigning Elements463895 +Node: Array Example464386 +Node: Scanning an Array466118 +Node: Controlling Scanning469119 +Ref: Controlling Scanning-Footnote-1474292 +Node: Delete474608 +Ref: Delete-Footnote-1477359 +Node: Numeric Array Subscripts477416 +Node: Uninitialized Subscripts479599 +Node: Multidimensional481226 +Node: Multiscanning484339 +Node: Arrays of Arrays485928 +Node: Arrays Summary490591 +Node: Functions492696 +Node: Built-in493569 +Node: Calling Built-in494647 +Node: Numeric Functions496635 +Ref: Numeric Functions-Footnote-1500669 +Ref: Numeric Functions-Footnote-2501026 +Ref: Numeric Functions-Footnote-3501074 +Node: String Functions501343 +Ref: String Functions-Footnote-1524340 +Ref: String Functions-Footnote-2524469 +Ref: String Functions-Footnote-3524717 +Node: Gory Details524804 +Ref: table-sub-escapes526577 +Ref: table-sub-proposed528097 +Ref: table-posix-sub529461 +Ref: table-gensub-escapes531001 +Ref: Gory Details-Footnote-1532177 +Node: I/O Functions532328 +Ref: I/O Functions-Footnote-1539438 +Node: Time Functions539585 +Ref: Time Functions-Footnote-1550049 +Ref: Time Functions-Footnote-2550117 +Ref: Time Functions-Footnote-3550275 +Ref: Time Functions-Footnote-4550386 +Ref: Time Functions-Footnote-5550498 +Ref: Time Functions-Footnote-6550725 +Node: Bitwise Functions550991 +Ref: table-bitwise-ops551553 +Ref: Bitwise Functions-Footnote-1555798 +Node: Type Functions555982 +Node: I18N Functions557124 +Node: User-defined558769 +Node: Definition Syntax559573 +Ref: Definition Syntax-Footnote-1564886 +Node: Function Example564955 +Ref: Function Example-Footnote-1567595 +Node: Function Caveats567617 +Node: Calling A Function568135 +Node: Variable Scope569090 +Node: Pass By Value/Reference572078 +Node: Return Statement575588 +Node: Dynamic Typing578572 +Node: Indirect Calls579501 +Ref: Indirect Calls-Footnote-1589217 +Node: Functions Summary589345 +Node: Library Functions591995 +Ref: Library Functions-Footnote-1595613 +Ref: Library Functions-Footnote-2595756 +Node: Library Names595927 +Ref: Library Names-Footnote-1599400 +Ref: Library Names-Footnote-2599620 +Node: General Functions599706 +Node: Strtonum Function600734 +Node: Assert Function603608 +Node: Round Function606934 +Node: Cliff Random Function608475 +Node: Ordinal Functions609491 +Ref: Ordinal Functions-Footnote-1612556 +Ref: Ordinal Functions-Footnote-2612808 +Node: Join Function613019 +Ref: Join Function-Footnote-1614790 +Node: Getlocaltime Function614990 +Node: Readfile Function618726 +Node: Data File Management620565 +Node: Filetrans Function621197 +Node: Rewind Function625266 +Node: File Checking626824 +Ref: File Checking-Footnote-1627956 +Node: Empty Files628157 +Node: Ignoring Assigns630136 +Node: Getopt Function631690 +Ref: Getopt Function-Footnote-1642954 +Node: Passwd Functions643157 +Ref: Passwd Functions-Footnote-1652136 +Node: Group Functions652224 +Ref: Group Functions-Footnote-1660155 +Node: Walking Arrays660368 +Node: Library Functions Summary661971 +Node: Library Exercises663359 +Node: Sample Programs664639 +Node: Running Examples665409 +Node: Clones666137 +Node: Cut Program667361 +Node: Egrep Program677219 +Ref: Egrep Program-Footnote-1684806 +Node: Id Program684916 +Node: Split Program688570 +Ref: Split Program-Footnote-1692108 +Node: Tee Program692236 +Node: Uniq Program695023 +Node: Wc Program702446 +Ref: Wc Program-Footnote-1706711 +Node: Miscellaneous Programs706803 +Node: Dupword Program708016 +Node: Alarm Program710047 +Node: Translate Program714851 +Ref: Translate Program-Footnote-1719242 +Ref: Translate Program-Footnote-2719512 +Node: Labels Program719651 +Ref: Labels Program-Footnote-1723012 +Node: Word Sorting723096 +Node: History Sorting727139 +Node: Extract Program728975 +Node: Simple Sed736511 +Node: Igawk Program739573 +Ref: Igawk Program-Footnote-1753877 +Ref: Igawk Program-Footnote-2754078 +Node: Anagram Program754216 +Node: Signature Program757284 +Node: Programs Summary758531 +Node: Programs Exercises759746 +Ref: Programs Exercises-Footnote-1764133 +Node: Advanced Features764224 +Node: Nondecimal Data766172 +Node: Array Sorting767749 +Node: Controlling Array Traversal768446 +Node: Array Sorting Functions776726 +Ref: Array Sorting Functions-Footnote-1780633 +Node: Two-way I/O780827 +Ref: Two-way I/O-Footnote-1785771 +Ref: Two-way I/O-Footnote-2785950 +Node: TCP/IP Networking786032 +Node: Profiling788877 +Node: Advanced Features Summary796419 +Node: Internationalization798283 +Node: I18N and L10N799763 +Node: Explaining gettext800449 +Ref: Explaining gettext-Footnote-1805475 +Ref: Explaining gettext-Footnote-2805659 +Node: Programmer i18n805824 +Ref: Programmer i18n-Footnote-1810618 +Node: Translator i18n810667 +Node: String Extraction811461 +Ref: String Extraction-Footnote-1812594 +Node: Printf Ordering812680 +Ref: Printf Ordering-Footnote-1815462 +Node: I18N Portability815526 +Ref: I18N Portability-Footnote-1817975 +Node: I18N Example818038 +Ref: I18N Example-Footnote-1820744 +Node: Gawk I18N820816 +Node: I18N Summary821454 +Node: Debugger822793 +Node: Debugging823815 +Node: Debugging Concepts824256 +Node: Debugging Terms826112 +Node: Awk Debugging828709 +Node: Sample Debugging Session829601 +Node: Debugger Invocation830121 +Node: Finding The Bug831457 +Node: List of Debugger Commands837936 +Node: Breakpoint Control839268 +Node: Debugger Execution Control842932 +Node: Viewing And Changing Data846292 +Node: Execution Stack849650 +Node: Debugger Info851163 +Node: Miscellaneous Debugger Commands855157 +Node: Readline Support860341 +Node: Limitations861233 +Node: Debugging Summary863506 +Node: Arbitrary Precision Arithmetic864674 +Node: Computer Arithmetic866161 +Ref: Computer Arithmetic-Footnote-1870548 +Node: Math Definitions870605 +Ref: table-ieee-formats873894 +Ref: Math Definitions-Footnote-1874434 +Node: MPFR features874537 +Node: FP Math Caution876154 +Ref: FP Math Caution-Footnote-1877204 +Node: Inexactness of computations877573 +Node: Inexact representation878521 +Node: Comparing FP Values879876 +Node: Errors accumulate880840 +Node: Getting Accuracy882273 +Node: Try To Round884932 +Node: Setting precision885831 +Ref: table-predefined-precision-strings886513 +Node: Setting the rounding mode888306 +Ref: table-gawk-rounding-modes888670 +Ref: Setting the rounding mode-Footnote-1892124 +Node: Arbitrary Precision Integers892303 +Ref: Arbitrary Precision Integers-Footnote-1895284 +Node: POSIX Floating Point Problems895433 +Ref: POSIX Floating Point Problems-Footnote-1899309 +Node: Floating point summary899347 +Node: Dynamic Extensions901551 +Node: Extension Intro903103 +Node: Plugin License904368 +Node: Extension Mechanism Outline905053 +Ref: figure-load-extension905477 +Ref: figure-load-new-function906962 +Ref: figure-call-new-function907964 +Node: Extension API Description909948 +Node: Extension API Functions Introduction911398 +Node: General Data Types916265 +Ref: General Data Types-Footnote-1921958 +Node: Requesting Values922257 +Ref: table-value-types-returned922994 +Node: Memory Allocation Functions923952 +Ref: Memory Allocation Functions-Footnote-1926699 +Node: Constructor Functions926795 +Node: Registration Functions928553 +Node: Extension Functions929238 +Node: Exit Callback Functions931540 +Node: Extension Version String932788 +Node: Input Parsers933438 +Node: Output Wrappers943252 +Node: Two-way processors947768 +Node: Printing Messages949972 +Ref: Printing Messages-Footnote-1951049 +Node: Updating `ERRNO'951201 +Node: Accessing Parameters951940 +Node: Symbol Table Access953170 +Node: Symbol table by name953684 +Node: Symbol table by cookie955660 +Ref: Symbol table by cookie-Footnote-1959793 +Node: Cached values959856 +Ref: Cached values-Footnote-1963360 +Node: Array Manipulation963451 +Ref: Array Manipulation-Footnote-1964549 +Node: Array Data Types964588 +Ref: Array Data Types-Footnote-1967291 +Node: Array Functions967383 +Node: Flattening Arrays971257 +Node: Creating Arrays978109 +Node: Extension API Variables982840 +Node: Extension Versioning983476 +Node: Extension API Informational Variables985377 +Node: Extension API Boilerplate986463 +Node: Finding Extensions990267 +Node: Extension Example990827 +Node: Internal File Description991557 +Node: Internal File Ops995648 +Ref: Internal File Ops-Footnote-11007080 +Node: Using Internal File Ops1007220 +Ref: Using Internal File Ops-Footnote-11009567 +Node: Extension Samples1009835 +Node: Extension Sample File Functions1011359 +Node: Extension Sample Fnmatch1018927 +Node: Extension Sample Fork1020409 +Node: Extension Sample Inplace1021622 +Node: Extension Sample Ord1023297 +Node: Extension Sample Readdir1024133 +Ref: table-readdir-file-types1024989 +Node: Extension Sample Revout1025788 +Node: Extension Sample Rev2way1026379 +Node: Extension Sample Read write array1027120 +Node: Extension Sample Readfile1028999 +Node: Extension Sample API Tests1030099 +Node: Extension Sample Time1030624 +Node: gawkextlib1031939 +Node: Extension summary1034752 +Node: Extension Exercises1038445 +Node: Language History1039167 +Node: V7/SVR3.11040810 +Node: SVR41043130 +Node: POSIX1044572 +Node: BTL1045958 +Node: POSIX/GNU1046692 +Node: Feature History1052408 +Node: Common Extensions1065499 +Node: Ranges and Locales1066811 +Ref: Ranges and Locales-Footnote-11071428 +Ref: Ranges and Locales-Footnote-21071455 +Ref: Ranges and Locales-Footnote-31071689 +Node: Contributors1071910 +Node: History summary1077335 +Node: Installation1078704 +Node: Gawk Distribution1079655 +Node: Getting1080139 +Node: Extracting1080963 +Node: Distribution contents1082605 +Node: Unix Installation1088322 +Node: Quick Installation1088939 +Node: Additional Configuration Options1091381 +Node: Configuration Philosophy1093119 +Node: Non-Unix Installation1095470 +Node: PC Installation1095928 +Node: PC Binary Installation1097239 +Node: PC Compiling1099087 +Ref: PC Compiling-Footnote-11102086 +Node: PC Testing1102191 +Node: PC Using1103367 +Node: Cygwin1107519 +Node: MSYS1108328 +Node: VMS Installation1108842 +Node: VMS Compilation1109638 +Ref: VMS Compilation-Footnote-11110860 +Node: VMS Dynamic Extensions1110918 +Node: VMS Installation Details1112291 +Node: VMS Running1114543 +Node: VMS GNV1117377 +Node: VMS Old Gawk1118100 +Node: Bugs1118570 +Node: Other Versions1122574 +Node: Installation summary1128801 +Node: Notes1129857 +Node: Compatibility Mode1130722 +Node: Additions1131504 +Node: Accessing The Source1132429 +Node: Adding Code1133865 +Node: New Ports1140043 +Node: Derived Files1144524 +Ref: Derived Files-Footnote-11149605 +Ref: Derived Files-Footnote-21149639 +Ref: Derived Files-Footnote-31150235 +Node: Future Extensions1150349 +Node: Implementation Limitations1150955 +Node: Extension Design1152203 +Node: Old Extension Problems1153357 +Ref: Old Extension Problems-Footnote-11154874 +Node: Extension New Mechanism Goals1154931 +Ref: Extension New Mechanism Goals-Footnote-11158291 +Node: Extension Other Design Decisions1158480 +Node: Extension Future Growth1160586 +Node: Old Extension Mechanism1161422 +Node: Notes summary1163184 +Node: Basic Concepts1164370 +Node: Basic High Level1165051 +Ref: figure-general-flow1165323 +Ref: figure-process-flow1165922 +Ref: Basic High Level-Footnote-11169151 +Node: Basic Data Typing1169336 +Node: Glossary1172664 +Node: Copying1197816 +Node: GNU Free Documentation License1235372 +Node: Index1260508  End Tag Table -- cgit v1.2.3 From 4e463bfa0ca3d2e317a0d6afe0badd6b7ee4a001 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 5 Sep 2014 14:46:19 +0300 Subject: More reviewer comments. --- doc/gawk.info | 501 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 250 insertions(+), 251 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 0d7505a5..1ae776a6 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -17646,6 +17646,10 @@ array only once, in a `BEGIN' rule. However, this assumes that the "from" and "to" lists will never change throughout the lifetime of the program. + Another obvious improvement is to enable the use of ranges, such as +`a-z', as allowed by the `tr' utility. Look at the code for `cut.awk' +(*note Cut Program::) for inspiration. + ---------- Footnotes ---------- (1) On some older systems, including Solaris, the system version of @@ -18740,18 +18744,13 @@ File: gawk.info, Node: Programs Exercises, Prev: Programs Summary, Up: Sample Program::) to accept the same arguments and perform in the same way. - 4. The `split.awk' program (*note Split Program::) uses the `chr()' - and `ord()' functions to move through the letters of the alphabet. - Modify the program to instead use only the `awk' built-in - functions, such as `index()' and `substr()'. - - 5. The `split.awk' program (*note Split Program::) assumes that + 4. The `split.awk' program (*note Split Program::) assumes that letters are contiguous in the character set, which isn't true for EBCDIC systems. Fix this problem. (Hint: Consider a different way to work through the alphabet, without relying on `ord()' and `chr()'.) - 6. In `uniq.awk' (*note Uniq Program::, the logic for choosing which + 5. In `uniq.awk' (*note Uniq Program::, the logic for choosing which lines to print represents a "state machine", which is "a device that can be in one of a set number of stable conditions depending on its previous condition and on the present values of its @@ -18761,21 +18760,21 @@ File: gawk.info, Node: Programs Exercises, Prev: Programs Summary, Up: Sample where you would use this, just as fast." Rewrite the logic to follow this suggestion. - 7. Why can't the `wc.awk' program (*note Wc Program::) just use the + 6. Why can't the `wc.awk' program (*note Wc Program::) just use the value of `FNR' in `endfile()'? Hint: Examine the code in *note Filetrans Function::. - 8. Manipulation of individual characters in the `translate' program + 7. Manipulation of individual characters in the `translate' program (*note Translate Program::) is painful using standard `awk' functions. Given that `gawk' can split strings into individual characters using `""' as the separator, how might you use this feature to simplify the program? - 9. The `extract.awk' program (*note Extract Program::) was written + 8. The `extract.awk' program (*note Extract Program::) was written before `gawk' had the `gensub()' function. Use it to simplify the code. - 10. Compare the performance of the `awksed.awk' program (*note Simple + 9. Compare the performance of the `awksed.awk' program (*note Simple Sed::) with the more straightforward: BEGIN { @@ -18786,16 +18785,16 @@ File: gawk.info, Node: Programs Exercises, Prev: Programs Summary, Up: Sample { gsub(pat, repl); print } - 11. What are the advantages and disadvantages of `awksed.awk' versus + 10. What are the advantages and disadvantages of `awksed.awk' versus the real `sed' utility? - 12. In *note Igawk Program::, we mentioned that not trying to save the + 11. In *note Igawk Program::, we mentioned that not trying to save the line read with `getline' in the `pathto()' function when testing for the file's accessibility for use with the main program simplifies things considerably. What problem does this engender though? - 13. As an additional example of the idea that it is not always + 12. As an additional example of the idea that it is not always necessary to add new features to a program, consider the idea of having two files in a directory in the search path: @@ -18818,7 +18817,7 @@ File: gawk.info, Node: Programs Exercises, Prev: Programs Summary, Up: Sample `@include' statements for the desired library functions. Make this change. - 14. Modify `anagram.awk' (*note Anagram Program::), to avoid the use + 13. Modify `anagram.awk' (*note Anagram Program::), to avoid the use of the external `sort' utility. @@ -32079,7 +32078,7 @@ Index (line 66) * directories, command-line: Command-line directories. (line 6) -* directories, searching: Programs Exercises. (line 75) +* directories, searching: Programs Exercises. (line 70) * directories, searching for loadable extensions: AWKLIBPATH Variable. (line 6) * directories, searching for source files: AWKPATH Variable. (line 6) @@ -32360,7 +32359,7 @@ Index * files, reading, multiline records: Multiple Line. (line 6) * files, searching for regular expressions: Egrep Program. (line 6) * files, skipping: File Checking. (line 6) -* files, source, search path for: Programs Exercises. (line 75) +* files, source, search path for: Programs Exercises. (line 70) * files, splitting: Split Program. (line 6) * files, Texinfo, extracting programs from: Extract Program. (line 6) * find substring in string: String Functions. (line 155) @@ -33528,11 +33527,11 @@ Index * search in string: String Functions. (line 155) * search paths <1>: VMS Running. (line 58) * search paths <2>: PC Using. (line 10) -* search paths: Programs Exercises. (line 75) +* search paths: Programs Exercises. (line 70) * search paths, for loadable extensions: AWKLIBPATH Variable. (line 6) * search paths, for source files <1>: VMS Running. (line 58) * search paths, for source files <2>: PC Using. (line 10) -* search paths, for source files <3>: Programs Exercises. (line 75) +* search paths, for source files <3>: Programs Exercises. (line 70) * search paths, for source files: AWKPATH Variable. (line 6) * searching, files for regular expressions: Egrep Program. (line 6) * searching, for words: Dupword Program. (line 6) @@ -33679,7 +33678,7 @@ Index * source code, QSE Awk: Other Versions. (line 131) * source code, QuikTrim Awk: Other Versions. (line 135) * source code, Solaris awk: Other Versions. (line 96) -* source files, search path for: Programs Exercises. (line 75) +* source files, search path for: Programs Exercises. (line 70) * sparse arrays: Array Intro. (line 72) * Spencer, Henry: Glossary. (line 11) * split: String Functions. (line 313) @@ -34354,236 +34353,236 @@ Node: Miscellaneous Programs706803 Node: Dupword Program708016 Node: Alarm Program710047 Node: Translate Program714851 -Ref: Translate Program-Footnote-1719242 -Ref: Translate Program-Footnote-2719512 -Node: Labels Program719651 -Ref: Labels Program-Footnote-1723012 -Node: Word Sorting723096 -Node: History Sorting727139 -Node: Extract Program728975 -Node: Simple Sed736511 -Node: Igawk Program739573 -Ref: Igawk Program-Footnote-1753877 -Ref: Igawk Program-Footnote-2754078 -Node: Anagram Program754216 -Node: Signature Program757284 -Node: Programs Summary758531 -Node: Programs Exercises759746 -Ref: Programs Exercises-Footnote-1764133 -Node: Advanced Features764224 -Node: Nondecimal Data766172 -Node: Array Sorting767749 -Node: Controlling Array Traversal768446 -Node: Array Sorting Functions776726 -Ref: Array Sorting Functions-Footnote-1780633 -Node: Two-way I/O780827 -Ref: Two-way I/O-Footnote-1785771 -Ref: Two-way I/O-Footnote-2785950 -Node: TCP/IP Networking786032 -Node: Profiling788877 -Node: Advanced Features Summary796419 -Node: Internationalization798283 -Node: I18N and L10N799763 -Node: Explaining gettext800449 -Ref: Explaining gettext-Footnote-1805475 -Ref: Explaining gettext-Footnote-2805659 -Node: Programmer i18n805824 -Ref: Programmer i18n-Footnote-1810618 -Node: Translator i18n810667 -Node: String Extraction811461 -Ref: String Extraction-Footnote-1812594 -Node: Printf Ordering812680 -Ref: Printf Ordering-Footnote-1815462 -Node: I18N Portability815526 -Ref: I18N Portability-Footnote-1817975 -Node: I18N Example818038 -Ref: I18N Example-Footnote-1820744 -Node: Gawk I18N820816 -Node: I18N Summary821454 -Node: Debugger822793 -Node: Debugging823815 -Node: Debugging Concepts824256 -Node: Debugging Terms826112 -Node: Awk Debugging828709 -Node: Sample Debugging Session829601 -Node: Debugger Invocation830121 -Node: Finding The Bug831457 -Node: List of Debugger Commands837936 -Node: Breakpoint Control839268 -Node: Debugger Execution Control842932 -Node: Viewing And Changing Data846292 -Node: Execution Stack849650 -Node: Debugger Info851163 -Node: Miscellaneous Debugger Commands855157 -Node: Readline Support860341 -Node: Limitations861233 -Node: Debugging Summary863506 -Node: Arbitrary Precision Arithmetic864674 -Node: Computer Arithmetic866161 -Ref: Computer Arithmetic-Footnote-1870548 -Node: Math Definitions870605 -Ref: table-ieee-formats873894 -Ref: Math Definitions-Footnote-1874434 -Node: MPFR features874537 -Node: FP Math Caution876154 -Ref: FP Math Caution-Footnote-1877204 -Node: Inexactness of computations877573 -Node: Inexact representation878521 -Node: Comparing FP Values879876 -Node: Errors accumulate880840 -Node: Getting Accuracy882273 -Node: Try To Round884932 -Node: Setting precision885831 -Ref: table-predefined-precision-strings886513 -Node: Setting the rounding mode888306 -Ref: table-gawk-rounding-modes888670 -Ref: Setting the rounding mode-Footnote-1892124 -Node: Arbitrary Precision Integers892303 -Ref: Arbitrary Precision Integers-Footnote-1895284 -Node: POSIX Floating Point Problems895433 -Ref: POSIX Floating Point Problems-Footnote-1899309 -Node: Floating point summary899347 -Node: Dynamic Extensions901551 -Node: Extension Intro903103 -Node: Plugin License904368 -Node: Extension Mechanism Outline905053 -Ref: figure-load-extension905477 -Ref: figure-load-new-function906962 -Ref: figure-call-new-function907964 -Node: Extension API Description909948 -Node: Extension API Functions Introduction911398 -Node: General Data Types916265 -Ref: General Data Types-Footnote-1921958 -Node: Requesting Values922257 -Ref: table-value-types-returned922994 -Node: Memory Allocation Functions923952 -Ref: Memory Allocation Functions-Footnote-1926699 -Node: Constructor Functions926795 -Node: Registration Functions928553 -Node: Extension Functions929238 -Node: Exit Callback Functions931540 -Node: Extension Version String932788 -Node: Input Parsers933438 -Node: Output Wrappers943252 -Node: Two-way processors947768 -Node: Printing Messages949972 -Ref: Printing Messages-Footnote-1951049 -Node: Updating `ERRNO'951201 -Node: Accessing Parameters951940 -Node: Symbol Table Access953170 -Node: Symbol table by name953684 -Node: Symbol table by cookie955660 -Ref: Symbol table by cookie-Footnote-1959793 -Node: Cached values959856 -Ref: Cached values-Footnote-1963360 -Node: Array Manipulation963451 -Ref: Array Manipulation-Footnote-1964549 -Node: Array Data Types964588 -Ref: Array Data Types-Footnote-1967291 -Node: Array Functions967383 -Node: Flattening Arrays971257 -Node: Creating Arrays978109 -Node: Extension API Variables982840 -Node: Extension Versioning983476 -Node: Extension API Informational Variables985377 -Node: Extension API Boilerplate986463 -Node: Finding Extensions990267 -Node: Extension Example990827 -Node: Internal File Description991557 -Node: Internal File Ops995648 -Ref: Internal File Ops-Footnote-11007080 -Node: Using Internal File Ops1007220 -Ref: Using Internal File Ops-Footnote-11009567 -Node: Extension Samples1009835 -Node: Extension Sample File Functions1011359 -Node: Extension Sample Fnmatch1018927 -Node: Extension Sample Fork1020409 -Node: Extension Sample Inplace1021622 -Node: Extension Sample Ord1023297 -Node: Extension Sample Readdir1024133 -Ref: table-readdir-file-types1024989 -Node: Extension Sample Revout1025788 -Node: Extension Sample Rev2way1026379 -Node: Extension Sample Read write array1027120 -Node: Extension Sample Readfile1028999 -Node: Extension Sample API Tests1030099 -Node: Extension Sample Time1030624 -Node: gawkextlib1031939 -Node: Extension summary1034752 -Node: Extension Exercises1038445 -Node: Language History1039167 -Node: V7/SVR3.11040810 -Node: SVR41043130 -Node: POSIX1044572 -Node: BTL1045958 -Node: POSIX/GNU1046692 -Node: Feature History1052408 -Node: Common Extensions1065499 -Node: Ranges and Locales1066811 -Ref: Ranges and Locales-Footnote-11071428 -Ref: Ranges and Locales-Footnote-21071455 -Ref: Ranges and Locales-Footnote-31071689 -Node: Contributors1071910 -Node: History summary1077335 -Node: Installation1078704 -Node: Gawk Distribution1079655 -Node: Getting1080139 -Node: Extracting1080963 -Node: Distribution contents1082605 -Node: Unix Installation1088322 -Node: Quick Installation1088939 -Node: Additional Configuration Options1091381 -Node: Configuration Philosophy1093119 -Node: Non-Unix Installation1095470 -Node: PC Installation1095928 -Node: PC Binary Installation1097239 -Node: PC Compiling1099087 -Ref: PC Compiling-Footnote-11102086 -Node: PC Testing1102191 -Node: PC Using1103367 -Node: Cygwin1107519 -Node: MSYS1108328 -Node: VMS Installation1108842 -Node: VMS Compilation1109638 -Ref: VMS Compilation-Footnote-11110860 -Node: VMS Dynamic Extensions1110918 -Node: VMS Installation Details1112291 -Node: VMS Running1114543 -Node: VMS GNV1117377 -Node: VMS Old Gawk1118100 -Node: Bugs1118570 -Node: Other Versions1122574 -Node: Installation summary1128801 -Node: Notes1129857 -Node: Compatibility Mode1130722 -Node: Additions1131504 -Node: Accessing The Source1132429 -Node: Adding Code1133865 -Node: New Ports1140043 -Node: Derived Files1144524 -Ref: Derived Files-Footnote-11149605 -Ref: Derived Files-Footnote-21149639 -Ref: Derived Files-Footnote-31150235 -Node: Future Extensions1150349 -Node: Implementation Limitations1150955 -Node: Extension Design1152203 -Node: Old Extension Problems1153357 -Ref: Old Extension Problems-Footnote-11154874 -Node: Extension New Mechanism Goals1154931 -Ref: Extension New Mechanism Goals-Footnote-11158291 -Node: Extension Other Design Decisions1158480 -Node: Extension Future Growth1160586 -Node: Old Extension Mechanism1161422 -Node: Notes summary1163184 -Node: Basic Concepts1164370 -Node: Basic High Level1165051 -Ref: figure-general-flow1165323 -Ref: figure-process-flow1165922 -Ref: Basic High Level-Footnote-11169151 -Node: Basic Data Typing1169336 -Node: Glossary1172664 -Node: Copying1197816 -Node: GNU Free Documentation License1235372 -Node: Index1260508 +Ref: Translate Program-Footnote-1719424 +Ref: Translate Program-Footnote-2719694 +Node: Labels Program719833 +Ref: Labels Program-Footnote-1723194 +Node: Word Sorting723278 +Node: History Sorting727321 +Node: Extract Program729157 +Node: Simple Sed736693 +Node: Igawk Program739755 +Ref: Igawk Program-Footnote-1754059 +Ref: Igawk Program-Footnote-2754260 +Node: Anagram Program754398 +Node: Signature Program757466 +Node: Programs Summary758713 +Node: Programs Exercises759928 +Ref: Programs Exercises-Footnote-1764059 +Node: Advanced Features764150 +Node: Nondecimal Data766098 +Node: Array Sorting767675 +Node: Controlling Array Traversal768372 +Node: Array Sorting Functions776652 +Ref: Array Sorting Functions-Footnote-1780559 +Node: Two-way I/O780753 +Ref: Two-way I/O-Footnote-1785697 +Ref: Two-way I/O-Footnote-2785876 +Node: TCP/IP Networking785958 +Node: Profiling788803 +Node: Advanced Features Summary796345 +Node: Internationalization798209 +Node: I18N and L10N799689 +Node: Explaining gettext800375 +Ref: Explaining gettext-Footnote-1805401 +Ref: Explaining gettext-Footnote-2805585 +Node: Programmer i18n805750 +Ref: Programmer i18n-Footnote-1810544 +Node: Translator i18n810593 +Node: String Extraction811387 +Ref: String Extraction-Footnote-1812520 +Node: Printf Ordering812606 +Ref: Printf Ordering-Footnote-1815388 +Node: I18N Portability815452 +Ref: I18N Portability-Footnote-1817901 +Node: I18N Example817964 +Ref: I18N Example-Footnote-1820670 +Node: Gawk I18N820742 +Node: I18N Summary821380 +Node: Debugger822719 +Node: Debugging823741 +Node: Debugging Concepts824182 +Node: Debugging Terms826038 +Node: Awk Debugging828635 +Node: Sample Debugging Session829527 +Node: Debugger Invocation830047 +Node: Finding The Bug831383 +Node: List of Debugger Commands837862 +Node: Breakpoint Control839194 +Node: Debugger Execution Control842858 +Node: Viewing And Changing Data846218 +Node: Execution Stack849576 +Node: Debugger Info851089 +Node: Miscellaneous Debugger Commands855083 +Node: Readline Support860267 +Node: Limitations861159 +Node: Debugging Summary863432 +Node: Arbitrary Precision Arithmetic864600 +Node: Computer Arithmetic866087 +Ref: Computer Arithmetic-Footnote-1870474 +Node: Math Definitions870531 +Ref: table-ieee-formats873820 +Ref: Math Definitions-Footnote-1874360 +Node: MPFR features874463 +Node: FP Math Caution876080 +Ref: FP Math Caution-Footnote-1877130 +Node: Inexactness of computations877499 +Node: Inexact representation878447 +Node: Comparing FP Values879802 +Node: Errors accumulate880766 +Node: Getting Accuracy882199 +Node: Try To Round884858 +Node: Setting precision885757 +Ref: table-predefined-precision-strings886439 +Node: Setting the rounding mode888232 +Ref: table-gawk-rounding-modes888596 +Ref: Setting the rounding mode-Footnote-1892050 +Node: Arbitrary Precision Integers892229 +Ref: Arbitrary Precision Integers-Footnote-1895210 +Node: POSIX Floating Point Problems895359 +Ref: POSIX Floating Point Problems-Footnote-1899235 +Node: Floating point summary899273 +Node: Dynamic Extensions901477 +Node: Extension Intro903029 +Node: Plugin License904294 +Node: Extension Mechanism Outline904979 +Ref: figure-load-extension905403 +Ref: figure-load-new-function906888 +Ref: figure-call-new-function907890 +Node: Extension API Description909874 +Node: Extension API Functions Introduction911324 +Node: General Data Types916191 +Ref: General Data Types-Footnote-1921884 +Node: Requesting Values922183 +Ref: table-value-types-returned922920 +Node: Memory Allocation Functions923878 +Ref: Memory Allocation Functions-Footnote-1926625 +Node: Constructor Functions926721 +Node: Registration Functions928479 +Node: Extension Functions929164 +Node: Exit Callback Functions931466 +Node: Extension Version String932714 +Node: Input Parsers933364 +Node: Output Wrappers943178 +Node: Two-way processors947694 +Node: Printing Messages949898 +Ref: Printing Messages-Footnote-1950975 +Node: Updating `ERRNO'951127 +Node: Accessing Parameters951866 +Node: Symbol Table Access953096 +Node: Symbol table by name953610 +Node: Symbol table by cookie955586 +Ref: Symbol table by cookie-Footnote-1959719 +Node: Cached values959782 +Ref: Cached values-Footnote-1963286 +Node: Array Manipulation963377 +Ref: Array Manipulation-Footnote-1964475 +Node: Array Data Types964514 +Ref: Array Data Types-Footnote-1967217 +Node: Array Functions967309 +Node: Flattening Arrays971183 +Node: Creating Arrays978035 +Node: Extension API Variables982766 +Node: Extension Versioning983402 +Node: Extension API Informational Variables985303 +Node: Extension API Boilerplate986389 +Node: Finding Extensions990193 +Node: Extension Example990753 +Node: Internal File Description991483 +Node: Internal File Ops995574 +Ref: Internal File Ops-Footnote-11007006 +Node: Using Internal File Ops1007146 +Ref: Using Internal File Ops-Footnote-11009493 +Node: Extension Samples1009761 +Node: Extension Sample File Functions1011285 +Node: Extension Sample Fnmatch1018853 +Node: Extension Sample Fork1020335 +Node: Extension Sample Inplace1021548 +Node: Extension Sample Ord1023223 +Node: Extension Sample Readdir1024059 +Ref: table-readdir-file-types1024915 +Node: Extension Sample Revout1025714 +Node: Extension Sample Rev2way1026305 +Node: Extension Sample Read write array1027046 +Node: Extension Sample Readfile1028925 +Node: Extension Sample API Tests1030025 +Node: Extension Sample Time1030550 +Node: gawkextlib1031865 +Node: Extension summary1034678 +Node: Extension Exercises1038371 +Node: Language History1039093 +Node: V7/SVR3.11040736 +Node: SVR41043056 +Node: POSIX1044498 +Node: BTL1045884 +Node: POSIX/GNU1046618 +Node: Feature History1052334 +Node: Common Extensions1065425 +Node: Ranges and Locales1066737 +Ref: Ranges and Locales-Footnote-11071354 +Ref: Ranges and Locales-Footnote-21071381 +Ref: Ranges and Locales-Footnote-31071615 +Node: Contributors1071836 +Node: History summary1077261 +Node: Installation1078630 +Node: Gawk Distribution1079581 +Node: Getting1080065 +Node: Extracting1080889 +Node: Distribution contents1082531 +Node: Unix Installation1088248 +Node: Quick Installation1088865 +Node: Additional Configuration Options1091307 +Node: Configuration Philosophy1093045 +Node: Non-Unix Installation1095396 +Node: PC Installation1095854 +Node: PC Binary Installation1097165 +Node: PC Compiling1099013 +Ref: PC Compiling-Footnote-11102012 +Node: PC Testing1102117 +Node: PC Using1103293 +Node: Cygwin1107445 +Node: MSYS1108254 +Node: VMS Installation1108768 +Node: VMS Compilation1109564 +Ref: VMS Compilation-Footnote-11110786 +Node: VMS Dynamic Extensions1110844 +Node: VMS Installation Details1112217 +Node: VMS Running1114469 +Node: VMS GNV1117303 +Node: VMS Old Gawk1118026 +Node: Bugs1118496 +Node: Other Versions1122500 +Node: Installation summary1128727 +Node: Notes1129783 +Node: Compatibility Mode1130648 +Node: Additions1131430 +Node: Accessing The Source1132355 +Node: Adding Code1133791 +Node: New Ports1139969 +Node: Derived Files1144450 +Ref: Derived Files-Footnote-11149531 +Ref: Derived Files-Footnote-21149565 +Ref: Derived Files-Footnote-31150161 +Node: Future Extensions1150275 +Node: Implementation Limitations1150881 +Node: Extension Design1152129 +Node: Old Extension Problems1153283 +Ref: Old Extension Problems-Footnote-11154800 +Node: Extension New Mechanism Goals1154857 +Ref: Extension New Mechanism Goals-Footnote-11158217 +Node: Extension Other Design Decisions1158406 +Node: Extension Future Growth1160512 +Node: Old Extension Mechanism1161348 +Node: Notes summary1163110 +Node: Basic Concepts1164296 +Node: Basic High Level1164977 +Ref: figure-general-flow1165249 +Ref: figure-process-flow1165848 +Ref: Basic High Level-Footnote-11169077 +Node: Basic Data Typing1169262 +Node: Glossary1172590 +Node: Copying1197742 +Node: GNU Free Documentation License1235298 +Node: Index1260434  End Tag Table -- cgit v1.2.3