diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-08-22 16:04:46 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-08-22 16:04:46 +0300 |
commit | 3cf354e731174233ff2370a8d3cd4cd9ba0b8e91 (patch) | |
tree | 8348190b6fbc941d8e0322b91d9836bbf9e40aa3 | |
parent | 0a8f56def1597bd886d7c9095c1f73e157d1197b (diff) | |
parent | f215e2b823693103796cd71493b90300f54adba4 (diff) | |
download | egawk-3cf354e731174233ff2370a8d3cd4cd9ba0b8e91.tar.gz egawk-3cf354e731174233ff2370a8d3cd4cd9ba0b8e91.tar.bz2 egawk-3cf354e731174233ff2370a8d3cd4cd9ba0b8e91.zip |
Merge branch 'gawk-4.1-stable'
-rw-r--r-- | doc/ChangeLog | 4 | ||||
-rw-r--r-- | doc/gawk.info | 1304 | ||||
-rw-r--r-- | doc/gawk.texi | 130 | ||||
-rw-r--r-- | doc/gawktexi.in | 126 |
4 files changed, 830 insertions, 734 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 724dd31f..01da6377 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2014-08-22 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Continuing on reviewer comments. + 2014-08-20 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Continuing on reviewer comments. diff --git a/doc/gawk.info b/doc/gawk.info index a4f52a54..05434558 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' @@ -3396,12 +3400,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 @@ -3789,9 +3793,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 @@ -4735,9 +4739,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++) @@ -5594,10 +5597,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 @@ -6034,6 +6037,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 @@ -7815,8 +7822,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 @@ -7980,8 +7987,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 @@ -9128,8 +9135,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 @@ -9697,8 +9703,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 @@ -9749,8 +9755,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 @@ -9852,12 +9858,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 @@ -10963,7 +10969,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 @@ -11169,9 +11175,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) @@ -12310,11 +12316,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 @@ -12388,9 +12394,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. @@ -12565,10 +12571,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, @@ -19832,9 +19838,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 @@ -19844,10 +19850,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 @@ -19944,16 +19946,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: @@ -19973,6 +19986,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 @@ -20012,8 +20029,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 ---------- @@ -20230,8 +20250,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: @@ -26089,8 +26108,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::). @@ -26244,8 +26263,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: @@ -26253,9 +26272,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::). @@ -26415,9 +26434,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 @@ -28026,11 +28045,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'. @@ -28075,7 +28094,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 @@ -31487,7 +31506,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) @@ -31556,6 +31575,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) @@ -31572,8 +31592,7 @@ Index * Brian Kernighan's awk <12>: GNU Regexp Operators. (line 83) * 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: 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) @@ -31782,9 +31801,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) @@ -31835,9 +31854,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. @@ -32113,7 +32133,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) @@ -32767,8 +32787,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) @@ -32778,16 +32798,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) @@ -32957,13 +32976,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. @@ -33777,7 +33796,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) @@ -34011,541 +34030,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-1128570 -Node: Other Arguments128595 -Node: Naming Standard Input131257 -Node: Environment Variables132350 -Node: AWKPATH Variable132908 -Ref: AWKPATH Variable-Footnote-1135774 -Ref: AWKPATH Variable-Footnote-2135819 -Node: AWKLIBPATH Variable136079 -Node: Other Environment Variables136838 -Node: Exit Status140290 -Node: Include Files140965 -Node: Loading Shared Libraries144543 -Node: Obsolete145927 -Node: Undocumented146624 -Node: Invoking Summary146891 -Node: Regexp148491 -Node: Regexp Usage149941 -Node: Escape Sequences151974 -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 +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-1128736 +Node: Other Arguments128761 +Node: Naming Standard Input131423 +Node: Environment Variables132516 +Node: AWKPATH Variable133074 +Ref: AWKPATH Variable-Footnote-1135940 +Ref: AWKPATH Variable-Footnote-2135985 +Node: AWKLIBPATH Variable136245 +Node: Other Environment Variables137004 +Node: Exit Status140456 +Node: Include Files141131 +Node: Loading Shared Libraries144709 +Node: Obsolete146093 +Node: Undocumented146790 +Node: Invoking Summary147057 +Node: Regexp148657 +Node: Regexp Usage150107 +Node: Escape Sequences152140 +Node: Regexp Operators158040 +Ref: Regexp Operators-Footnote-1165520 +Ref: Regexp Operators-Footnote-2165667 +Node: Bracket Expressions165765 +Ref: table-char-classes167655 +Node: GNU Regexp Operators170595 +Node: Case-sensitivity174304 +Ref: Case-sensitivity-Footnote-1177196 +Ref: Case-sensitivity-Footnote-2177431 +Node: Leftmost Longest177539 +Node: Computed Regexps178740 +Node: Regexp Summary182112 +Node: Reading Files183581 +Node: Records185673 +Node: awk split records186416 +Node: gawk split records191274 +Ref: gawk split records-Footnote-1195795 +Node: Fields195832 +Ref: Fields-Footnote-1198796 +Node: Nonconstant Fields198882 +Ref: Nonconstant Fields-Footnote-1201112 +Node: Changing Fields201314 +Node: Field Separators207268 +Node: Default Field Splitting209970 +Node: Regexp Field Splitting211087 +Node: Single Character Fields214414 +Node: Command Line Field Separator215473 +Node: Full Line Fields218899 +Ref: Full Line Fields-Footnote-1219407 +Node: Field Splitting Summary219453 +Ref: Field Splitting Summary-Footnote-1222585 +Node: Constant Size222686 +Node: Splitting By Content227292 +Ref: Splitting By Content-Footnote-1231365 +Node: Multiple Line231405 +Ref: Multiple Line-Footnote-1237261 +Node: Getline237440 +Node: Plain Getline239656 +Node: Getline/Variable241751 +Node: Getline/File242898 +Node: Getline/Variable/File244282 +Ref: Getline/Variable/File-Footnote-1245881 +Node: Getline/Pipe245968 +Node: Getline/Variable/Pipe248654 +Node: Getline/Coprocess249761 +Node: Getline/Variable/Coprocess251013 +Node: Getline Notes251750 +Node: Getline Summary254554 +Ref: table-getline-variants254962 +Node: Read Timeout255874 +Ref: Read Timeout-Footnote-1259701 +Node: Command-line directories259759 +Node: Input Summary260663 +Node: Input Exercises263800 +Node: Printing264533 +Node: Print266255 +Node: Print Examples267748 +Node: Output Separators270527 +Node: OFMT272543 +Node: Printf273901 +Node: Basic Printf274807 +Node: Control Letters276346 +Node: Format Modifiers280337 +Node: Printf Examples286364 +Node: Redirection288828 +Node: Special Files295800 +Node: Special FD296333 +Ref: Special FD-Footnote-1299930 +Node: Special Network300004 +Node: Special Caveats300854 +Node: Close Files And Pipes301650 +Ref: Close Files And Pipes-Footnote-1308811 +Ref: Close Files And Pipes-Footnote-2308959 +Node: Output Summary309109 +Node: Output exercises310106 +Node: Expressions310786 +Node: Values311971 +Node: Constants312647 +Node: Scalar Constants313327 +Ref: Scalar Constants-Footnote-1314186 +Node: Nondecimal-numbers314436 +Node: Regexp Constants317436 +Node: Using Constant Regexps317911 +Node: Variables320983 +Node: Using Variables321638 +Node: Assignment Options323362 +Node: Conversion325237 +Node: Strings And Numbers325761 +Ref: Strings And Numbers-Footnote-1328823 +Node: Locale influences conversions328932 +Ref: table-locale-affects331649 +Node: All Operators332237 +Node: Arithmetic Ops332867 +Node: Concatenation335372 +Ref: Concatenation-Footnote-1338191 +Node: Assignment Ops338297 +Ref: table-assign-ops343280 +Node: Increment Ops344583 +Node: Truth Values and Conditions348021 +Node: Truth Values349104 +Node: Typing and Comparison350153 +Node: Variable Typing350946 +Node: Comparison Operators354598 +Ref: table-relational-ops355008 +Node: POSIX String Comparison358558 +Ref: POSIX String Comparison-Footnote-1359642 +Node: Boolean Ops359780 +Ref: Boolean Ops-Footnote-1363850 +Node: Conditional Exp363941 +Node: Function Calls365668 +Node: Precedence369548 +Node: Locales373217 +Node: Expressions Summary374848 +Node: Patterns and Actions377389 +Node: Pattern Overview378505 +Node: Regexp Patterns380182 +Node: Expression Patterns380725 +Node: Ranges384506 +Node: BEGIN/END387612 +Node: Using BEGIN/END388374 +Ref: Using BEGIN/END-Footnote-1391110 +Node: I/O And BEGIN/END391216 +Node: BEGINFILE/ENDFILE393487 +Node: Empty396418 +Node: Using Shell Variables396735 +Node: Action Overview399018 +Node: Statements401345 +Node: If Statement403193 +Node: While Statement404691 +Node: Do Statement406735 +Node: For Statement407891 +Node: Switch Statement411043 +Node: Break Statement413431 +Node: Continue Statement415472 +Node: Next Statement417297 +Node: Nextfile Statement419687 +Node: Exit Statement422323 +Node: Built-in Variables424727 +Node: User-modified425854 +Ref: User-modified-Footnote-1433543 +Node: Auto-set433605 +Ref: Auto-set-Footnote-1446524 +Ref: Auto-set-Footnote-2446729 +Node: ARGC and ARGV446785 +Node: Pattern Action Summary450689 +Node: Arrays452912 +Node: Array Basics454461 +Node: Array Intro455287 +Ref: figure-array-elements457260 +Node: Reference to Elements459667 +Node: Assigning Elements462046 +Node: Array Example462537 +Node: Scanning an Array464269 +Node: Controlling Scanning467270 +Ref: Controlling Scanning-Footnote-1472443 +Node: Delete472759 +Ref: Delete-Footnote-1475510 +Node: Numeric Array Subscripts475567 +Node: Uninitialized Subscripts477750 +Node: Multidimensional479375 +Node: Multiscanning482488 +Node: Arrays of Arrays484077 +Node: Arrays Summary488740 +Node: Functions490845 +Node: Built-in491718 +Node: Calling Built-in492796 +Node: Numeric Functions494784 +Ref: Numeric Functions-Footnote-1499620 +Ref: Numeric Functions-Footnote-2499977 +Ref: Numeric Functions-Footnote-3500025 +Node: String Functions500294 +Ref: String Functions-Footnote-1523291 +Ref: String Functions-Footnote-2523420 +Ref: String Functions-Footnote-3523668 +Node: Gory Details523755 +Ref: table-sub-escapes525528 +Ref: table-sub-proposed527048 +Ref: table-posix-sub528412 +Ref: table-gensub-escapes529952 +Ref: Gory Details-Footnote-1531128 +Node: I/O Functions531279 +Ref: I/O Functions-Footnote-1538389 +Node: Time Functions538536 +Ref: Time Functions-Footnote-1549000 +Ref: Time Functions-Footnote-2549068 +Ref: Time Functions-Footnote-3549226 +Ref: Time Functions-Footnote-4549337 +Ref: Time Functions-Footnote-5549449 +Ref: Time Functions-Footnote-6549676 +Node: Bitwise Functions549942 +Ref: table-bitwise-ops550504 +Ref: Bitwise Functions-Footnote-1554749 +Node: Type Functions554933 +Node: I18N Functions556075 +Node: User-defined557720 +Node: Definition Syntax558524 +Ref: Definition Syntax-Footnote-1563703 +Node: Function Example563772 +Ref: Function Example-Footnote-1566412 +Node: Function Caveats566434 +Node: Calling A Function566952 +Node: Variable Scope567907 +Node: Pass By Value/Reference570895 +Node: Return Statement574405 +Node: Dynamic Typing577389 +Node: Indirect Calls578318 +Node: Functions Summary588031 +Node: Library Functions590570 +Ref: Library Functions-Footnote-1594188 +Ref: Library Functions-Footnote-2594331 +Node: Library Names594502 +Ref: Library Names-Footnote-1597975 +Ref: Library Names-Footnote-2598195 +Node: General Functions598281 +Node: Strtonum Function599309 +Node: Assert Function602089 +Node: Round Function605415 +Node: Cliff Random Function606956 +Node: Ordinal Functions607972 +Ref: Ordinal Functions-Footnote-1611049 +Ref: Ordinal Functions-Footnote-2611301 +Node: Join Function611512 +Ref: Join Function-Footnote-1613283 +Node: Getlocaltime Function613483 +Node: Readfile Function617219 +Node: Data File Management619058 +Node: Filetrans Function619690 +Node: Rewind Function623759 +Node: File Checking625317 +Ref: File Checking-Footnote-1626449 +Node: Empty Files626650 +Node: Ignoring Assigns628629 +Node: Getopt Function630183 +Ref: Getopt Function-Footnote-1641486 +Node: Passwd Functions641689 +Ref: Passwd Functions-Footnote-1650668 +Node: Group Functions650756 +Ref: Group Functions-Footnote-1658697 +Node: Walking Arrays658910 +Node: Library Functions Summary660513 +Node: Library exercises661901 +Node: Sample Programs663181 +Node: Running Examples663951 +Node: Clones664679 +Node: Cut Program665903 +Node: Egrep Program675771 +Ref: Egrep Program-Footnote-1683742 +Node: Id Program683852 +Node: Split Program687516 +Ref: Split Program-Footnote-1691054 +Node: Tee Program691182 +Node: Uniq Program693989 +Node: Wc Program701419 +Ref: Wc Program-Footnote-1705684 +Node: Miscellaneous Programs705776 +Node: Dupword Program706989 +Node: Alarm Program709020 +Node: Translate Program713834 +Ref: Translate Program-Footnote-1718225 +Ref: Translate Program-Footnote-2718495 +Node: Labels Program718629 +Ref: Labels Program-Footnote-1722000 +Node: Word Sorting722084 +Node: History Sorting726127 +Node: Extract Program727963 +Node: Simple Sed735499 +Node: Igawk Program738561 +Ref: Igawk Program-Footnote-1752865 +Ref: Igawk Program-Footnote-2753066 +Node: Anagram Program753204 +Node: Signature Program756272 +Node: Programs Summary757519 +Node: Programs Exercises758734 +Node: Advanced Features762385 +Node: Nondecimal Data764333 +Node: Array Sorting765910 +Node: Controlling Array Traversal766607 +Node: Array Sorting Functions774887 +Ref: Array Sorting Functions-Footnote-1778794 +Node: Two-way I/O778988 +Ref: Two-way I/O-Footnote-1783932 +Ref: Two-way I/O-Footnote-2784111 +Node: TCP/IP Networking784193 +Node: Profiling787038 +Node: Advanced Features Summary794589 +Node: Internationalization796453 +Node: I18N and L10N797933 +Node: Explaining gettext798619 +Ref: Explaining gettext-Footnote-1803645 +Ref: Explaining gettext-Footnote-2803829 +Node: Programmer i18n803994 +Ref: Programmer i18n-Footnote-1808788 +Node: Translator i18n808837 +Node: String Extraction809631 +Ref: String Extraction-Footnote-1810764 +Node: Printf Ordering810850 +Ref: Printf Ordering-Footnote-1813632 +Node: I18N Portability813696 +Ref: I18N Portability-Footnote-1816145 +Node: I18N Example816208 +Ref: I18N Example-Footnote-1818914 +Node: Gawk I18N818986 +Node: I18N Summary819624 +Node: Debugger820963 +Node: Debugging821985 +Node: Debugging Concepts822426 +Node: Debugging Terms824282 +Node: Awk Debugging826879 +Node: Sample Debugging Session827771 +Node: Debugger Invocation828291 +Node: Finding The Bug829624 +Node: List of Debugger Commands836106 +Node: Breakpoint Control837438 +Node: Debugger Execution Control841102 +Node: Viewing And Changing Data844462 +Node: Execution Stack847820 +Node: Debugger Info849333 +Node: Miscellaneous Debugger Commands853327 +Node: Readline Support858511 +Node: Limitations859403 +Node: Debugging Summary861677 +Node: Arbitrary Precision Arithmetic862845 +Node: Computer Arithmetic864332 +Ref: Computer Arithmetic-Footnote-1868719 +Node: Math Definitions868776 +Ref: table-ieee-formats872065 +Ref: Math Definitions-Footnote-1872605 +Node: MPFR features872708 +Node: FP Math Caution874325 +Ref: FP Math Caution-Footnote-1875375 +Node: Inexactness of computations875744 +Node: Inexact representation876692 +Node: Comparing FP Values878047 +Node: Errors accumulate879011 +Node: Getting Accuracy880444 +Node: Try To Round883103 +Node: Setting precision884002 +Ref: table-predefined-precision-strings884684 +Node: Setting the rounding mode886477 +Ref: table-gawk-rounding-modes886841 +Ref: Setting the rounding mode-Footnote-1890295 +Node: Arbitrary Precision Integers890474 +Ref: Arbitrary Precision Integers-Footnote-1894247 +Node: POSIX Floating Point Problems894396 +Ref: POSIX Floating Point Problems-Footnote-1898272 +Node: Floating point summary898310 +Node: Dynamic Extensions900514 +Node: Extension Intro902066 +Node: Plugin License903331 +Node: Extension Mechanism Outline904016 +Ref: figure-load-extension904440 +Ref: figure-load-new-function905925 +Ref: figure-call-new-function906927 +Node: Extension API Description908911 +Node: Extension API Functions Introduction910361 +Node: General Data Types915228 +Ref: General Data Types-Footnote-1920921 +Node: Requesting Values921220 +Ref: table-value-types-returned921957 +Node: Memory Allocation Functions922915 +Ref: Memory Allocation Functions-Footnote-1925662 +Node: Constructor Functions925758 +Node: Registration Functions927516 +Node: Extension Functions928201 +Node: Exit Callback Functions930503 +Node: Extension Version String931751 +Node: Input Parsers932401 +Node: Output Wrappers942215 +Node: Two-way processors946731 +Node: Printing Messages948935 +Ref: Printing Messages-Footnote-1950012 +Node: Updating `ERRNO'950164 +Node: Accessing Parameters950903 +Node: Symbol Table Access952133 +Node: Symbol table by name952647 +Node: Symbol table by cookie954623 +Ref: Symbol table by cookie-Footnote-1958756 +Node: Cached values958819 +Ref: Cached values-Footnote-1962323 +Node: Array Manipulation962414 +Ref: Array Manipulation-Footnote-1963512 +Node: Array Data Types963551 +Ref: Array Data Types-Footnote-1966254 +Node: Array Functions966346 +Node: Flattening Arrays970220 +Node: Creating Arrays977072 +Node: Extension API Variables981803 +Node: Extension Versioning982439 +Node: Extension API Informational Variables984340 +Node: Extension API Boilerplate985426 +Node: Finding Extensions989230 +Node: Extension Example989790 +Node: Internal File Description990520 +Node: Internal File Ops994611 +Ref: Internal File Ops-Footnote-11006043 +Node: Using Internal File Ops1006183 +Ref: Using Internal File Ops-Footnote-11008530 +Node: Extension Samples1008798 +Node: Extension Sample File Functions1010322 +Node: Extension Sample Fnmatch1017890 +Node: Extension Sample Fork1019372 +Node: Extension Sample Inplace1020585 +Node: Extension Sample Ord1022260 +Node: Extension Sample Readdir1023096 +Ref: table-readdir-file-types1023952 +Node: Extension Sample Revout1024751 +Node: Extension Sample Rev2way1025342 +Node: Extension Sample Read write array1026083 +Node: Extension Sample Readfile1027962 +Node: Extension Sample API Tests1029062 +Node: Extension Sample Time1029587 +Node: gawkextlib1030902 +Node: Extension summary1033715 +Node: Extension Exercises1037408 +Node: Language History1038130 +Node: V7/SVR3.11039773 +Node: SVR41042093 +Node: POSIX1043535 +Node: BTL1044921 +Node: POSIX/GNU1045655 +Node: Feature History1051371 +Node: Common Extensions1064462 +Node: Ranges and Locales1065774 +Ref: Ranges and Locales-Footnote-11070391 +Ref: Ranges and Locales-Footnote-21070418 +Ref: Ranges and Locales-Footnote-31070652 +Node: Contributors1070873 +Node: History summary1076298 +Node: Installation1077667 +Node: Gawk Distribution1078618 +Node: Getting1079102 +Node: Extracting1079926 +Node: Distribution contents1081568 +Node: Unix Installation1087338 +Node: Quick Installation1087955 +Node: Additional Configuration Options1090397 +Node: Configuration Philosophy1092135 +Node: Non-Unix Installation1094486 +Node: PC Installation1094944 +Node: PC Binary Installation1096255 +Node: PC Compiling1098103 +Ref: PC Compiling-Footnote-11101102 +Node: PC Testing1101207 +Node: PC Using1102383 +Node: Cygwin1106535 +Node: MSYS1107344 +Node: VMS Installation1107858 +Node: VMS Compilation1108654 +Ref: VMS Compilation-Footnote-11109876 +Node: VMS Dynamic Extensions1109934 +Node: VMS Installation Details1111307 +Node: VMS Running1113559 +Node: VMS GNV1116393 +Node: VMS Old Gawk1117116 +Node: Bugs1117586 +Node: Other Versions1121590 +Node: Installation summary1127817 +Node: Notes1128873 +Node: Compatibility Mode1129738 +Node: Additions1130520 +Node: Accessing The Source1131445 +Node: Adding Code1132881 +Node: New Ports1139059 +Node: Derived Files1143540 +Ref: Derived Files-Footnote-11148621 +Ref: Derived Files-Footnote-21148655 +Ref: Derived Files-Footnote-31149251 +Node: Future Extensions1149365 +Node: Implementation Limitations1149971 +Node: Extension Design1151219 +Node: Old Extension Problems1152373 +Ref: Old Extension Problems-Footnote-11153890 +Node: Extension New Mechanism Goals1153947 +Ref: Extension New Mechanism Goals-Footnote-11157307 +Node: Extension Other Design Decisions1157496 +Node: Extension Future Growth1159602 +Node: Old Extension Mechanism1160438 +Node: Notes summary1162200 +Node: Basic Concepts1163386 +Node: Basic High Level1164067 +Ref: figure-general-flow1164339 +Ref: figure-process-flow1164938 +Ref: Basic High Level-Footnote-11168167 +Node: Basic Data Typing1168352 +Node: Glossary1171680 +Node: Copying1196832 +Node: GNU Free Documentation License1234388 +Node: Index1259524 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 3b9e300e..52c526a4 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -1218,7 +1218,6 @@ rest of the file alone. Such jobs are often easy with @command{awk}. The @command{awk} utility interprets a special-purpose programming language that makes it easy to handle simple data-reformatting jobs. -@cindex Brian Kernighan's @command{awk} The GNU implementation of @command{awk} is called @command{gawk}; if you invoke it with the proper options or environment variables (@pxref{Options}), it is fully @@ -1696,8 +1695,15 @@ This @value{SECTION} briefly documents the typographical conventions used in Tex Examples you would type at the command line are preceded by the common shell primary and secondary prompts, @samp{$} and @samp{>}. Input that you type is shown @kbd{like this}. +@c 8/2014: @print{} is stripped from the texi to make docbook. +@ifclear FOR_PRINT Output from the command is preceded by the glyph ``@print{}''. This typically represents the command's standard output. +@end ifclear +@ifset FOR_PRINT +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 by the glyph ``@error{}''. For example: @@ -1727,6 +1733,10 @@ 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. +For the sake of brevity, throughout this @value{DOCUMENT}, we refer to +Brian Kernighan's version of @command{awk} as ``BWK @command{awk}.'' +(@xref{Other Versions}, for information on his and other versions.) + @ifset FOR_PRINT @quotation NOTE Notes of interest look like this. @@ -2080,11 +2090,13 @@ Thanks to Patrice Dumas for the new @command{makeinfo} program. Thanks to Karl Berry who continues to work to keep the Texinfo markup language sane. +@cindex Kernighan, Brian +@cindex Brennan, Michael +@cindex Day, Robert P.J.@: 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. -@cindex Kernighan, Brian I would like to thank Brian Kernighan for invaluable assistance during the testing and debugging of @command{gawk}, and for ongoing help and advice in clarifying numerous points about the language. @@ -2093,7 +2105,7 @@ 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! +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@enddots{} @@ -2391,9 +2403,10 @@ awk -f @var{source-file} @var{input-file1} @var{input-file2} @dots{} @cindex @option{-f} option @cindex command line, option @option{-f} -The @option{-f} instructs the @command{awk} utility to get the @command{awk} program -from the file @var{source-file}. Any @value{FN} can be used for -@var{source-file}. For example, you could put the program: +The @option{-f} instructs the @command{awk} utility to get the +@command{awk} program from the file @var{source-file} (@pxref{Options}). +Any @value{FN} can be used for @var{source-file}. For example, you +could put the program: @example BEGIN @{ print "Don't Panic!" @} @@ -2456,7 +2469,7 @@ After making this file executable (with the @command{chmod} utility), simply type @samp{advice} at the shell and the system arranges to run @command{awk}@footnote{The line beginning with @samp{#!} lists the full @value{FN} of an interpreter -to run and an optional initial command-line argument to pass to that +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 @value{FN} of the @command{awk} program. @@ -3402,8 +3415,8 @@ eight-bit microprocessors, and a microcode assembler for a special-purpose Prolog computer. While the original @command{awk}'s capabilities were strained by tasks -of such complexity, modern versions are more capable. Even Brian Kernighan's -version of @command{awk} has fewer predefined limits, and those +of such complexity, modern versions are more capable. Even BWK @command{awk} +has fewer predefined limits, and those that it has are much larger than they used to be. @cindex @command{awk} programs, complex @@ -3644,7 +3657,7 @@ multibyte characters. This option is an easy way to tell @command{gawk}: @cindex compatibility mode (@command{gawk}), specifying Specify @dfn{compatibility mode}, in which the GNU extensions to the @command{awk} language are disabled, so that @command{gawk} behaves just -like Brian Kernighan's version @command{awk}. +like BWK @command{awk}. @xref{POSIX/GNU}, which summarizes the extensions. @ifclear FOR_PRINT @@ -5010,7 +5023,7 @@ leaves what happens as undefined. There are two choices: @cindex Brian Kernighan's @command{awk} @table @asis @item Strip the backslash out -This is what Brian Kernighan's @command{awk} and @command{gawk} both do. +This is what BWK @command{awk} and @command{gawk} both do. For example, @code{"a\qc"} is the same as @code{"aqc"}. (Because this is such an easy bug both to introduce and to miss, @command{gawk} warns you about it.) @@ -5053,7 +5066,7 @@ leaves what happens as undefined. There are two choices: @cindex Brian Kernighan's @command{awk} @table @asis @item Strip the backslash out -This is what Brian Kernighan's @command{awk} and @command{gawk} both do. +This is what BWK @command{awk} and @command{gawk} both do. For example, @code{"a\qc"} is the same as @code{"aqc"}. (Because this is such an easy bug both to introduce and to miss, @command{gawk} warns you about it.) @@ -5676,7 +5689,7 @@ are allowed. Traditional Unix @command{awk} regexps are matched. The GNU operators are not special, and interval expressions are not available. The POSIX character classes (@samp{[[:alnum:]]}, etc.) are supported, -as Brian Kernighan's @command{awk} does support them. +as BWK @command{awk} does support them. Characters described by octal and hexadecimal escape sequences are treated literally, even if they represent regexp metacharacters. @@ -7034,7 +7047,7 @@ should not rely on any specific behavior in your programs. @value{DARKCORNER} @cindex Brian Kernighan's @command{awk} -As a point of information, Brian Kernighan's @command{awk} allows @samp{^} +As a point of information, BWK @command{awk} allows @samp{^} to match only at the beginning of the record. @command{gawk} also works this way. For example: @@ -8213,7 +8226,7 @@ Unfortunately, @command{gawk} has not been consistent in its treatment of a construct like @samp{@w{"echo "} "date" | getline}. Most versions, including the current version, treat it at as @samp{@w{("echo "} "date") | getline}. -(This how Brian Kernighan's @command{awk} behaves.) +(This how BWK @command{awk} behaves.) Some versions changed and treated it as @samp{@w{"echo "} ("date" | getline)}. (This is how @command{mawk} behaves.) @@ -8727,6 +8740,10 @@ double-quote characters, your text is taken as an @command{awk} expression, and you will probably get an error. Keep in mind that a space is printed between any two items. +Note that the @code{print} statement is a statement and not an +expression---you can't use it the pattern part of a pattern-action +statement, for example. + @node Print Examples @section @code{print} Statement Examples @@ -11083,7 +11100,7 @@ print "something meaningful" > file name @cindex @command{mawk} utility @noindent This produces a syntax error with some versions of Unix -@command{awk}.@footnote{It happens that Brian Kernighan's +@command{awk}.@footnote{It happens that BWK @command{awk}, @command{gawk} and @command{mawk} all ``get it right,'' but you should not rely on this.} It is necessary to use the following: @@ -11426,7 +11443,7 @@ A workaround is: awk '/[=]=/' /dev/null @end example -@command{gawk} does not have this problem; Brian Kernighan's @command{awk} +@command{gawk} does not have this problem; BWK @command{awk} and @command{mawk} also do not (@pxref{Other Versions}). @docbook @@ -11472,7 +11489,7 @@ A workaround is: awk '/[=]=/' /dev/null @end example -@command{gawk} does not have this problem; Brian Kernighan's @command{awk} +@command{gawk} does not have this problem; BWK @command{awk} and @command{mawk} also do not (@pxref{Other Versions}). @end cartouche @end ifnotdocbook @@ -13172,7 +13189,7 @@ rule. It contains the number of fields from the last input record. Most probably due to an oversight, the standard does not say that @code{$0} is also preserved, although logically one would think that it should be. In fact, @command{gawk} does preserve the value of @code{$0} for use in -@code{END} rules. Be aware, however, that Brian Kernighan's @command{awk}, and possibly +@code{END} rules. Be aware, however, that BWK @command{awk}, and possibly other implementations, do not. The third point follows from the first two. The meaning of @samp{print} @@ -13916,7 +13933,7 @@ historical implementations of @command{awk} treated the @code{break} statement outside of a loop as if it were a @code{next} statement (@pxref{Next Statement}). @value{DARKCORNER} -Recent versions of Brian Kernighan's @command{awk} no longer allow this usage, +Recent versions of BWK @command{awk} no longer allow this usage, nor does @command{gawk}. @node Continue Statement @@ -13983,7 +14000,7 @@ statement outside a loop: as if it were a @code{next} statement (@pxref{Next Statement}). @value{DARKCORNER} -Recent versions of Brian Kernighan's @command{awk} no longer work this way, nor +Recent versions of BWK @command{awk} no longer work this way, nor does @command{gawk}. @node Next Statement @@ -14112,7 +14129,7 @@ See @uref{http://austingroupbugs.net/view.php?id=607, the Austin Group website}. @cindex @code{nextfile} statement, user-defined functions and @cindex Brian Kernighan's @command{awk} @cindex @command{mawk} utility -The current version of the Brian Kernighan's @command{awk}, and @command{mawk} (@pxref{Other +The current version of BWK @command{awk}, and @command{mawk} (@pxref{Other Versions}) also support @code{nextfile}. However, they don't allow the @code{nextfile} statement inside function bodies (@pxref{User-defined}). @command{gawk} does; a @code{nextfile} inside a function body reads the @@ -15743,7 +15760,7 @@ $ @kbd{gawk -f loopcheck.awk} @print{} is @end example -Contrast this to Brian Kernighan's @command{awk}: +Contrast this to BWK @command{awk}: @example $ @kbd{nawk -f loopcheck.awk} @@ -15988,7 +16005,7 @@ using @code{delete} without a subscript was a @command{gawk} extension. As of September, 2012, it was accepted for inclusion into the POSIX standard. See @uref{http://austingroupbugs.net/view.php?id=544, the Austin Group website}. This form of the @code{delete} statement is also supported -by Brian Kernighan's @command{awk} and @command{mawk}, as well as +by BWK @command{awk} and @command{mawk}, as well as by a number of other implementations (@pxref{Other Versions}). @end quotation @@ -17458,7 +17475,7 @@ in the string, counting from character @var{start}. @cindex Brian Kernighan's @command{awk} If @var{start} is less than one, @code{substr()} treats it as if it was one. (POSIX doesn't specify what to do in this case: -Brian Kernighan's @command{awk} acts this way, and therefore @command{gawk} +BWK @command{awk} acts this way, and therefore @command{gawk} does too.) If @var{start} is greater than the number of characters in the string, @code{substr()} returns the null string. @@ -17550,7 +17567,7 @@ escape sequences listed in @ref{Escape Sequences}. Thus, for every @samp{\} that @command{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 -@samp{\}, Brian Kernighan's @command{awk} and @command{gawk} both simply remove the initial +@samp{\}, BWK @command{awk} and @command{gawk} both simply remove the initial @samp{\} and put the next character into the string. Thus, for example, @code{"a\qb"} is treated as @code{"aqb"}. @@ -17924,7 +17941,7 @@ buffers its output and the @code{fflush()} function forces @cindex extensions, common@comma{} @code{fflush()} function @cindex Brian Kernighan's @command{awk} -@code{fflush()} was added to Brian Kernighan's @command{awk} in +@code{fflush()} was added to BWK @command{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. @@ -27784,7 +27801,16 @@ and/or groups of characters sort in a given language. @cindex @code{LC_CTYPE} locale category @item LC_CTYPE Character-type information (alphabetic, digit, upper- or lowercase, and -so on). +so on) as well as character encoding. +@ignore +In June 2001 Bruno Haible wrote: +- Description of LC_CTYPE: It determines both + 1. character encoding, + 2. character type information. + (For example, in both KOI8-R and ISO-8859-5 the character type information + is the same - cyrillic letters could as 'alpha' - but the encoding is + different.) +@end ignore This information is accessed via the POSIX character classes in regular expressions, such as @code{/[[:alnum:]]/} @@ -27805,11 +27831,6 @@ use a comma every three decimal places and a period for the decimal point, while many Europeans do exactly the opposite: 1,234.56 versus 1.234,56.} -@cindex @code{LC_RESPONSE} locale category -@item LC_RESPONSE -Response information, such as how ``yes'' and ``no'' appear in the -local language, and possibly other information as well. - @cindex time, localization and @cindex dates, information related to@comma{} localization @cindex @code{LC_TIME} locale category @@ -27944,18 +27965,33 @@ printf(_"Number of users is %d\n", nusers) @item If you are creating strings dynamically, you can still translate them, using the @code{dcgettext()} -built-in function: +built-in function:@footnote{Thanks to Bruno Haible for this +example.} @example -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) @end example Here, the call to @code{dcgettext()} supplies a different text domain (@code{"adminprog"}) in which to find the message, but it uses the default @code{"LC_MESSAGES"} category. +The previous example only works if @code{ncustomers} is greater than one. +This example would be better done with @code{dcngettext()}: + +@example +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) +@end example + + @cindex @code{LC_MESSAGES} locale category, @code{bindtextdomain()} function (@command{gawk}) @item During development, you might want to put the @file{.gmo} @@ -28035,6 +28071,9 @@ appear as the first argument to @code{dcgettext()} or as the first and second argument to @code{dcngettext()}.@footnote{The @command{xgettext} utility that comes with GNU @command{gettext} can handle @file{.awk} files.} +You should distribute the generated @file{.pot} file with +your @command{awk} program; translators will eventually use it +to provide you translations that you can also then distribute. @xref{I18N Example}, for the full list of steps to go through to create and test translations for @command{guide}. @@ -28325,8 +28364,7 @@ This file must be renamed and placed in the proper directory so that @command{gawk} can find it: @example -$ @kbd{msgfmt guide-mellow.po} -$ @kbd{mv messages en_US.UTF-8/LC_MESSAGES/guide.mo} +$ @kbd{msgfmt guide-mellow.po -o en_US.UTF-8/LC_MESSAGES/guide.mo} @end example Finally, we run the program to test it: @@ -35259,8 +35297,7 @@ functions for internationalization (@pxref{Programmer i18n}). @item -The @code{fflush()} function from Brian Kernighan's -version of @command{awk} +The @code{fflush()} function from BWK @command{awk} (@pxref{I/O Functions}). @item @@ -35580,7 +35617,7 @@ The @code{next file} statement became @code{nextfile} @item The @code{fflush()} function from -Brian Kernighan's @command{awk} +BWK @command{awk} (then at Bell Laboratories; @pxref{I/O Functions}). @@ -35595,7 +35632,7 @@ the original Version 7 Unix version of @command{awk} (@pxref{V7/SVR3.1}). @item -The @option{-m} option from Brian Kernighan's @command{awk}. (He was +The @option{-m} option from BWK @command{awk}. (Brian was still at Bell Laboratories at the time.) This was later removed from both his @command{awk} and from @command{gawk}. @@ -35837,7 +35874,7 @@ An optional third argument to (@pxref{String Functions}). @item -The behavior of @code{fflush()} changed to match Brian Kernighan's @command{awk} +The behavior of @code{fflush()} changed to match BWK @command{awk} and for POSIX; now both @samp{fflush()} and @samp{fflush("")} flush all open output redirections (@pxref{I/O Functions}). @@ -37934,7 +37971,7 @@ since approximately 2003. @cindex source code, @command{pawk} @item @command{pawk} Nelson H.F.@: Beebe at the University of Utah has modified -Brian Kernighan's @command{awk} to provide timing and profiling information. +BWK @command{awk} to provide timing and profiling information. It is different from @command{gawk} with the @option{--profile} option. (@pxref{Profiling}), in that it uses CPU-based profiling, not line-count @@ -37997,8 +38034,7 @@ This is an embeddable @command{awk} interpreter derived from This is a Python module that claims to bring @command{awk}-like features to Python. See @uref{https://github.com/alecthomas/pawk} for more information. (This is not related to Nelson Beebe's -modified version of Brian Kernighan's @command{awk}, -described earlier.) +modified version of BWK @command{awk}, described earlier.) @item @w{QSE Awk} @cindex QSE Awk diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 732096cc..0ba31813 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -1213,7 +1213,6 @@ rest of the file alone. Such jobs are often easy with @command{awk}. The @command{awk} utility interprets a special-purpose programming language that makes it easy to handle simple data-reformatting jobs. -@cindex Brian Kernighan's @command{awk} The GNU implementation of @command{awk} is called @command{gawk}; if you invoke it with the proper options or environment variables (@pxref{Options}), it is fully @@ -1663,8 +1662,15 @@ This @value{SECTION} briefly documents the typographical conventions used in Tex Examples you would type at the command line are preceded by the common shell primary and secondary prompts, @samp{$} and @samp{>}. Input that you type is shown @kbd{like this}. +@c 8/2014: @print{} is stripped from the texi to make docbook. +@ifclear FOR_PRINT Output from the command is preceded by the glyph ``@print{}''. This typically represents the command's standard output. +@end ifclear +@ifset FOR_PRINT +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 by the glyph ``@error{}''. For example: @@ -1694,6 +1700,10 @@ 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. +For the sake of brevity, throughout this @value{DOCUMENT}, we refer to +Brian Kernighan's version of @command{awk} as ``BWK @command{awk}.'' +(@xref{Other Versions}, for information on his and other versions.) + @ifset FOR_PRINT @quotation NOTE Notes of interest look like this. @@ -2047,11 +2057,13 @@ Thanks to Patrice Dumas for the new @command{makeinfo} program. Thanks to Karl Berry who continues to work to keep the Texinfo markup language sane. +@cindex Kernighan, Brian +@cindex Brennan, Michael +@cindex Day, Robert P.J.@: 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. -@cindex Kernighan, Brian I would like to thank Brian Kernighan for invaluable assistance during the testing and debugging of @command{gawk}, and for ongoing help and advice in clarifying numerous points about the language. @@ -2060,7 +2072,7 @@ 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! +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@enddots{} @@ -2358,9 +2370,10 @@ awk -f @var{source-file} @var{input-file1} @var{input-file2} @dots{} @cindex @option{-f} option @cindex command line, option @option{-f} -The @option{-f} instructs the @command{awk} utility to get the @command{awk} program -from the file @var{source-file}. Any @value{FN} can be used for -@var{source-file}. For example, you could put the program: +The @option{-f} instructs the @command{awk} utility to get the +@command{awk} program from the file @var{source-file} (@pxref{Options}). +Any @value{FN} can be used for @var{source-file}. For example, you +could put the program: @example BEGIN @{ print "Don't Panic!" @} @@ -2423,7 +2436,7 @@ After making this file executable (with the @command{chmod} utility), simply type @samp{advice} at the shell and the system arranges to run @command{awk}@footnote{The line beginning with @samp{#!} lists the full @value{FN} of an interpreter -to run and an optional initial command-line argument to pass to that +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 @value{FN} of the @command{awk} program. @@ -3330,8 +3343,8 @@ eight-bit microprocessors, and a microcode assembler for a special-purpose Prolog computer. While the original @command{awk}'s capabilities were strained by tasks -of such complexity, modern versions are more capable. Even Brian Kernighan's -version of @command{awk} has fewer predefined limits, and those +of such complexity, modern versions are more capable. Even BWK @command{awk} +has fewer predefined limits, and those that it has are much larger than they used to be. @cindex @command{awk} programs, complex @@ -3572,7 +3585,7 @@ multibyte characters. This option is an easy way to tell @command{gawk}: @cindex compatibility mode (@command{gawk}), specifying Specify @dfn{compatibility mode}, in which the GNU extensions to the @command{awk} language are disabled, so that @command{gawk} behaves just -like Brian Kernighan's version @command{awk}. +like BWK @command{awk}. @xref{POSIX/GNU}, which summarizes the extensions. @ifclear FOR_PRINT @@ -4933,7 +4946,7 @@ leaves what happens as undefined. There are two choices: @cindex Brian Kernighan's @command{awk} @table @asis @item Strip the backslash out -This is what Brian Kernighan's @command{awk} and @command{gawk} both do. +This is what BWK @command{awk} and @command{gawk} both do. For example, @code{"a\qc"} is the same as @code{"aqc"}. (Because this is such an easy bug both to introduce and to miss, @command{gawk} warns you about it.) @@ -5521,7 +5534,7 @@ are allowed. Traditional Unix @command{awk} regexps are matched. The GNU operators are not special, and interval expressions are not available. The POSIX character classes (@samp{[[:alnum:]]}, etc.) are supported, -as Brian Kernighan's @command{awk} does support them. +as BWK @command{awk} does support them. Characters described by octal and hexadecimal escape sequences are treated literally, even if they represent regexp metacharacters. @@ -6748,7 +6761,7 @@ should not rely on any specific behavior in your programs. @value{DARKCORNER} @cindex Brian Kernighan's @command{awk} -As a point of information, Brian Kernighan's @command{awk} allows @samp{^} +As a point of information, BWK @command{awk} allows @samp{^} to match only at the beginning of the record. @command{gawk} also works this way. For example: @@ -7832,7 +7845,7 @@ Unfortunately, @command{gawk} has not been consistent in its treatment of a construct like @samp{@w{"echo "} "date" | getline}. Most versions, including the current version, treat it at as @samp{@w{("echo "} "date") | getline}. -(This how Brian Kernighan's @command{awk} behaves.) +(This how BWK @command{awk} behaves.) Some versions changed and treated it as @samp{@w{"echo "} ("date" | getline)}. (This is how @command{mawk} behaves.) @@ -8346,6 +8359,10 @@ double-quote characters, your text is taken as an @command{awk} expression, and you will probably get an error. Keep in mind that a space is printed between any two items. +Note that the @code{print} statement is a statement and not an +expression---you can't use it the pattern part of a pattern-action +statement, for example. + @node Print Examples @section @code{print} Statement Examples @@ -10544,7 +10561,7 @@ print "something meaningful" > file name @cindex @command{mawk} utility @noindent This produces a syntax error with some versions of Unix -@command{awk}.@footnote{It happens that Brian Kernighan's +@command{awk}.@footnote{It happens that BWK @command{awk}, @command{gawk} and @command{mawk} all ``get it right,'' but you should not rely on this.} It is necessary to use the following: @@ -10882,7 +10899,7 @@ A workaround is: awk '/[=]=/' /dev/null @end example -@command{gawk} does not have this problem; Brian Kernighan's @command{awk} +@command{gawk} does not have this problem; BWK @command{awk} and @command{mawk} also do not (@pxref{Other Versions}). @end sidebar @c ENDOFRANGE exas @@ -12523,7 +12540,7 @@ rule. It contains the number of fields from the last input record. Most probably due to an oversight, the standard does not say that @code{$0} is also preserved, although logically one would think that it should be. In fact, @command{gawk} does preserve the value of @code{$0} for use in -@code{END} rules. Be aware, however, that Brian Kernighan's @command{awk}, and possibly +@code{END} rules. Be aware, however, that BWK @command{awk}, and possibly other implementations, do not. The third point follows from the first two. The meaning of @samp{print} @@ -13267,7 +13284,7 @@ historical implementations of @command{awk} treated the @code{break} statement outside of a loop as if it were a @code{next} statement (@pxref{Next Statement}). @value{DARKCORNER} -Recent versions of Brian Kernighan's @command{awk} no longer allow this usage, +Recent versions of BWK @command{awk} no longer allow this usage, nor does @command{gawk}. @node Continue Statement @@ -13334,7 +13351,7 @@ statement outside a loop: as if it were a @code{next} statement (@pxref{Next Statement}). @value{DARKCORNER} -Recent versions of Brian Kernighan's @command{awk} no longer work this way, nor +Recent versions of BWK @command{awk} no longer work this way, nor does @command{gawk}. @node Next Statement @@ -13463,7 +13480,7 @@ See @uref{http://austingroupbugs.net/view.php?id=607, the Austin Group website}. @cindex @code{nextfile} statement, user-defined functions and @cindex Brian Kernighan's @command{awk} @cindex @command{mawk} utility -The current version of the Brian Kernighan's @command{awk}, and @command{mawk} (@pxref{Other +The current version of BWK @command{awk}, and @command{mawk} (@pxref{Other Versions}) also support @code{nextfile}. However, they don't allow the @code{nextfile} statement inside function bodies (@pxref{User-defined}). @command{gawk} does; a @code{nextfile} inside a function body reads the @@ -15048,7 +15065,7 @@ $ @kbd{gawk -f loopcheck.awk} @print{} is @end example -Contrast this to Brian Kernighan's @command{awk}: +Contrast this to BWK @command{awk}: @example $ @kbd{nawk -f loopcheck.awk} @@ -15293,7 +15310,7 @@ using @code{delete} without a subscript was a @command{gawk} extension. As of September, 2012, it was accepted for inclusion into the POSIX standard. See @uref{http://austingroupbugs.net/view.php?id=544, the Austin Group website}. This form of the @code{delete} statement is also supported -by Brian Kernighan's @command{awk} and @command{mawk}, as well as +by BWK @command{awk} and @command{mawk}, as well as by a number of other implementations (@pxref{Other Versions}). @end quotation @@ -16763,7 +16780,7 @@ in the string, counting from character @var{start}. @cindex Brian Kernighan's @command{awk} If @var{start} is less than one, @code{substr()} treats it as if it was one. (POSIX doesn't specify what to do in this case: -Brian Kernighan's @command{awk} acts this way, and therefore @command{gawk} +BWK @command{awk} acts this way, and therefore @command{gawk} does too.) If @var{start} is greater than the number of characters in the string, @code{substr()} returns the null string. @@ -16855,7 +16872,7 @@ escape sequences listed in @ref{Escape Sequences}. Thus, for every @samp{\} that @command{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 -@samp{\}, Brian Kernighan's @command{awk} and @command{gawk} both simply remove the initial +@samp{\}, BWK @command{awk} and @command{gawk} both simply remove the initial @samp{\} and put the next character into the string. Thus, for example, @code{"a\qb"} is treated as @code{"aqb"}. @@ -17196,7 +17213,7 @@ buffers its output and the @code{fflush()} function forces @cindex extensions, common@comma{} @code{fflush()} function @cindex Brian Kernighan's @command{awk} -@code{fflush()} was added to Brian Kernighan's @command{awk} in +@code{fflush()} was added to BWK @command{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. @@ -26899,7 +26916,16 @@ and/or groups of characters sort in a given language. @cindex @code{LC_CTYPE} locale category @item LC_CTYPE Character-type information (alphabetic, digit, upper- or lowercase, and -so on). +so on) as well as character encoding. +@ignore +In June 2001 Bruno Haible wrote: +- Description of LC_CTYPE: It determines both + 1. character encoding, + 2. character type information. + (For example, in both KOI8-R and ISO-8859-5 the character type information + is the same - cyrillic letters could as 'alpha' - but the encoding is + different.) +@end ignore This information is accessed via the POSIX character classes in regular expressions, such as @code{/[[:alnum:]]/} @@ -26920,11 +26946,6 @@ use a comma every three decimal places and a period for the decimal point, while many Europeans do exactly the opposite: 1,234.56 versus 1.234,56.} -@cindex @code{LC_RESPONSE} locale category -@item LC_RESPONSE -Response information, such as how ``yes'' and ``no'' appear in the -local language, and possibly other information as well. - @cindex time, localization and @cindex dates, information related to@comma{} localization @cindex @code{LC_TIME} locale category @@ -27059,18 +27080,33 @@ printf(_"Number of users is %d\n", nusers) @item If you are creating strings dynamically, you can still translate them, using the @code{dcgettext()} -built-in function: +built-in function:@footnote{Thanks to Bruno Haible for this +example.} @example -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) @end example Here, the call to @code{dcgettext()} supplies a different text domain (@code{"adminprog"}) in which to find the message, but it uses the default @code{"LC_MESSAGES"} category. +The previous example only works if @code{ncustomers} is greater than one. +This example would be better done with @code{dcngettext()}: + +@example +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) +@end example + + @cindex @code{LC_MESSAGES} locale category, @code{bindtextdomain()} function (@command{gawk}) @item During development, you might want to put the @file{.gmo} @@ -27150,6 +27186,9 @@ appear as the first argument to @code{dcgettext()} or as the first and second argument to @code{dcngettext()}.@footnote{The @command{xgettext} utility that comes with GNU @command{gettext} can handle @file{.awk} files.} +You should distribute the generated @file{.pot} file with +your @command{awk} program; translators will eventually use it +to provide you translations that you can also then distribute. @xref{I18N Example}, for the full list of steps to go through to create and test translations for @command{guide}. @@ -27440,8 +27479,7 @@ This file must be renamed and placed in the proper directory so that @command{gawk} can find it: @example -$ @kbd{msgfmt guide-mellow.po} -$ @kbd{mv messages en_US.UTF-8/LC_MESSAGES/guide.mo} +$ @kbd{msgfmt guide-mellow.po -o en_US.UTF-8/LC_MESSAGES/guide.mo} @end example Finally, we run the program to test it: @@ -34374,8 +34412,7 @@ functions for internationalization (@pxref{Programmer i18n}). @item -The @code{fflush()} function from Brian Kernighan's -version of @command{awk} +The @code{fflush()} function from BWK @command{awk} (@pxref{I/O Functions}). @item @@ -34695,7 +34732,7 @@ The @code{next file} statement became @code{nextfile} @item The @code{fflush()} function from -Brian Kernighan's @command{awk} +BWK @command{awk} (then at Bell Laboratories; @pxref{I/O Functions}). @@ -34710,7 +34747,7 @@ the original Version 7 Unix version of @command{awk} (@pxref{V7/SVR3.1}). @item -The @option{-m} option from Brian Kernighan's @command{awk}. (He was +The @option{-m} option from BWK @command{awk}. (Brian was still at Bell Laboratories at the time.) This was later removed from both his @command{awk} and from @command{gawk}. @@ -34952,7 +34989,7 @@ An optional third argument to (@pxref{String Functions}). @item -The behavior of @code{fflush()} changed to match Brian Kernighan's @command{awk} +The behavior of @code{fflush()} changed to match BWK @command{awk} and for POSIX; now both @samp{fflush()} and @samp{fflush("")} flush all open output redirections (@pxref{I/O Functions}). @@ -37049,7 +37086,7 @@ since approximately 2003. @cindex source code, @command{pawk} @item @command{pawk} Nelson H.F.@: Beebe at the University of Utah has modified -Brian Kernighan's @command{awk} to provide timing and profiling information. +BWK @command{awk} to provide timing and profiling information. It is different from @command{gawk} with the @option{--profile} option. (@pxref{Profiling}), in that it uses CPU-based profiling, not line-count @@ -37112,8 +37149,7 @@ This is an embeddable @command{awk} interpreter derived from This is a Python module that claims to bring @command{awk}-like features to Python. See @uref{https://github.com/alecthomas/pawk} for more information. (This is not related to Nelson Beebe's -modified version of Brian Kernighan's @command{awk}, -described earlier.) +modified version of BWK @command{awk}, described earlier.) @item @w{QSE Awk} @cindex QSE Awk |