diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | doc/ChangeLog | 4 | ||||
-rw-r--r-- | doc/gawk.info | 1224 | ||||
-rw-r--r-- | doc/gawk.texi | 106 | ||||
-rw-r--r-- | doc/gawktexi.in | 106 | ||||
-rw-r--r-- | symbol.c | 1 |
6 files changed, 735 insertions, 715 deletions
@@ -1,3 +1,10 @@ +2015-01-20 Arnold D. Robbins <arnold@skeeve.com> + + * gawkapi.c (api_set_array_element): Remove useless call to + make_aname. + * symbol.c (load_symbols): Ditto. + Thanks to Andrew Schorr for pointing out the problem. + 2015-01-19 Arnold D. Robbins <arnold@skeeve.com> * awkgram.c: Update to bison 3.0.3. @@ -1974,7 +1981,7 @@ 2012-12-25 Arnold D. Robbins <arnold@skeeve.com> Remove sym-constant from API after discussions with John - Haque and Andy Schorr. + Haque and Andrew Schorr. * gawkapi.h (api_sym_constant): Removed field in API struct. (sym_constant): Remove macro. diff --git a/doc/ChangeLog b/doc/ChangeLog index 1e2d7af3..5dd32735 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2015-01-20 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: O'Reilly fixes. + 2015-01-19 Arnold D. Robbins <arnold@skeeve.com> * gawkinet.texi: Fix capitalization in document title. diff --git a/doc/gawk.info b/doc/gawk.info index ba5dbdf5..10085b35 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -1050,8 +1050,8 @@ in *note Sample Programs::, should be of interest. - *note Arrays::, covers `awk''s one-and-only data structure: the associative array. Deleting array elements and whole - arrays is also described, as well as sorting arrays in - `gawk'. It also describes how `gawk' provides arrays of + arrays is described, as well as sorting arrays in `gawk'. + The major node also describes how `gawk' provides arrays of arrays. - *note Functions::, describes the built-in functions `awk' and @@ -1060,14 +1060,13 @@ in *note Sample Programs::, should be of interest. indirectly. * Part II shows how to use `awk' and `gawk' for problem solving. - There is lots of code here for you to read and learn from. It - contains the following chapters: + There is lots of code here for you to read and learn from. This + part contains the following chapters: - - *note Library Functions::, which provides a number of - functions meant to be used from main `awk' programs. + - *note Library Functions::, provides a number of functions + meant to be used from main `awk' programs. - - *note Sample Programs::, which provides many sample `awk' - programs. + - *note Sample Programs::, provides many sample `awk' programs. Reading these two chapters allows you to see `awk' solving real problems. @@ -1099,7 +1098,7 @@ in *note Sample Programs::, should be of interest. It contains the following appendices: - *note Language History::, describes how the `awk' language - has evolved since its first release to present. It also + has evolved since its first release to the present. It also describes how `gawk' has acquired features over time. - *note Installation::, describes how to get `gawk', how to @@ -1116,7 +1115,7 @@ in *note Sample Programs::, should be of interest. material for those who are completely unfamiliar with computer programming. - The *note Glossary::, defines most, if not all of, the + The *note Glossary::, defines most, if not all, of the significant terms used throughout the Info file. If you find terms that you aren't familiar with, try looking them up here. @@ -1145,8 +1144,8 @@ node briefly documents the typographical conventions used in Texinfo. 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 -output. Error messages, and other output on the command's standard -error, are preceded by the glyph "error-->". For example: +output. Error messages and other output on the command's standard +error are preceded by the glyph "error-->". For example: $ echo hi on stdout -| hi on stdout @@ -1158,7 +1157,7 @@ particular, there are special characters called "control characters." These are characters that you type by holding down both the `CONTROL' 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. +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 @@ -1174,7 +1173,7 @@ Dark Corners Until the POSIX standard (and `GAWK: Effective AWK Programming'), many features of `awk' were either poorly documented or not documented at all. Descriptions of such features (often called "dark corners") -are noted in this Info file with "(d.c.)". They also appear in the +are noted in this Info file with "(d.c.)." They also appear in the index under the heading "dark corner." But, as noted by the opening quote, any coverage of dark corners is @@ -1197,8 +1196,8 @@ editor. GNU Emacs is the most widely used version of Emacs today. The GNU(1) Project is an ongoing effort on the part of the Free Software Foundation to create a complete, freely distributable, -POSIX-compliant computing environment. The FSF uses the "GNU General -Public License" (GPL) to ensure that their software's source code is +POSIX-compliant computing environment. The FSF uses the GNU General +Public License (GPL) to ensure that its software's source code is always available to the end user. A copy of the GPL is included for your reference (*note Copying::). The GPL applies to the C language source code for `gawk'. To find out more about the FSF and the GNU @@ -1226,26 +1225,26 @@ original, "old" version of `awk'. I started working with that version in the fall of 1988. As work on it progressed, the FSF published several preliminary versions (numbered -0.X). In 1996, Edition 1.0 was released with `gawk' 3.0.0. The FSF +0.X). In 1996, edition 1.0 was released with `gawk' 3.0.0. The FSF published the first two editions under the title `The GNU Awk User's Guide'. This edition maintains the basic structure of the previous editions. For FSF edition 4.0, the content was thoroughly reviewed and updated. All references to `gawk' versions prior to 4.0 were removed. Of -significant note for that edition was *note Debugger::. +significant note for that edition was the addition of *note Debugger::. For FSF edition 4.1, the content has been reorganized into parts, and the major new additions are *note Arbitrary Precision Arithmetic::, and *note Dynamic Extensions::. This Info file will undoubtedly continue to evolve. If you find an -error in this Info file, please report it! *Note Bugs::, for +error in the Info file, please report it! *Note Bugs::, for information on submitting problem reports electronically. ---------- Footnotes ---------- - (1) GNU stands for "GNU's not Unix." + (1) GNU stands for "GNU's Not Unix." (2) The terminology "GNU/Linux" is explained in the *note Glossary::. @@ -1289,7 +1288,7 @@ acknowledgments: this manual. Jay Fenlason contributed many ideas and sample programs. Richard Mlynarik and Robert Chassell gave helpful comments on drafts of this manual. The paper `A Supplemental - Document for `awk'' by John W. Pierce of the Chemistry Department + Document for AWK' by John W. Pierce of the Chemistry Department at UC San Diego, pinpointed several issues relevant both to `awk' implementation and to this manual, that would otherwise have escaped us. @@ -1302,7 +1301,7 @@ GNU Project. acknowledgements: The following people (in alphabetical order) provided helpful - comments on various versions of this book, Rick Adams, Dr. Nelson + comments on various versions of this book: Rick Adams, Dr. Nelson H.F. Beebe, Karl Berry, Dr. Michael Brennan, Rich Burridge, Claire Cloutier, Diane Close, Scott Deifik, Christopher ("Topher") Eliot, Jeffrey Friedl, Dr. Darrel Hankerson, Michal Jaegermann, Dr. @@ -1311,7 +1310,7 @@ acknowledgements: Robert J. Chassell provided much valuable advice on the use of Texinfo. He also deserves special thanks for convincing me _not_ - to title this Info file `How To Gawk Politely'. Karl Berry helped + to title this Info file `How to Gawk Politely'. Karl Berry helped significantly with the TeX part of Texinfo. I would like to thank Marshall and Elaine Hartholz of Seattle and @@ -1351,18 +1350,18 @@ of people. *Note Contributors::, for the full list. Thanks to Michael Brennan for the Forewords. Thanks to Patrice Dumas for the new `makeinfo' program. Thanks to -Karl Berry who continues to work to keep the Texinfo markup language +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. + I would also like to thank Brian Kernighan for his invaluable +assistance during the testing and debugging of `gawk', and for his +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 for @@ -1405,10 +1404,10 @@ contain "function definitions", an advanced feature that we will ignore for now; *note User-defined::). Each rule specifies one pattern to search for and one action to perform upon finding the pattern. - Syntactically, a rule consists of a pattern followed by an action. -The action is enclosed in braces to separate it from the pattern. -Newlines usually separate rules. Therefore, an `awk' program looks -like this: + Syntactically, a rule consists of a "pattern" followed by an +"action". The action is enclosed in braces to separate it from the +pattern. Newlines usually separate rules. Therefore, an `awk' program +looks like this: PATTERN { ACTION } PATTERN { ACTION } @@ -1476,7 +1475,7 @@ program as the first argument of the `awk' command, like this: awk 'PROGRAM' INPUT-FILE1 INPUT-FILE2 ... -where PROGRAM consists of a series of PATTERNS and ACTIONS, as +where PROGRAM consists of a series of patterns and actions, as described earlier. This command format instructs the "shell", or command interpreter, @@ -1491,8 +1490,8 @@ programs from shell scripts, because it avoids the need for a separate file for the `awk' program. A self-contained shell script is more reliable because there are no other files to misplace. - Later in this chapter, *note Very Simple::, presents several short, -self-contained programs. + Later in this chapter, in *note Very Simple::, we'll see examples of +several short, self-contained programs. File: gawk.info, Node: Read Terminal, Next: Long, Prev: One-shot, Up: Running gawk @@ -1507,7 +1506,7 @@ following command line: `awk' applies the PROGRAM to the "standard input", which usually means whatever you type on the keyboard. This continues until you indicate -end-of-file by typing `Ctrl-d'. (On other operating systems, the +end-of-file by typing `Ctrl-d'. (On non-POSIX operating systems, the end-of-file character may be different. For example, on OS/2, it is `Ctrl-z'.) @@ -1582,10 +1581,9 @@ that are provided on the `awk' command line. (Also, placing the program in a file allows us to use a literal single quote in the program text, instead of the magic `\47'.) - If you want to clearly identify your `awk' program files as such, -you can add the extension `.awk' to the file name. This doesn't affect -the execution of the `awk' program but it does make "housekeeping" -easier. + If you want to clearly identify an `awk' program file as such, you +can add the extension `.awk' to the file name. This doesn't affect the +execution of the `awk' program but it does make "housekeeping" easier. File: gawk.info, Node: Executable Scripts, Next: Comments, Prev: Long, Up: Running gawk @@ -1714,7 +1712,7 @@ at a later time. File: gawk.info, Node: Quoting, Prev: Comments, Up: Running gawk -1.1.6 Shell-Quoting Issues +1.1.6 Shell Quoting Issues -------------------------- * Menu: @@ -1809,7 +1807,7 @@ shell quoting tricks, like this: -| Here is a single quote <'> This program consists of three concatenated quoted strings. The first -and the third are single quoted, the second is double quoted. +and the third are single-quoted, and the second is double-quoted. This can be "simplified" to: @@ -1836,8 +1834,7 @@ like so: $ awk 'BEGIN { print "Here is a double quote <\42>" }' -| Here is a double quote <"> -This works nicely, except that you should comment clearly what the -escapes mean. +This works nicely, but you should comment clearly what the escapes mean. A fourth option is to use command-line variable assignment, like this: @@ -1846,11 +1843,11 @@ this: -| Here is a single quote <'> (Here, the two string constants and the value of `sq' are -concatenated into a single string which is printed by `print'.) +concatenated into a single string that is printed by `print'.) If you really need both single and double quotes in your `awk' program, it is probably best to move it into a separate file, where the -shell won't be part of the picture, and you can say what you mean. +shell won't be part of the picture and you can say what you mean. File: gawk.info, Node: DOS Quoting, Up: Quoting @@ -1908,7 +1905,7 @@ 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. An empty line separates -the data for the two years. +the data for the two years: Jan 13 25 15 115 Feb 15 32 24 226 @@ -1940,7 +1937,7 @@ File: gawk.info, Node: Very Simple, Next: Two Rules, Prev: Sample Data Files, The following command runs a simple `awk' program that searches the input file `mail-list' for the character string `li' (a grouping of characters is usually called a "string"; the term "string" is based on -similar usage in English, such as "a string of pearls," or "a string of +similar usage in English, such as "a string of pearls" or "a string of cars in a train"): awk '/li/ { print $0 }' mail-list @@ -1976,24 +1973,25 @@ prints all lines matching the pattern `li'. By comparison, omitting the `print' statement but retaining the braces makes an empty action that does nothing (i.e., no lines are printed). - Many practical `awk' programs are just a line or two. Following is a -collection of useful, short programs to get you started. Some of these -programs contain constructs that haven't been covered yet. (The -description of the program will give you a good idea of what is going -on, but you'll need to read the rest of the Info file to become an -`awk' expert!) Most of the examples use a data file named `data'. -This is just a placeholder; if you use these programs yourself, -substitute your own file names for `data'. For future reference, note -that there is 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: + Many practical `awk' programs are just a line or two long. +Following is a collection of useful, short programs to get you started. +Some of these programs contain constructs that haven't been covered +yet. (The description of the program will give you a good idea of what +is going on, but you'll need to read the rest of the Info file to +become an `awk' expert!) Most of the examples use a data file named +`data'. This is just a placeholder; if you use these programs +yourself, substitute your own file names for `data'. For future +reference, note that there is 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 every line that is longer than 80 characters: awk 'length($0) > 80' data - The sole rule has a relational expression as its pattern and it - has no action--so it uses the default action, printing the record. + The sole rule has a relational expression as its pattern and has no + action--so it uses the default action, printing the record. * Print the length of the longest input line: @@ -2048,8 +2046,8 @@ come up with different ways to do the same things shown here: awk 'NR % 2 == 0' data - If you use the expression `NR % 2 == 1' instead, the program would - print the odd-numbered lines. + If you used the expression `NR % 2 == 1' instead, the program + would print the odd-numbered lines. File: gawk.info, Node: Two Rules, Next: More Complex, Prev: Very Simple, Up: Getting Started @@ -5926,7 +5924,7 @@ the same as specifying no timeout at all. implicit loop that reads input records and matches them against patterns, like so: - $ gawk 'BEGIN { PROCINFO["-", "READ_TIMEOUT"] = 5000 } + $ gawk 'BEGIN { PROCINFO["-", "READ_TIMEOUT"] = 5000 } > { print "You entered: " $0 }' gawk -| You entered: gawk @@ -32738,7 +32736,7 @@ Index * exit the debugger: Miscellaneous Debugger Commands. (line 99) * exp: Numeric Functions. (line 33) -* expand utility: Very Simple. (line 72) +* expand utility: Very Simple. (line 73) * Expat XML parser library: gawkextlib. (line 33) * exponent: Numeric Functions. (line 33) * expressions: Expressions. (line 6) @@ -34582,552 +34580,552 @@ Node: History51713 Node: Names54064 Ref: Names-Footnote-155157 Node: This Manual55303 -Ref: This Manual-Footnote-161808 -Node: Conventions61908 -Node: Manual History64246 -Ref: Manual History-Footnote-167228 -Ref: Manual History-Footnote-267269 -Node: How To Contribute67343 -Node: Acknowledgments68472 -Node: Getting Started73277 -Node: Running gawk75710 -Node: One-shot76900 -Node: Read Terminal78148 -Node: Long80175 -Node: Executable Scripts81691 -Ref: Executable Scripts-Footnote-184480 -Node: Comments84583 -Node: Quoting87065 -Node: DOS Quoting92589 -Node: Sample Data Files93264 -Node: Very Simple95859 -Node: Two Rules100757 -Node: More Complex102643 -Node: Statements/Lines105505 -Ref: Statements/Lines-Footnote-1109960 -Node: Other Features110225 -Node: When111156 -Ref: When-Footnote-1112910 -Node: Intro Summary112975 -Node: Invoking Gawk113858 -Node: Command Line115372 -Node: Options116170 -Ref: Options-Footnote-1131974 -Ref: Options-Footnote-2132203 -Node: Other Arguments132228 -Node: Naming Standard Input135176 -Node: Environment Variables136269 -Node: AWKPATH Variable136827 -Ref: AWKPATH Variable-Footnote-1140240 -Ref: AWKPATH Variable-Footnote-2140285 -Node: AWKLIBPATH Variable140545 -Node: Other Environment Variables141801 -Node: Exit Status145289 -Node: Include Files145965 -Node: Loading Shared Libraries149562 -Node: Obsolete150989 -Node: Undocumented151686 -Node: Invoking Summary151953 -Node: Regexp153617 -Node: Regexp Usage155071 -Node: Escape Sequences157108 -Node: Regexp Operators163349 -Ref: Regexp Operators-Footnote-1170775 -Ref: Regexp Operators-Footnote-2170922 -Node: Bracket Expressions171020 -Ref: table-char-classes173035 -Node: Leftmost Longest175959 -Node: Computed Regexps177261 -Node: GNU Regexp Operators180658 -Node: Case-sensitivity184331 -Ref: Case-sensitivity-Footnote-1187216 -Ref: Case-sensitivity-Footnote-2187451 -Node: Regexp Summary187559 -Node: Reading Files189026 -Node: Records191189 -Node: awk split records191922 -Node: gawk split records196837 -Ref: gawk split records-Footnote-1201381 -Node: Fields201418 -Ref: Fields-Footnote-1204194 -Node: Nonconstant Fields204280 -Ref: Nonconstant Fields-Footnote-1206523 -Node: Changing Fields206727 -Node: Field Separators212656 -Node: Default Field Splitting215361 -Node: Regexp Field Splitting216478 -Node: Single Character Fields219828 -Node: Command Line Field Separator220887 -Node: Full Line Fields224099 -Ref: Full Line Fields-Footnote-1225616 -Ref: Full Line Fields-Footnote-2225662 -Node: Field Splitting Summary225763 -Node: Constant Size227837 -Node: Splitting By Content232426 -Ref: Splitting By Content-Footnote-1236420 -Node: Multiple Line236583 -Ref: Multiple Line-Footnote-1242469 -Node: Getline242648 -Node: Plain Getline245132 -Node: Getline/Variable247772 -Node: Getline/File248920 -Node: Getline/Variable/File250304 -Ref: Getline/Variable/File-Footnote-1251907 -Node: Getline/Pipe251994 -Node: Getline/Variable/Pipe254677 -Node: Getline/Coprocess255808 -Node: Getline/Variable/Coprocess257060 -Node: Getline Notes257799 -Node: Getline Summary260591 -Ref: table-getline-variants261003 -Node: Read Timeout261832 -Ref: Read Timeout-Footnote-1265723 -Node: Retrying Input265781 -Node: Command-line directories266976 -Node: Input Summary267883 -Node: Input Exercises271184 -Node: Printing271912 -Node: Print273689 -Node: Print Examples275146 -Node: Output Separators277925 -Node: OFMT279943 -Node: Printf281297 -Node: Basic Printf282082 -Node: Control Letters283652 -Node: Format Modifiers287635 -Node: Printf Examples293644 -Node: Redirection296130 -Node: Special FD302971 -Ref: Special FD-Footnote-1306131 -Node: Special Files306205 -Node: Other Inherited Files306822 -Node: Special Network307822 -Node: Special Caveats308684 -Node: Close Files And Pipes309635 -Ref: Close Files And Pipes-Footnote-1316817 -Ref: Close Files And Pipes-Footnote-2316965 -Node: Output Summary317115 -Node: Output Exercises318113 -Node: Expressions318793 -Node: Values319978 -Node: Constants320656 -Node: Scalar Constants321347 -Ref: Scalar Constants-Footnote-1322206 -Node: Nondecimal-numbers322456 -Node: Regexp Constants325474 -Node: Using Constant Regexps325999 -Node: Variables329142 -Node: Using Variables329797 -Node: Assignment Options331708 -Node: Conversion333583 -Node: Strings And Numbers334107 -Ref: Strings And Numbers-Footnote-1337172 -Node: Locale influences conversions337281 -Ref: table-locale-affects340028 -Node: All Operators340616 -Node: Arithmetic Ops341246 -Node: Concatenation343751 -Ref: Concatenation-Footnote-1346570 -Node: Assignment Ops346676 -Ref: table-assign-ops351655 -Node: Increment Ops352927 -Node: Truth Values and Conditions356365 -Node: Truth Values357450 -Node: Typing and Comparison358499 -Node: Variable Typing359309 -Node: Comparison Operators362962 -Ref: table-relational-ops363372 -Node: POSIX String Comparison366867 -Ref: POSIX String Comparison-Footnote-1367939 -Node: Boolean Ops368077 -Ref: Boolean Ops-Footnote-1372556 -Node: Conditional Exp372647 -Node: Function Calls374374 -Node: Precedence378254 -Node: Locales381915 -Node: Expressions Summary383547 -Node: Patterns and Actions386107 -Node: Pattern Overview387227 -Node: Regexp Patterns388906 -Node: Expression Patterns389449 -Node: Ranges393159 -Node: BEGIN/END396265 -Node: Using BEGIN/END397026 -Ref: Using BEGIN/END-Footnote-1399760 -Node: I/O And BEGIN/END399866 -Node: BEGINFILE/ENDFILE402180 -Node: Empty405081 -Node: Using Shell Variables405398 -Node: Action Overview407671 -Node: Statements409997 -Node: If Statement411845 -Node: While Statement413340 -Node: Do Statement415369 -Node: For Statement416513 -Node: Switch Statement419670 -Node: Break Statement422052 -Node: Continue Statement424093 -Node: Next Statement425920 -Node: Nextfile Statement428301 -Node: Exit Statement430931 -Node: Built-in Variables433334 -Node: User-modified434467 -Ref: User-modified-Footnote-1442148 -Node: Auto-set442210 -Ref: Auto-set-Footnote-1456426 -Ref: Auto-set-Footnote-2456631 -Node: ARGC and ARGV456687 -Node: Pattern Action Summary460905 -Node: Arrays463332 -Node: Array Basics464661 -Node: Array Intro465505 -Ref: figure-array-elements467469 -Ref: Array Intro-Footnote-1469995 -Node: Reference to Elements470123 -Node: Assigning Elements472575 -Node: Array Example473066 -Node: Scanning an Array474824 -Node: Controlling Scanning477840 -Ref: Controlling Scanning-Footnote-1483036 -Node: Numeric Array Subscripts483352 -Node: Uninitialized Subscripts485537 -Node: Delete487154 -Ref: Delete-Footnote-1489897 -Node: Multidimensional489954 -Node: Multiscanning493051 -Node: Arrays of Arrays494640 -Node: Arrays Summary499399 -Node: Functions501491 -Node: Built-in502390 -Node: Calling Built-in503468 -Node: Numeric Functions505459 -Ref: Numeric Functions-Footnote-1510278 -Ref: Numeric Functions-Footnote-2510635 -Ref: Numeric Functions-Footnote-3510683 -Node: String Functions510955 -Ref: String Functions-Footnote-1534430 -Ref: String Functions-Footnote-2534559 -Ref: String Functions-Footnote-3534807 -Node: Gory Details534894 -Ref: table-sub-escapes536675 -Ref: table-sub-proposed538195 -Ref: table-posix-sub539559 -Ref: table-gensub-escapes541095 -Ref: Gory Details-Footnote-1541927 -Node: I/O Functions542078 -Ref: I/O Functions-Footnote-1549296 -Node: Time Functions549443 -Ref: Time Functions-Footnote-1559931 -Ref: Time Functions-Footnote-2559999 -Ref: Time Functions-Footnote-3560157 -Ref: Time Functions-Footnote-4560268 -Ref: Time Functions-Footnote-5560380 -Ref: Time Functions-Footnote-6560607 -Node: Bitwise Functions560873 -Ref: table-bitwise-ops561435 -Ref: Bitwise Functions-Footnote-1565744 -Node: Type Functions565913 -Node: I18N Functions567064 -Node: User-defined568709 -Node: Definition Syntax569514 -Ref: Definition Syntax-Footnote-1574921 -Node: Function Example574992 -Ref: Function Example-Footnote-1577911 -Node: Function Caveats577933 -Node: Calling A Function578451 -Node: Variable Scope579409 -Node: Pass By Value/Reference582397 -Node: Return Statement585892 -Node: Dynamic Typing588873 -Node: Indirect Calls589802 -Ref: Indirect Calls-Footnote-1601104 -Node: Functions Summary601232 -Node: Library Functions603934 -Ref: Library Functions-Footnote-1607543 -Ref: Library Functions-Footnote-2607686 -Node: Library Names607857 -Ref: Library Names-Footnote-1611311 -Ref: Library Names-Footnote-2611534 -Node: General Functions611620 -Node: Strtonum Function612723 -Node: Assert Function615745 -Node: Round Function619069 -Node: Cliff Random Function620610 -Node: Ordinal Functions621626 -Ref: Ordinal Functions-Footnote-1624689 -Ref: Ordinal Functions-Footnote-2624941 -Node: Join Function625152 -Ref: Join Function-Footnote-1626921 -Node: Getlocaltime Function627121 -Node: Readfile Function630865 -Node: Shell Quoting632835 -Node: Data File Management634236 -Node: Filetrans Function634868 -Node: Rewind Function638924 -Node: File Checking640311 -Ref: File Checking-Footnote-1641643 -Node: Empty Files641844 -Node: Ignoring Assigns643823 -Node: Getopt Function645374 -Ref: Getopt Function-Footnote-1656836 -Node: Passwd Functions657036 -Ref: Passwd Functions-Footnote-1665873 -Node: Group Functions665961 -Ref: Group Functions-Footnote-1673855 -Node: Walking Arrays674068 -Node: Library Functions Summary675671 -Node: Library Exercises677072 -Node: Sample Programs678352 -Node: Running Examples679122 -Node: Clones679850 -Node: Cut Program681074 -Node: Egrep Program690793 -Ref: Egrep Program-Footnote-1698291 -Node: Id Program698401 -Node: Split Program702046 -Ref: Split Program-Footnote-1705494 -Node: Tee Program705622 -Node: Uniq Program708411 -Node: Wc Program715830 -Ref: Wc Program-Footnote-1720080 -Node: Miscellaneous Programs720174 -Node: Dupword Program721387 -Node: Alarm Program723418 -Node: Translate Program728222 -Ref: Translate Program-Footnote-1732787 -Node: Labels Program733057 -Ref: Labels Program-Footnote-1736408 -Node: Word Sorting736492 -Node: History Sorting740563 -Node: Extract Program742399 -Node: Simple Sed749924 -Node: Igawk Program752992 -Ref: Igawk Program-Footnote-1767316 -Ref: Igawk Program-Footnote-2767517 -Ref: Igawk Program-Footnote-3767639 -Node: Anagram Program767754 -Node: Signature Program770811 -Node: Programs Summary772058 -Node: Programs Exercises773251 -Ref: Programs Exercises-Footnote-1777382 -Node: Advanced Features777473 -Node: Nondecimal Data779421 -Node: Array Sorting781011 -Node: Controlling Array Traversal781708 -Ref: Controlling Array Traversal-Footnote-1790041 -Node: Array Sorting Functions790159 -Ref: Array Sorting Functions-Footnote-1794048 -Node: Two-way I/O794244 -Ref: Two-way I/O-Footnote-1799189 -Ref: Two-way I/O-Footnote-2799375 -Node: TCP/IP Networking799457 -Node: Profiling802330 -Node: Advanced Features Summary810607 -Node: Internationalization812540 -Node: I18N and L10N814020 -Node: Explaining gettext814706 -Ref: Explaining gettext-Footnote-1819731 -Ref: Explaining gettext-Footnote-2819915 -Node: Programmer i18n820080 -Ref: Programmer i18n-Footnote-1824946 -Node: Translator i18n824995 -Node: String Extraction825789 -Ref: String Extraction-Footnote-1826920 -Node: Printf Ordering827006 -Ref: Printf Ordering-Footnote-1829792 -Node: I18N Portability829856 -Ref: I18N Portability-Footnote-1832311 -Node: I18N Example832374 -Ref: I18N Example-Footnote-1835177 -Node: Gawk I18N835249 -Node: I18N Summary835887 -Node: Debugger837226 -Node: Debugging838248 -Node: Debugging Concepts838689 -Node: Debugging Terms840542 -Node: Awk Debugging843114 -Node: Sample Debugging Session844008 -Node: Debugger Invocation844528 -Node: Finding The Bug845912 -Node: List of Debugger Commands852387 -Node: Breakpoint Control853720 -Node: Debugger Execution Control857416 -Node: Viewing And Changing Data860780 -Node: Execution Stack864158 -Node: Debugger Info865795 -Node: Miscellaneous Debugger Commands869812 -Node: Readline Support874841 -Node: Limitations875733 -Node: Debugging Summary877847 -Node: Arbitrary Precision Arithmetic879015 -Node: Computer Arithmetic880431 -Ref: table-numeric-ranges884029 -Ref: Computer Arithmetic-Footnote-1884888 -Node: Math Definitions884945 -Ref: table-ieee-formats888233 -Ref: Math Definitions-Footnote-1888837 -Node: MPFR features888942 -Node: FP Math Caution890613 -Ref: FP Math Caution-Footnote-1891663 -Node: Inexactness of computations892032 -Node: Inexact representation892991 -Node: Comparing FP Values894348 -Node: Errors accumulate895430 -Node: Getting Accuracy896863 -Node: Try To Round899525 -Node: Setting precision900424 -Ref: table-predefined-precision-strings901108 -Node: Setting the rounding mode902897 -Ref: table-gawk-rounding-modes903261 -Ref: Setting the rounding mode-Footnote-1906716 -Node: Arbitrary Precision Integers906895 -Ref: Arbitrary Precision Integers-Footnote-1911794 -Node: POSIX Floating Point Problems911943 -Ref: POSIX Floating Point Problems-Footnote-1915816 -Node: Floating point summary915854 -Node: Dynamic Extensions918048 -Node: Extension Intro919600 -Node: Plugin License920866 -Node: Extension Mechanism Outline921663 -Ref: figure-load-extension922091 -Ref: figure-register-new-function923571 -Ref: figure-call-new-function924575 -Node: Extension API Description926561 -Node: Extension API Functions Introduction928095 -Node: General Data Types932967 -Ref: General Data Types-Footnote-1938706 -Node: Memory Allocation Functions939005 -Ref: Memory Allocation Functions-Footnote-1941844 -Node: Constructor Functions941940 -Node: Registration Functions943674 -Node: Extension Functions944359 -Node: Exit Callback Functions946656 -Node: Extension Version String947904 -Node: Input Parsers948569 -Node: Output Wrappers958448 -Node: Two-way processors962963 -Node: Printing Messages965167 -Ref: Printing Messages-Footnote-1966243 -Node: Updating `ERRNO'966395 -Node: Requesting Values967135 -Ref: table-value-types-returned967863 -Node: Accessing Parameters968820 -Node: Symbol Table Access970051 -Node: Symbol table by name970565 -Node: Symbol table by cookie972546 -Ref: Symbol table by cookie-Footnote-1976690 -Node: Cached values976753 -Ref: Cached values-Footnote-1980252 -Node: Array Manipulation980343 -Ref: Array Manipulation-Footnote-1981433 -Node: Array Data Types981470 -Ref: Array Data Types-Footnote-1984125 -Node: Array Functions984217 -Node: Flattening Arrays988071 -Node: Creating Arrays994963 -Node: Redirection API999734 -Node: Extension API Variables1002505 -Node: Extension Versioning1003138 -Node: Extension API Informational Variables1005039 -Node: Extension API Boilerplate1006104 -Node: Finding Extensions1009913 -Node: Extension Example1010473 -Node: Internal File Description1011245 -Node: Internal File Ops1015312 -Ref: Internal File Ops-Footnote-11026982 -Node: Using Internal File Ops1027122 -Ref: Using Internal File Ops-Footnote-11029505 -Node: Extension Samples1029778 -Node: Extension Sample File Functions1031304 -Node: Extension Sample Fnmatch1038942 -Node: Extension Sample Fork1040433 -Node: Extension Sample Inplace1041648 -Node: Extension Sample Ord1043323 -Node: Extension Sample Readdir1044159 -Ref: table-readdir-file-types1045035 -Node: Extension Sample Revout1045846 -Node: Extension Sample Rev2way1046436 -Node: Extension Sample Read write array1047176 -Node: Extension Sample Readfile1049116 -Node: Extension Sample Time1050211 -Node: Extension Sample API Tests1051560 -Node: gawkextlib1052051 -Node: Extension summary1054709 -Node: Extension Exercises1058398 -Node: Language History1059120 -Node: V7/SVR3.11060776 -Node: SVR41062957 -Node: POSIX1064402 -Node: BTL1065791 -Node: POSIX/GNU1066525 -Node: Feature History1072149 -Node: Common Extensions1085247 -Node: Ranges and Locales1086571 -Ref: Ranges and Locales-Footnote-11091189 -Ref: Ranges and Locales-Footnote-21091216 -Ref: Ranges and Locales-Footnote-31091450 -Node: Contributors1091671 -Node: History summary1097212 -Node: Installation1098582 -Node: Gawk Distribution1099528 -Node: Getting1100012 -Node: Extracting1100835 -Node: Distribution contents1102470 -Node: Unix Installation1108535 -Node: Quick Installation1109218 -Node: Shell Startup Files1111629 -Node: Additional Configuration Options1112708 -Node: Configuration Philosophy1114447 -Node: Non-Unix Installation1116816 -Node: PC Installation1117274 -Node: PC Binary Installation1118593 -Node: PC Compiling1120441 -Ref: PC Compiling-Footnote-11123462 -Node: PC Testing1123571 -Node: PC Using1124747 -Node: Cygwin1128862 -Node: MSYS1129685 -Node: VMS Installation1130185 -Node: VMS Compilation1130977 -Ref: VMS Compilation-Footnote-11132199 -Node: VMS Dynamic Extensions1132257 -Node: VMS Installation Details1133941 -Node: VMS Running1136193 -Node: VMS GNV1139029 -Node: VMS Old Gawk1139763 -Node: Bugs1140233 -Node: Other Versions1144116 -Node: Installation summary1150544 -Node: Notes1151600 -Node: Compatibility Mode1152465 -Node: Additions1153247 -Node: Accessing The Source1154172 -Node: Adding Code1155608 -Node: New Ports1161773 -Node: Derived Files1166255 -Ref: Derived Files-Footnote-11171730 -Ref: Derived Files-Footnote-21171764 -Ref: Derived Files-Footnote-31172360 -Node: Future Extensions1172474 -Node: Implementation Limitations1173080 -Node: Extension Design1174328 -Node: Old Extension Problems1175482 -Ref: Old Extension Problems-Footnote-11176999 -Node: Extension New Mechanism Goals1177056 -Ref: Extension New Mechanism Goals-Footnote-11180416 -Node: Extension Other Design Decisions1180605 -Node: Extension Future Growth1182713 -Node: Old Extension Mechanism1183549 -Node: Notes summary1185311 -Node: Basic Concepts1186497 -Node: Basic High Level1187178 -Ref: figure-general-flow1187450 -Ref: figure-process-flow1188049 -Ref: Basic High Level-Footnote-11191278 -Node: Basic Data Typing1191463 -Node: Glossary1194791 -Node: Copying1219949 -Node: GNU Free Documentation License1257505 -Node: Index1282641 +Ref: This Manual-Footnote-161803 +Node: Conventions61903 +Node: Manual History64240 +Ref: Manual History-Footnote-167233 +Ref: Manual History-Footnote-267274 +Node: How To Contribute67348 +Node: Acknowledgments68477 +Node: Getting Started73294 +Node: Running gawk75733 +Node: One-shot76923 +Node: Read Terminal78187 +Node: Long80218 +Node: Executable Scripts81731 +Ref: Executable Scripts-Footnote-184520 +Node: Comments84623 +Node: Quoting87105 +Node: DOS Quoting92623 +Node: Sample Data Files93298 +Node: Very Simple95893 +Node: Two Rules100792 +Node: More Complex102678 +Node: Statements/Lines105540 +Ref: Statements/Lines-Footnote-1109995 +Node: Other Features110260 +Node: When111191 +Ref: When-Footnote-1112945 +Node: Intro Summary113010 +Node: Invoking Gawk113893 +Node: Command Line115407 +Node: Options116205 +Ref: Options-Footnote-1132009 +Ref: Options-Footnote-2132238 +Node: Other Arguments132263 +Node: Naming Standard Input135211 +Node: Environment Variables136304 +Node: AWKPATH Variable136862 +Ref: AWKPATH Variable-Footnote-1140275 +Ref: AWKPATH Variable-Footnote-2140320 +Node: AWKLIBPATH Variable140580 +Node: Other Environment Variables141836 +Node: Exit Status145324 +Node: Include Files146000 +Node: Loading Shared Libraries149597 +Node: Obsolete151024 +Node: Undocumented151721 +Node: Invoking Summary151988 +Node: Regexp153652 +Node: Regexp Usage155106 +Node: Escape Sequences157143 +Node: Regexp Operators163384 +Ref: Regexp Operators-Footnote-1170810 +Ref: Regexp Operators-Footnote-2170957 +Node: Bracket Expressions171055 +Ref: table-char-classes173070 +Node: Leftmost Longest175994 +Node: Computed Regexps177296 +Node: GNU Regexp Operators180693 +Node: Case-sensitivity184366 +Ref: Case-sensitivity-Footnote-1187251 +Ref: Case-sensitivity-Footnote-2187486 +Node: Regexp Summary187594 +Node: Reading Files189061 +Node: Records191224 +Node: awk split records191957 +Node: gawk split records196872 +Ref: gawk split records-Footnote-1201416 +Node: Fields201453 +Ref: Fields-Footnote-1204229 +Node: Nonconstant Fields204315 +Ref: Nonconstant Fields-Footnote-1206558 +Node: Changing Fields206762 +Node: Field Separators212691 +Node: Default Field Splitting215396 +Node: Regexp Field Splitting216513 +Node: Single Character Fields219863 +Node: Command Line Field Separator220922 +Node: Full Line Fields224134 +Ref: Full Line Fields-Footnote-1225651 +Ref: Full Line Fields-Footnote-2225697 +Node: Field Splitting Summary225798 +Node: Constant Size227872 +Node: Splitting By Content232461 +Ref: Splitting By Content-Footnote-1236455 +Node: Multiple Line236618 +Ref: Multiple Line-Footnote-1242504 +Node: Getline242683 +Node: Plain Getline245167 +Node: Getline/Variable247807 +Node: Getline/File248955 +Node: Getline/Variable/File250339 +Ref: Getline/Variable/File-Footnote-1251942 +Node: Getline/Pipe252029 +Node: Getline/Variable/Pipe254712 +Node: Getline/Coprocess255843 +Node: Getline/Variable/Coprocess257095 +Node: Getline Notes257834 +Node: Getline Summary260626 +Ref: table-getline-variants261038 +Node: Read Timeout261867 +Ref: Read Timeout-Footnote-1265757 +Node: Retrying Input265815 +Node: Command-line directories267010 +Node: Input Summary267917 +Node: Input Exercises271218 +Node: Printing271946 +Node: Print273723 +Node: Print Examples275180 +Node: Output Separators277959 +Node: OFMT279977 +Node: Printf281331 +Node: Basic Printf282116 +Node: Control Letters283686 +Node: Format Modifiers287669 +Node: Printf Examples293678 +Node: Redirection296164 +Node: Special FD303005 +Ref: Special FD-Footnote-1306165 +Node: Special Files306239 +Node: Other Inherited Files306856 +Node: Special Network307856 +Node: Special Caveats308718 +Node: Close Files And Pipes309669 +Ref: Close Files And Pipes-Footnote-1316851 +Ref: Close Files And Pipes-Footnote-2316999 +Node: Output Summary317149 +Node: Output Exercises318147 +Node: Expressions318827 +Node: Values320012 +Node: Constants320690 +Node: Scalar Constants321381 +Ref: Scalar Constants-Footnote-1322240 +Node: Nondecimal-numbers322490 +Node: Regexp Constants325508 +Node: Using Constant Regexps326033 +Node: Variables329176 +Node: Using Variables329831 +Node: Assignment Options331742 +Node: Conversion333617 +Node: Strings And Numbers334141 +Ref: Strings And Numbers-Footnote-1337206 +Node: Locale influences conversions337315 +Ref: table-locale-affects340062 +Node: All Operators340650 +Node: Arithmetic Ops341280 +Node: Concatenation343785 +Ref: Concatenation-Footnote-1346604 +Node: Assignment Ops346710 +Ref: table-assign-ops351689 +Node: Increment Ops352961 +Node: Truth Values and Conditions356399 +Node: Truth Values357484 +Node: Typing and Comparison358533 +Node: Variable Typing359343 +Node: Comparison Operators362996 +Ref: table-relational-ops363406 +Node: POSIX String Comparison366901 +Ref: POSIX String Comparison-Footnote-1367973 +Node: Boolean Ops368111 +Ref: Boolean Ops-Footnote-1372590 +Node: Conditional Exp372681 +Node: Function Calls374408 +Node: Precedence378288 +Node: Locales381949 +Node: Expressions Summary383581 +Node: Patterns and Actions386141 +Node: Pattern Overview387261 +Node: Regexp Patterns388940 +Node: Expression Patterns389483 +Node: Ranges393193 +Node: BEGIN/END396299 +Node: Using BEGIN/END397060 +Ref: Using BEGIN/END-Footnote-1399794 +Node: I/O And BEGIN/END399900 +Node: BEGINFILE/ENDFILE402214 +Node: Empty405115 +Node: Using Shell Variables405432 +Node: Action Overview407705 +Node: Statements410031 +Node: If Statement411879 +Node: While Statement413374 +Node: Do Statement415403 +Node: For Statement416547 +Node: Switch Statement419704 +Node: Break Statement422086 +Node: Continue Statement424127 +Node: Next Statement425954 +Node: Nextfile Statement428335 +Node: Exit Statement430965 +Node: Built-in Variables433368 +Node: User-modified434501 +Ref: User-modified-Footnote-1442182 +Node: Auto-set442244 +Ref: Auto-set-Footnote-1456460 +Ref: Auto-set-Footnote-2456665 +Node: ARGC and ARGV456721 +Node: Pattern Action Summary460939 +Node: Arrays463366 +Node: Array Basics464695 +Node: Array Intro465539 +Ref: figure-array-elements467503 +Ref: Array Intro-Footnote-1470029 +Node: Reference to Elements470157 +Node: Assigning Elements472609 +Node: Array Example473100 +Node: Scanning an Array474858 +Node: Controlling Scanning477874 +Ref: Controlling Scanning-Footnote-1483070 +Node: Numeric Array Subscripts483386 +Node: Uninitialized Subscripts485571 +Node: Delete487188 +Ref: Delete-Footnote-1489931 +Node: Multidimensional489988 +Node: Multiscanning493085 +Node: Arrays of Arrays494674 +Node: Arrays Summary499433 +Node: Functions501525 +Node: Built-in502424 +Node: Calling Built-in503502 +Node: Numeric Functions505493 +Ref: Numeric Functions-Footnote-1510312 +Ref: Numeric Functions-Footnote-2510669 +Ref: Numeric Functions-Footnote-3510717 +Node: String Functions510989 +Ref: String Functions-Footnote-1534464 +Ref: String Functions-Footnote-2534593 +Ref: String Functions-Footnote-3534841 +Node: Gory Details534928 +Ref: table-sub-escapes536709 +Ref: table-sub-proposed538229 +Ref: table-posix-sub539593 +Ref: table-gensub-escapes541129 +Ref: Gory Details-Footnote-1541961 +Node: I/O Functions542112 +Ref: I/O Functions-Footnote-1549330 +Node: Time Functions549477 +Ref: Time Functions-Footnote-1559965 +Ref: Time Functions-Footnote-2560033 +Ref: Time Functions-Footnote-3560191 +Ref: Time Functions-Footnote-4560302 +Ref: Time Functions-Footnote-5560414 +Ref: Time Functions-Footnote-6560641 +Node: Bitwise Functions560907 +Ref: table-bitwise-ops561469 +Ref: Bitwise Functions-Footnote-1565778 +Node: Type Functions565947 +Node: I18N Functions567098 +Node: User-defined568743 +Node: Definition Syntax569548 +Ref: Definition Syntax-Footnote-1574955 +Node: Function Example575026 +Ref: Function Example-Footnote-1577945 +Node: Function Caveats577967 +Node: Calling A Function578485 +Node: Variable Scope579443 +Node: Pass By Value/Reference582431 +Node: Return Statement585926 +Node: Dynamic Typing588907 +Node: Indirect Calls589836 +Ref: Indirect Calls-Footnote-1601138 +Node: Functions Summary601266 +Node: Library Functions603968 +Ref: Library Functions-Footnote-1607577 +Ref: Library Functions-Footnote-2607720 +Node: Library Names607891 +Ref: Library Names-Footnote-1611345 +Ref: Library Names-Footnote-2611568 +Node: General Functions611654 +Node: Strtonum Function612757 +Node: Assert Function615779 +Node: Round Function619103 +Node: Cliff Random Function620644 +Node: Ordinal Functions621660 +Ref: Ordinal Functions-Footnote-1624723 +Ref: Ordinal Functions-Footnote-2624975 +Node: Join Function625186 +Ref: Join Function-Footnote-1626955 +Node: Getlocaltime Function627155 +Node: Readfile Function630899 +Node: Shell Quoting632869 +Node: Data File Management634270 +Node: Filetrans Function634902 +Node: Rewind Function638958 +Node: File Checking640345 +Ref: File Checking-Footnote-1641677 +Node: Empty Files641878 +Node: Ignoring Assigns643857 +Node: Getopt Function645408 +Ref: Getopt Function-Footnote-1656870 +Node: Passwd Functions657070 +Ref: Passwd Functions-Footnote-1665907 +Node: Group Functions665995 +Ref: Group Functions-Footnote-1673889 +Node: Walking Arrays674102 +Node: Library Functions Summary675705 +Node: Library Exercises677106 +Node: Sample Programs678386 +Node: Running Examples679156 +Node: Clones679884 +Node: Cut Program681108 +Node: Egrep Program690827 +Ref: Egrep Program-Footnote-1698325 +Node: Id Program698435 +Node: Split Program702080 +Ref: Split Program-Footnote-1705528 +Node: Tee Program705656 +Node: Uniq Program708445 +Node: Wc Program715864 +Ref: Wc Program-Footnote-1720114 +Node: Miscellaneous Programs720208 +Node: Dupword Program721421 +Node: Alarm Program723452 +Node: Translate Program728256 +Ref: Translate Program-Footnote-1732821 +Node: Labels Program733091 +Ref: Labels Program-Footnote-1736442 +Node: Word Sorting736526 +Node: History Sorting740597 +Node: Extract Program742433 +Node: Simple Sed749958 +Node: Igawk Program753026 +Ref: Igawk Program-Footnote-1767350 +Ref: Igawk Program-Footnote-2767551 +Ref: Igawk Program-Footnote-3767673 +Node: Anagram Program767788 +Node: Signature Program770845 +Node: Programs Summary772092 +Node: Programs Exercises773285 +Ref: Programs Exercises-Footnote-1777416 +Node: Advanced Features777507 +Node: Nondecimal Data779455 +Node: Array Sorting781045 +Node: Controlling Array Traversal781742 +Ref: Controlling Array Traversal-Footnote-1790075 +Node: Array Sorting Functions790193 +Ref: Array Sorting Functions-Footnote-1794082 +Node: Two-way I/O794278 +Ref: Two-way I/O-Footnote-1799223 +Ref: Two-way I/O-Footnote-2799409 +Node: TCP/IP Networking799491 +Node: Profiling802364 +Node: Advanced Features Summary810641 +Node: Internationalization812574 +Node: I18N and L10N814054 +Node: Explaining gettext814740 +Ref: Explaining gettext-Footnote-1819765 +Ref: Explaining gettext-Footnote-2819949 +Node: Programmer i18n820114 +Ref: Programmer i18n-Footnote-1824980 +Node: Translator i18n825029 +Node: String Extraction825823 +Ref: String Extraction-Footnote-1826954 +Node: Printf Ordering827040 +Ref: Printf Ordering-Footnote-1829826 +Node: I18N Portability829890 +Ref: I18N Portability-Footnote-1832345 +Node: I18N Example832408 +Ref: I18N Example-Footnote-1835211 +Node: Gawk I18N835283 +Node: I18N Summary835921 +Node: Debugger837260 +Node: Debugging838282 +Node: Debugging Concepts838723 +Node: Debugging Terms840576 +Node: Awk Debugging843148 +Node: Sample Debugging Session844042 +Node: Debugger Invocation844562 +Node: Finding The Bug845946 +Node: List of Debugger Commands852421 +Node: Breakpoint Control853754 +Node: Debugger Execution Control857450 +Node: Viewing And Changing Data860814 +Node: Execution Stack864192 +Node: Debugger Info865829 +Node: Miscellaneous Debugger Commands869846 +Node: Readline Support874875 +Node: Limitations875767 +Node: Debugging Summary877881 +Node: Arbitrary Precision Arithmetic879049 +Node: Computer Arithmetic880465 +Ref: table-numeric-ranges884063 +Ref: Computer Arithmetic-Footnote-1884922 +Node: Math Definitions884979 +Ref: table-ieee-formats888267 +Ref: Math Definitions-Footnote-1888871 +Node: MPFR features888976 +Node: FP Math Caution890647 +Ref: FP Math Caution-Footnote-1891697 +Node: Inexactness of computations892066 +Node: Inexact representation893025 +Node: Comparing FP Values894382 +Node: Errors accumulate895464 +Node: Getting Accuracy896897 +Node: Try To Round899559 +Node: Setting precision900458 +Ref: table-predefined-precision-strings901142 +Node: Setting the rounding mode902931 +Ref: table-gawk-rounding-modes903295 +Ref: Setting the rounding mode-Footnote-1906750 +Node: Arbitrary Precision Integers906929 +Ref: Arbitrary Precision Integers-Footnote-1911828 +Node: POSIX Floating Point Problems911977 +Ref: POSIX Floating Point Problems-Footnote-1915850 +Node: Floating point summary915888 +Node: Dynamic Extensions918082 +Node: Extension Intro919634 +Node: Plugin License920900 +Node: Extension Mechanism Outline921697 +Ref: figure-load-extension922125 +Ref: figure-register-new-function923605 +Ref: figure-call-new-function924609 +Node: Extension API Description926595 +Node: Extension API Functions Introduction928129 +Node: General Data Types933001 +Ref: General Data Types-Footnote-1938740 +Node: Memory Allocation Functions939039 +Ref: Memory Allocation Functions-Footnote-1941878 +Node: Constructor Functions941974 +Node: Registration Functions943708 +Node: Extension Functions944393 +Node: Exit Callback Functions946690 +Node: Extension Version String947938 +Node: Input Parsers948603 +Node: Output Wrappers958482 +Node: Two-way processors962997 +Node: Printing Messages965201 +Ref: Printing Messages-Footnote-1966277 +Node: Updating `ERRNO'966429 +Node: Requesting Values967169 +Ref: table-value-types-returned967897 +Node: Accessing Parameters968854 +Node: Symbol Table Access970085 +Node: Symbol table by name970599 +Node: Symbol table by cookie972580 +Ref: Symbol table by cookie-Footnote-1976724 +Node: Cached values976787 +Ref: Cached values-Footnote-1980286 +Node: Array Manipulation980377 +Ref: Array Manipulation-Footnote-1981467 +Node: Array Data Types981504 +Ref: Array Data Types-Footnote-1984159 +Node: Array Functions984251 +Node: Flattening Arrays988105 +Node: Creating Arrays994997 +Node: Redirection API999768 +Node: Extension API Variables1002539 +Node: Extension Versioning1003172 +Node: Extension API Informational Variables1005073 +Node: Extension API Boilerplate1006138 +Node: Finding Extensions1009947 +Node: Extension Example1010507 +Node: Internal File Description1011279 +Node: Internal File Ops1015346 +Ref: Internal File Ops-Footnote-11027016 +Node: Using Internal File Ops1027156 +Ref: Using Internal File Ops-Footnote-11029539 +Node: Extension Samples1029812 +Node: Extension Sample File Functions1031338 +Node: Extension Sample Fnmatch1038976 +Node: Extension Sample Fork1040467 +Node: Extension Sample Inplace1041682 +Node: Extension Sample Ord1043357 +Node: Extension Sample Readdir1044193 +Ref: table-readdir-file-types1045069 +Node: Extension Sample Revout1045880 +Node: Extension Sample Rev2way1046470 +Node: Extension Sample Read write array1047210 +Node: Extension Sample Readfile1049150 +Node: Extension Sample Time1050245 +Node: Extension Sample API Tests1051594 +Node: gawkextlib1052085 +Node: Extension summary1054743 +Node: Extension Exercises1058432 +Node: Language History1059154 +Node: V7/SVR3.11060810 +Node: SVR41062991 +Node: POSIX1064436 +Node: BTL1065825 +Node: POSIX/GNU1066559 +Node: Feature History1072183 +Node: Common Extensions1085281 +Node: Ranges and Locales1086605 +Ref: Ranges and Locales-Footnote-11091223 +Ref: Ranges and Locales-Footnote-21091250 +Ref: Ranges and Locales-Footnote-31091484 +Node: Contributors1091705 +Node: History summary1097246 +Node: Installation1098616 +Node: Gawk Distribution1099562 +Node: Getting1100046 +Node: Extracting1100869 +Node: Distribution contents1102504 +Node: Unix Installation1108569 +Node: Quick Installation1109252 +Node: Shell Startup Files1111663 +Node: Additional Configuration Options1112742 +Node: Configuration Philosophy1114481 +Node: Non-Unix Installation1116850 +Node: PC Installation1117308 +Node: PC Binary Installation1118627 +Node: PC Compiling1120475 +Ref: PC Compiling-Footnote-11123496 +Node: PC Testing1123605 +Node: PC Using1124781 +Node: Cygwin1128896 +Node: MSYS1129719 +Node: VMS Installation1130219 +Node: VMS Compilation1131011 +Ref: VMS Compilation-Footnote-11132233 +Node: VMS Dynamic Extensions1132291 +Node: VMS Installation Details1133975 +Node: VMS Running1136227 +Node: VMS GNV1139063 +Node: VMS Old Gawk1139797 +Node: Bugs1140267 +Node: Other Versions1144150 +Node: Installation summary1150578 +Node: Notes1151634 +Node: Compatibility Mode1152499 +Node: Additions1153281 +Node: Accessing The Source1154206 +Node: Adding Code1155642 +Node: New Ports1161807 +Node: Derived Files1166289 +Ref: Derived Files-Footnote-11171764 +Ref: Derived Files-Footnote-21171798 +Ref: Derived Files-Footnote-31172394 +Node: Future Extensions1172508 +Node: Implementation Limitations1173114 +Node: Extension Design1174362 +Node: Old Extension Problems1175516 +Ref: Old Extension Problems-Footnote-11177033 +Node: Extension New Mechanism Goals1177090 +Ref: Extension New Mechanism Goals-Footnote-11180450 +Node: Extension Other Design Decisions1180639 +Node: Extension Future Growth1182747 +Node: Old Extension Mechanism1183583 +Node: Notes summary1185345 +Node: Basic Concepts1186531 +Node: Basic High Level1187212 +Ref: figure-general-flow1187484 +Ref: figure-process-flow1188083 +Ref: Basic High Level-Footnote-11191312 +Node: Basic Data Typing1191497 +Node: Glossary1194825 +Node: Copying1219983 +Node: GNU Free Documentation License1257539 +Node: Index1282675 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index cbc0bd04..6f5aacea 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -56,7 +56,7 @@ @set PATCHLEVEL 2 @ifset FOR_PRINT -@set TITLE Effective Awk Programming +@set TITLE Effective awk Programming @end ifset @ifclear FOR_PRINT @set TITLE GAWK: Effective AWK Programming @@ -1582,7 +1582,7 @@ This @value{DOCUMENT} has the difficult task of being both a tutorial and a refe If you are a novice, feel free to skip over details that seem too complex. You should also ignore the many cross-references; they are for the expert user and for the Info and -@ulink{http://www.gnu.org/software/gawk/manual/, HTML} +@uref{http://www.gnu.org/software/gawk/manual/, HTML} versions of the @value{DOCUMENT}. @end ifnotinfo @@ -1664,9 +1664,9 @@ doing something when a record is matched, and the predefined variables @item @ref{Arrays}, covers @command{awk}'s one-and-only data structure: the associative array. -Deleting array elements and whole arrays is also described, as well as -sorting arrays in @command{gawk}. It also describes how @command{gawk} -provides arrays of arrays. +Deleting array elements and whole arrays is described, as well as +sorting arrays in @command{gawk}. The @value{CHAPTER} also describes how +@command{gawk} provides arrays of arrays. @item @ref{Functions}, @@ -1678,17 +1678,17 @@ as well as how to define your own functions. It also discusses how @item Part II shows how to use @command{awk} and @command{gawk} for problem solving. There is lots of code here for you to read and learn from. -It contains the following chapters: +This part contains the following chapters: @c nested @itemize @value{MINUS} @item -@ref{Library Functions}, which provides a number of functions meant to +@ref{Library Functions}, provides a number of functions meant to be used from main @command{awk} programs. @item @ref{Sample Programs}, -which provides many sample @command{awk} programs. +provides many sample @command{awk} programs. @end itemize Reading these two chapters allows you to see @command{awk} @@ -1741,7 +1741,7 @@ including the GNU General Public License: @item @ref{Language History}, describes how the @command{awk} language has evolved since -its first release to present. It also describes how @command{gawk} +its first release to the present. It also describes how @command{gawk} has acquired features over time. @item @@ -1784,7 +1784,7 @@ are completely unfamiliar with computer programming. @item @uref{http://www.gnu.org/software/gawk/manual/html_node/Glossary.html, The Glossary} -defines most, if not all of, the significant terms used +defines most, if not all, of the significant terms used throughout the @value{DOCUMENT}. If you find terms that you aren't familiar with, try looking them up here. @@ -1811,7 +1811,7 @@ and some possible future directions for @command{gawk} development. provides some very cursory background material for those who are completely unfamiliar with computer programming. -The @ref{Glossary}, defines most, if not all of, the significant terms used +The @ref{Glossary}, defines most, if not all, of the significant terms used throughout the @value{DOCUMENT}. If you find terms that you aren't familiar with, try looking them up here. @@ -1854,7 +1854,7 @@ This typically represents the command's standard output. Output from the command, usually its standard output, appears @code{like this}. @end ifset -Error messages, and other output on the command's standard error, are preceded +Error messages and other output on the command's standard error are preceded by the glyph ``@error{}''. For example: @example @@ -1881,7 +1881,7 @@ there are special characters called ``control characters.'' These are characters that you type by holding down both the @kbd{CONTROL} key and another key, at the same time. For example, a @kbd{Ctrl-d} is typed by first pressing and holding the @kbd{CONTROL} key, next -pressing the @kbd{d} key and finally releasing both keys. +pressing the @kbd{d} key, and finally releasing both keys. For the sake of brevity, throughout this @value{DOCUMENT}, we refer to Brian Kernighan's version of @command{awk} as ``BWK @command{awk}.'' @@ -1917,7 +1917,7 @@ the picture of a flashlight in the margin, as shown here. @value{DARKCORNER} @end iftex @ifnottex -``(d.c.)''. +``(d.c.).'' @end ifnottex @ifclear FOR_PRINT They also appear in the index under the heading ``dark corner.'' @@ -1952,12 +1952,12 @@ Emacs editor. GNU Emacs is the most widely used version of Emacs today. @cindex GPL (General Public License) @cindex General Public License, See GPL @cindex documentation, online -The GNU@footnote{GNU stands for ``GNU's not Unix.''} +The GNU@footnote{GNU stands for ``GNU's Not Unix.''} Project is an ongoing effort on the part of the Free Software Foundation to create a complete, freely distributable, POSIX-compliant computing environment. -The FSF uses the ``GNU General Public License'' (GPL) to ensure that -their software's +The FSF uses the GNU General Public License (GPL) to ensure that +its software's source code is always available to the end user. @ifclear FOR_PRINT A copy of the GPL is included @@ -2017,7 +2017,7 @@ version of @command{awk}. I started working with that version in the fall of 1988. As work on it progressed, the FSF published several preliminary versions (numbered 0.@var{x}). -In 1996, Edition 1.0 was released with @command{gawk} 3.0.0. +In 1996, edition 1.0 was released with @command{gawk} 3.0.0. The FSF published the first two editions under the title @cite{The GNU Awk User's Guide}. @ifset FOR_PRINT @@ -2029,7 +2029,7 @@ the third edition in 2001. This edition maintains the basic structure of the previous editions. For FSF edition 4.0, the content was thoroughly reviewed and updated. All references to @command{gawk} versions prior to 4.0 were removed. -Of significant note for that edition was @ref{Debugger}. +Of significant note for that edition was the addition of @ref{Debugger}. For FSF edition @ifclear FOR_PRINT @@ -2044,7 +2044,7 @@ and the major new additions are @ref{Arbitrary Precision Arithmetic}, and @ref{Dynamic Extensions}. This @value{DOCUMENT} will undoubtedly continue to evolve. If you -find an error in this @value{DOCUMENT}, please report it! @DBXREF{Bugs} +find an error in the @value{DOCUMENT}, please report it! @DBXREF{Bugs} for information on submitting problem reports electronically. @ifset FOR_PRINT @@ -2054,7 +2054,7 @@ for information on submitting problem reports electronically. You may have a newer version of @command{gawk} than the one described here. To find out what has changed, you should first look at the @file{NEWS} file in the @command{gawk} -distribution, which provides a high-level summary of what changed in +distribution, which provides a high-level summary of the changes in each release. You can then look at the @uref{http://www.gnu.org/software/gawk/manual/, @@ -2108,7 +2108,7 @@ The initial draft of @cite{The GAWK Manual} had the following acknowledgments: Many people need to be thanked for their assistance in producing this manual. Jay Fenlason contributed many ideas and sample programs. Richard Mlynarik and Robert Chassell gave helpful comments on drafts of this -manual. The paper @cite{A Supplemental Document for @command{awk}} by John W.@: +manual. The paper @cite{A Supplemental Document for AWK} by John W.@: Pierce of the Chemistry Department at UC San Diego, pinpointed several issues relevant both to @command{awk} implementation and to this manual, that would otherwise have escaped us. @@ -2119,12 +2119,18 @@ I would like to acknowledge Richard M.@: Stallman, for his vision of a better world and for his courage in founding the FSF and starting the GNU Project. +@ifclear FOR_PRINT Earlier editions of this @value{DOCUMENT} had the following acknowledgements: +@end ifclear +@ifset FOR_PRINT +The previous edition of this @value{DOCUMENT} had +the following acknowledgements: +@end ifset @quotation The following people (in alphabetical order) provided helpful comments on various -versions of this book, +versions of this book: Rick Adams, Dr.@: Nelson H.F. Beebe, Karl Berry, @@ -2152,7 +2158,7 @@ Robert J.@: Chassell provided much valuable advice on the use of Texinfo. He also deserves special thanks for convincing me @emph{not} to title this @value{DOCUMENT} -@cite{How To Gawk Politely}. +@cite{How to Gawk Politely}. Karl Berry helped significantly with the @TeX{} part of Texinfo. @cindex Hartholz, Marshall @@ -2236,9 +2242,9 @@ a number of people. @DBXREF{Contributors} for the full list. @ifset FOR_PRINT @cindex Oram, Andy -Thanks to Andy Oram, of O'Reilly Media, for initiating +Thanks to Andy Oram of O'Reilly Media for initiating the fourth edition and for his support during the work. -Thanks to Jasmine Kwityn for her copy-editing work. +Thanks to Jasmine Kwityn for her copyediting work. @end ifset Thanks to Michael Brennan for the Forewords. @@ -2246,7 +2252,7 @@ Thanks to Michael Brennan for the Forewords. @cindex Duman, Patrice @cindex Berry, Karl Thanks to Patrice Dumas for the new @command{makeinfo} program. -Thanks to Karl Berry who continues to work to keep +Thanks to Karl Berry, who continues to work to keep the Texinfo markup language sane. @cindex Kernighan, Brian @@ -2256,8 +2262,8 @@ Robert P.J.@: Day, Michael Brennan, and Brian Kernighan kindly acted as reviewers for the 2015 edition of this @value{DOCUMENT}. Their feedback helped improve the final work. -I would like to thank Brian Kernighan for invaluable assistance during the -testing and debugging of @command{gawk}, and for ongoing +I would also like to thank Brian Kernighan for his invaluable assistance during the +testing and debugging of @command{gawk}, and for his ongoing help and advice in clarifying numerous points about the language. We could not have done nearly as good a job on either @command{gawk} or its documentation without his help. @@ -2368,9 +2374,9 @@ an advanced feature that we will ignore for now; pattern to search for and one action to perform upon finding the pattern. -Syntactically, a rule consists of a pattern followed by an action. The -action is enclosed in braces to separate it from the pattern. -Newlines usually separate rules. Therefore, an @command{awk} +Syntactically, a rule consists of a @dfn{pattern} followed by an +@dfn{action}. The action is enclosed in braces to separate it from the +pattern. Newlines usually separate rules. Therefore, an @command{awk} program looks like this: @example @@ -2444,8 +2450,8 @@ awk '@var{program}' @var{input-file1} @var{input-file2} @dots{} @end example @noindent -where @var{program} consists of a series of @var{patterns} and -@var{actions}, as described earlier. +where @var{program} consists of a series of patterns and +actions, as described earlier. @cindex single quote (@code{'}) @cindex @code{'} (single quote) @@ -2464,12 +2470,12 @@ programs from shell scripts, because it avoids the need for a separate file for the @command{awk} program. A self-contained shell script is more reliable because there are no other files to misplace. -Later in this chapter, +Later in this chapter, in @ifdocbook the section @end ifdocbook @ref{Very Simple}, -presents several short, +we'll see examples of several short, self-contained programs. @node Read Terminal @@ -2490,10 +2496,10 @@ awk '@var{program}' which usually means whatever you type on the keyboard. This continues until you indicate end-of-file by typing @kbd{Ctrl-d}. @ifset FOR_PRINT -(On other operating systems, the end-of-file character may be different.) +(On non-POSIX operating systems, the end-of-file character may be different.) @end ifset @ifclear FOR_PRINT -(On other operating systems, the end-of-file character may be different. +(On non-POSIX operating systems, the end-of-file character may be different. For example, on OS/2, it is @kbd{Ctrl-z}.) @end ifclear @@ -2597,7 +2603,7 @@ text, instead of the magic @samp{\47}.) @cindex single quote (@code{'}) in @command{gawk} command lines @c STARTOFRANGE qs2x @cindex @code{'} (single quote) in @command{gawk} command lines -If you want to clearly identify your @command{awk} program files as such, +If you want to clearly identify an @command{awk} program file as such, you can add the extension @file{.awk} to the @value{FN}. This doesn't affect the execution of the @command{awk} program but it does make ``housekeeping'' easier. @@ -2811,7 +2817,7 @@ The next @value{SUBSECTION} describes the shell's quoting rules. @end quotation @node Quoting -@subsection Shell-Quoting Issues +@subsection Shell Quoting Issues @cindex shell quoting, rules for @menu @@ -2948,7 +2954,7 @@ $ @kbd{awk 'BEGIN @{ print "Here is a single quote <'"'"'>" @}'} @noindent This program consists of three concatenated quoted strings. The first and the -third are single quoted, the second is double quoted. +third are single-quoted, and the second is double-quoted. This can be ``simplified'' to: @@ -2987,7 +2993,7 @@ $ @kbd{awk 'BEGIN @{ print "Here is a double quote <\42>" @}'} @end example @noindent -This works nicely, except that you should comment clearly what the +This works nicely, but you should comment clearly what the escapes mean. A fourth option is to use command-line variable assignment, like this: @@ -2998,11 +3004,11 @@ $ @kbd{awk -v sq="'" 'BEGIN @{ print "Here is a single quote <" sq ">" @}'} @end example (Here, the two string constants and the value of @code{sq} are concatenated -into a single string which is printed by @code{print}.) +into a single string that is printed by @code{print}.) If you really need both single and double quotes in your @command{awk} program, it is probably best to move it into a separate file, where -the shell won't be part of the picture, and you can say what you mean. +the shell won't be part of the picture and you can say what you mean. @node DOS Quoting @subsubsection Quoting in MS-Windows Batch Files @@ -3101,7 +3107,7 @@ 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. -An empty line separates the data for the two years. +An empty line separates the data for the two years: @example @c file eg/data/inventory-shipped @@ -3135,7 +3141,7 @@ The following command runs a simple @command{awk} program that searches the input file @file{mail-list} for the character string @samp{li} (a grouping of characters is usually called a @dfn{string}; the term @dfn{string} is based on similar usage in English, such -as ``a string of pearls,'' or ``a string of cars in a train''): +as ``a string of pearls'' or ``a string of cars in a train''): @example awk '/li/ @{ print $0 @}' mail-list @@ -3182,7 +3188,7 @@ omitting the @code{print} statement but retaining the braces makes an empty action that does nothing (i.e., no lines are printed). @cindex @command{awk} programs, one-line examples -Many practical @command{awk} programs are just a line or two. Following is a +Many practical @command{awk} programs are just a line or two long. Following is a collection of useful, short programs to get you started. Some of these programs contain constructs that haven't been covered yet. (The description of the program will give you a good idea of what is going on, but you'll @@ -3203,7 +3209,7 @@ Print every line that is longer than 80 characters: awk 'length($0) > 80' data @end example -The sole rule has a relational expression as its pattern and it has no +The sole rule has a relational expression as its pattern and has no action---so it uses the default action, printing the record. @item @@ -3290,7 +3296,7 @@ Print the even-numbered lines in the @value{DF}: awk 'NR % 2 == 0' data @end example -If you use the expression @samp{NR % 2 == 1} instead, +If you used the expression @samp{NR % 2 == 1} instead, the program would print the odd-numbered lines. @end itemize @@ -8758,7 +8764,7 @@ loop that reads input records and matches them against patterns, like so: @example -$ @kbd{ gawk 'BEGIN @{ PROCINFO["-", "READ_TIMEOUT"] = 5000 @}} +$ @kbd{gawk 'BEGIN @{ PROCINFO["-", "READ_TIMEOUT"] = 5000 @}} > @kbd{@{ print "You entered: " $0 @}'} @kbd{gawk} @print{} You entered: gawk diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 95ed8586..daf38adf 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -51,7 +51,7 @@ @set PATCHLEVEL 2 @ifset FOR_PRINT -@set TITLE Effective Awk Programming +@set TITLE Effective awk Programming @end ifset @ifclear FOR_PRINT @set TITLE GAWK: Effective AWK Programming @@ -1549,7 +1549,7 @@ This @value{DOCUMENT} has the difficult task of being both a tutorial and a refe If you are a novice, feel free to skip over details that seem too complex. You should also ignore the many cross-references; they are for the expert user and for the Info and -@ulink{http://www.gnu.org/software/gawk/manual/, HTML} +@uref{http://www.gnu.org/software/gawk/manual/, HTML} versions of the @value{DOCUMENT}. @end ifnotinfo @@ -1631,9 +1631,9 @@ doing something when a record is matched, and the predefined variables @item @ref{Arrays}, covers @command{awk}'s one-and-only data structure: the associative array. -Deleting array elements and whole arrays is also described, as well as -sorting arrays in @command{gawk}. It also describes how @command{gawk} -provides arrays of arrays. +Deleting array elements and whole arrays is described, as well as +sorting arrays in @command{gawk}. The @value{CHAPTER} also describes how +@command{gawk} provides arrays of arrays. @item @ref{Functions}, @@ -1645,17 +1645,17 @@ as well as how to define your own functions. It also discusses how @item Part II shows how to use @command{awk} and @command{gawk} for problem solving. There is lots of code here for you to read and learn from. -It contains the following chapters: +This part contains the following chapters: @c nested @itemize @value{MINUS} @item -@ref{Library Functions}, which provides a number of functions meant to +@ref{Library Functions}, provides a number of functions meant to be used from main @command{awk} programs. @item @ref{Sample Programs}, -which provides many sample @command{awk} programs. +provides many sample @command{awk} programs. @end itemize Reading these two chapters allows you to see @command{awk} @@ -1708,7 +1708,7 @@ including the GNU General Public License: @item @ref{Language History}, describes how the @command{awk} language has evolved since -its first release to present. It also describes how @command{gawk} +its first release to the present. It also describes how @command{gawk} has acquired features over time. @item @@ -1751,7 +1751,7 @@ are completely unfamiliar with computer programming. @item @uref{http://www.gnu.org/software/gawk/manual/html_node/Glossary.html, The Glossary} -defines most, if not all of, the significant terms used +defines most, if not all, of the significant terms used throughout the @value{DOCUMENT}. If you find terms that you aren't familiar with, try looking them up here. @@ -1778,7 +1778,7 @@ and some possible future directions for @command{gawk} development. provides some very cursory background material for those who are completely unfamiliar with computer programming. -The @ref{Glossary}, defines most, if not all of, the significant terms used +The @ref{Glossary}, defines most, if not all, of the significant terms used throughout the @value{DOCUMENT}. If you find terms that you aren't familiar with, try looking them up here. @@ -1821,7 +1821,7 @@ This typically represents the command's standard output. Output from the command, usually its standard output, appears @code{like this}. @end ifset -Error messages, and other output on the command's standard error, are preceded +Error messages and other output on the command's standard error are preceded by the glyph ``@error{}''. For example: @example @@ -1848,7 +1848,7 @@ there are special characters called ``control characters.'' These are characters that you type by holding down both the @kbd{CONTROL} key and another key, at the same time. For example, a @kbd{Ctrl-d} is typed by first pressing and holding the @kbd{CONTROL} key, next -pressing the @kbd{d} key and finally releasing both keys. +pressing the @kbd{d} key, and finally releasing both keys. For the sake of brevity, throughout this @value{DOCUMENT}, we refer to Brian Kernighan's version of @command{awk} as ``BWK @command{awk}.'' @@ -1884,7 +1884,7 @@ the picture of a flashlight in the margin, as shown here. @value{DARKCORNER} @end iftex @ifnottex -``(d.c.)''. +``(d.c.).'' @end ifnottex @ifclear FOR_PRINT They also appear in the index under the heading ``dark corner.'' @@ -1919,12 +1919,12 @@ Emacs editor. GNU Emacs is the most widely used version of Emacs today. @cindex GPL (General Public License) @cindex General Public License, See GPL @cindex documentation, online -The GNU@footnote{GNU stands for ``GNU's not Unix.''} +The GNU@footnote{GNU stands for ``GNU's Not Unix.''} Project is an ongoing effort on the part of the Free Software Foundation to create a complete, freely distributable, POSIX-compliant computing environment. -The FSF uses the ``GNU General Public License'' (GPL) to ensure that -their software's +The FSF uses the GNU General Public License (GPL) to ensure that +its software's source code is always available to the end user. @ifclear FOR_PRINT A copy of the GPL is included @@ -1984,7 +1984,7 @@ version of @command{awk}. I started working with that version in the fall of 1988. As work on it progressed, the FSF published several preliminary versions (numbered 0.@var{x}). -In 1996, Edition 1.0 was released with @command{gawk} 3.0.0. +In 1996, edition 1.0 was released with @command{gawk} 3.0.0. The FSF published the first two editions under the title @cite{The GNU Awk User's Guide}. @ifset FOR_PRINT @@ -1996,7 +1996,7 @@ the third edition in 2001. This edition maintains the basic structure of the previous editions. For FSF edition 4.0, the content was thoroughly reviewed and updated. All references to @command{gawk} versions prior to 4.0 were removed. -Of significant note for that edition was @ref{Debugger}. +Of significant note for that edition was the addition of @ref{Debugger}. For FSF edition @ifclear FOR_PRINT @@ -2011,7 +2011,7 @@ and the major new additions are @ref{Arbitrary Precision Arithmetic}, and @ref{Dynamic Extensions}. This @value{DOCUMENT} will undoubtedly continue to evolve. If you -find an error in this @value{DOCUMENT}, please report it! @DBXREF{Bugs} +find an error in the @value{DOCUMENT}, please report it! @DBXREF{Bugs} for information on submitting problem reports electronically. @ifset FOR_PRINT @@ -2021,7 +2021,7 @@ for information on submitting problem reports electronically. You may have a newer version of @command{gawk} than the one described here. To find out what has changed, you should first look at the @file{NEWS} file in the @command{gawk} -distribution, which provides a high-level summary of what changed in +distribution, which provides a high-level summary of the changes in each release. You can then look at the @uref{http://www.gnu.org/software/gawk/manual/, @@ -2075,7 +2075,7 @@ The initial draft of @cite{The GAWK Manual} had the following acknowledgments: Many people need to be thanked for their assistance in producing this manual. Jay Fenlason contributed many ideas and sample programs. Richard Mlynarik and Robert Chassell gave helpful comments on drafts of this -manual. The paper @cite{A Supplemental Document for @command{awk}} by John W.@: +manual. The paper @cite{A Supplemental Document for AWK} by John W.@: Pierce of the Chemistry Department at UC San Diego, pinpointed several issues relevant both to @command{awk} implementation and to this manual, that would otherwise have escaped us. @@ -2086,12 +2086,18 @@ I would like to acknowledge Richard M.@: Stallman, for his vision of a better world and for his courage in founding the FSF and starting the GNU Project. +@ifclear FOR_PRINT Earlier editions of this @value{DOCUMENT} had the following acknowledgements: +@end ifclear +@ifset FOR_PRINT +The previous edition of this @value{DOCUMENT} had +the following acknowledgements: +@end ifset @quotation The following people (in alphabetical order) provided helpful comments on various -versions of this book, +versions of this book: Rick Adams, Dr.@: Nelson H.F. Beebe, Karl Berry, @@ -2119,7 +2125,7 @@ Robert J.@: Chassell provided much valuable advice on the use of Texinfo. He also deserves special thanks for convincing me @emph{not} to title this @value{DOCUMENT} -@cite{How To Gawk Politely}. +@cite{How to Gawk Politely}. Karl Berry helped significantly with the @TeX{} part of Texinfo. @cindex Hartholz, Marshall @@ -2203,9 +2209,9 @@ a number of people. @DBXREF{Contributors} for the full list. @ifset FOR_PRINT @cindex Oram, Andy -Thanks to Andy Oram, of O'Reilly Media, for initiating +Thanks to Andy Oram of O'Reilly Media for initiating the fourth edition and for his support during the work. -Thanks to Jasmine Kwityn for her copy-editing work. +Thanks to Jasmine Kwityn for her copyediting work. @end ifset Thanks to Michael Brennan for the Forewords. @@ -2213,7 +2219,7 @@ Thanks to Michael Brennan for the Forewords. @cindex Duman, Patrice @cindex Berry, Karl Thanks to Patrice Dumas for the new @command{makeinfo} program. -Thanks to Karl Berry who continues to work to keep +Thanks to Karl Berry, who continues to work to keep the Texinfo markup language sane. @cindex Kernighan, Brian @@ -2223,8 +2229,8 @@ Robert P.J.@: Day, Michael Brennan, and Brian Kernighan kindly acted as reviewers for the 2015 edition of this @value{DOCUMENT}. Their feedback helped improve the final work. -I would like to thank Brian Kernighan for invaluable assistance during the -testing and debugging of @command{gawk}, and for ongoing +I would also like to thank Brian Kernighan for his invaluable assistance during the +testing and debugging of @command{gawk}, and for his ongoing help and advice in clarifying numerous points about the language. We could not have done nearly as good a job on either @command{gawk} or its documentation without his help. @@ -2335,9 +2341,9 @@ an advanced feature that we will ignore for now; pattern to search for and one action to perform upon finding the pattern. -Syntactically, a rule consists of a pattern followed by an action. The -action is enclosed in braces to separate it from the pattern. -Newlines usually separate rules. Therefore, an @command{awk} +Syntactically, a rule consists of a @dfn{pattern} followed by an +@dfn{action}. The action is enclosed in braces to separate it from the +pattern. Newlines usually separate rules. Therefore, an @command{awk} program looks like this: @example @@ -2411,8 +2417,8 @@ awk '@var{program}' @var{input-file1} @var{input-file2} @dots{} @end example @noindent -where @var{program} consists of a series of @var{patterns} and -@var{actions}, as described earlier. +where @var{program} consists of a series of patterns and +actions, as described earlier. @cindex single quote (@code{'}) @cindex @code{'} (single quote) @@ -2431,12 +2437,12 @@ programs from shell scripts, because it avoids the need for a separate file for the @command{awk} program. A self-contained shell script is more reliable because there are no other files to misplace. -Later in this chapter, +Later in this chapter, in @ifdocbook the section @end ifdocbook @ref{Very Simple}, -presents several short, +we'll see examples of several short, self-contained programs. @node Read Terminal @@ -2457,10 +2463,10 @@ awk '@var{program}' which usually means whatever you type on the keyboard. This continues until you indicate end-of-file by typing @kbd{Ctrl-d}. @ifset FOR_PRINT -(On other operating systems, the end-of-file character may be different.) +(On non-POSIX operating systems, the end-of-file character may be different.) @end ifset @ifclear FOR_PRINT -(On other operating systems, the end-of-file character may be different. +(On non-POSIX operating systems, the end-of-file character may be different. For example, on OS/2, it is @kbd{Ctrl-z}.) @end ifclear @@ -2564,7 +2570,7 @@ text, instead of the magic @samp{\47}.) @cindex single quote (@code{'}) in @command{gawk} command lines @c STARTOFRANGE qs2x @cindex @code{'} (single quote) in @command{gawk} command lines -If you want to clearly identify your @command{awk} program files as such, +If you want to clearly identify an @command{awk} program file as such, you can add the extension @file{.awk} to the @value{FN}. This doesn't affect the execution of the @command{awk} program but it does make ``housekeeping'' easier. @@ -2722,7 +2728,7 @@ The next @value{SUBSECTION} describes the shell's quoting rules. @end quotation @node Quoting -@subsection Shell-Quoting Issues +@subsection Shell Quoting Issues @cindex shell quoting, rules for @menu @@ -2859,7 +2865,7 @@ $ @kbd{awk 'BEGIN @{ print "Here is a single quote <'"'"'>" @}'} @noindent This program consists of three concatenated quoted strings. The first and the -third are single quoted, the second is double quoted. +third are single-quoted, and the second is double-quoted. This can be ``simplified'' to: @@ -2898,7 +2904,7 @@ $ @kbd{awk 'BEGIN @{ print "Here is a double quote <\42>" @}'} @end example @noindent -This works nicely, except that you should comment clearly what the +This works nicely, but you should comment clearly what the escapes mean. A fourth option is to use command-line variable assignment, like this: @@ -2909,11 +2915,11 @@ $ @kbd{awk -v sq="'" 'BEGIN @{ print "Here is a single quote <" sq ">" @}'} @end example (Here, the two string constants and the value of @code{sq} are concatenated -into a single string which is printed by @code{print}.) +into a single string that is printed by @code{print}.) If you really need both single and double quotes in your @command{awk} program, it is probably best to move it into a separate file, where -the shell won't be part of the picture, and you can say what you mean. +the shell won't be part of the picture and you can say what you mean. @node DOS Quoting @subsubsection Quoting in MS-Windows Batch Files @@ -3012,7 +3018,7 @@ 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. -An empty line separates the data for the two years. +An empty line separates the data for the two years: @example @c file eg/data/inventory-shipped @@ -3046,7 +3052,7 @@ The following command runs a simple @command{awk} program that searches the input file @file{mail-list} for the character string @samp{li} (a grouping of characters is usually called a @dfn{string}; the term @dfn{string} is based on similar usage in English, such -as ``a string of pearls,'' or ``a string of cars in a train''): +as ``a string of pearls'' or ``a string of cars in a train''): @example awk '/li/ @{ print $0 @}' mail-list @@ -3093,7 +3099,7 @@ omitting the @code{print} statement but retaining the braces makes an empty action that does nothing (i.e., no lines are printed). @cindex @command{awk} programs, one-line examples -Many practical @command{awk} programs are just a line or two. Following is a +Many practical @command{awk} programs are just a line or two long. Following is a collection of useful, short programs to get you started. Some of these programs contain constructs that haven't been covered yet. (The description of the program will give you a good idea of what is going on, but you'll @@ -3114,7 +3120,7 @@ Print every line that is longer than 80 characters: awk 'length($0) > 80' data @end example -The sole rule has a relational expression as its pattern and it has no +The sole rule has a relational expression as its pattern and has no action---so it uses the default action, printing the record. @item @@ -3201,7 +3207,7 @@ Print the even-numbered lines in the @value{DF}: awk 'NR % 2 == 0' data @end example -If you use the expression @samp{NR % 2 == 1} instead, +If you used the expression @samp{NR % 2 == 1} instead, the program would print the odd-numbered lines. @end itemize @@ -8359,7 +8365,7 @@ loop that reads input records and matches them against patterns, like so: @example -$ @kbd{ gawk 'BEGIN @{ PROCINFO["-", "READ_TIMEOUT"] = 5000 @}} +$ @kbd{gawk 'BEGIN @{ PROCINFO["-", "READ_TIMEOUT"] = 5000 @}} > @kbd{@{ print "You entered: " $0 @}'} @kbd{gawk} @print{} You entered: gawk @@ -565,7 +565,6 @@ load_symbols() sym_array->parent_array = PROCINFO_node; sym_array->vname = estrdup("identifiers", 11); - make_aname(sym_array); user = make_string("user", 4); extension = make_string("extension", 9); |