aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/gawk.info1304
-rw-r--r--doc/gawk.texi130
-rw-r--r--doc/gawktexi.in126
4 files changed, 830 insertions, 734 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 4ae87a19..a7cd7d6c 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 7c97a5c9..39da4897 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -1102,6 +1102,10 @@ key and another key, at the same time. For example, a `Ctrl-d' is typed
by first pressing and holding the `CONTROL' key, next pressing the `d'
key and finally releasing both keys.
+ For the sake of brevity, throughout this Info file, we refer to
+Brian Kernighan's version of `awk' as "BWK `awk'." (*Note Other
+Versions::, for information on his and other versions.)
+
Dark Corners
------------
@@ -1305,8 +1309,8 @@ have done nearly as good a job on either `gawk' or its documentation
without his help.
Brian is in a class by himself as a programmer and technical author.
-I have to thank him (yet again) for his ongoing friendship and the
-role-model he has been for me for close to 30 years! Having him as a
+I have to thank him (yet again) for his ongoing friendship and the role
+model he has been for me for close to 30 years! Having him as a
reviewer is an exciting privilege. It has also been extremely
humbling...
@@ -1503,8 +1507,8 @@ tell `awk' to use that file for its program, you type:
awk -f SOURCE-FILE INPUT-FILE1 INPUT-FILE2 ...
The `-f' instructs the `awk' utility to get the `awk' program from
-the file SOURCE-FILE. Any file name can be used for SOURCE-FILE. For
-example, you could put the program:
+the file SOURCE-FILE (*note Options::). Any file name can be used for
+SOURCE-FILE. For example, you could put the program:
BEGIN { print "Don't Panic!" }
@@ -1582,8 +1586,8 @@ the name of your script (`advice'). (d.c.) Don't rely on the value of
and commercial Unix systems.
(2) The line beginning with `#!' lists the full file name of an
-interpreter to run and an optional initial command-line argument to
-pass to that interpreter. The operating system then runs the
+interpreter to run and a single optional initial command-line argument
+to pass to that interpreter. The operating system then runs the
interpreter with the given argument and the full argument list of the
executed program. The first argument in the list is the full file name
of the `awk' program. The rest of the argument list contains either
@@ -2240,8 +2244,8 @@ retargetable assembler for eight-bit microprocessors (*note Glossary::,
for more information), and a microcode assembler for a special-purpose
Prolog computer. While the original `awk''s capabilities were strained
by tasks of such complexity, modern versions are more capable. Even
-Brian Kernighan's version of `awk' has fewer predefined limits, and
-those that it has are much larger than they used to be.
+BWK `awk' has fewer predefined limits, and those that it has are much
+larger than they used to be.
If you find yourself writing `awk' scripts of more than, say, a few
hundred lines, you might consider using a different programming
@@ -2416,9 +2420,9 @@ The following list describes options mandated by the POSIX standard:
`-c'
`--traditional'
Specify "compatibility mode", in which the GNU extensions to the
- `awk' language are disabled, so that `gawk' behaves just like
- Brian Kernighan's version `awk'. *Note POSIX/GNU::, which
- summarizes the extensions. Also see *note Compatibility Mode::.
+ `awk' language are disabled, so that `gawk' behaves just like BWK
+ `awk'. *Note POSIX/GNU::, which summarizes the extensions. Also
+ see *note Compatibility Mode::.
`-C'
`--copyright'
@@ -3401,12 +3405,12 @@ is not one of the characters previously listed, POSIX `awk' purposely
leaves what happens as undefined. There are two choices:
Strip the backslash out
- This is what Brian Kernighan's `awk' and `gawk' both do. For
- example, `"a\qc"' is the same as `"aqc"'. (Because this is such
- an easy bug both to introduce and to miss, `gawk' warns you about
- it.) Consider `FS = "[ \t]+\|[ \t]+"' to use vertical bars
- surrounded by whitespace as the field separator. There should be
- two backslashes in the string: `FS = "[ \t]+\\|[ \t]+"'.)
+ This is what BWK `awk' and `gawk' both do. For example, `"a\qc"'
+ is the same as `"aqc"'. (Because this is such an easy bug both to
+ introduce and to miss, `gawk' warns you about it.) Consider `FS =
+ "[ \t]+\|[ \t]+"' to use vertical bars surrounded by whitespace as
+ the field separator. There should be two backslashes in the
+ string: `FS = "[ \t]+\\|[ \t]+"'.)
Leave the backslash alone
Some other `awk' implementations do this. In such
@@ -3794,9 +3798,9 @@ No options
Traditional Unix `awk' regexps are matched. The GNU operators are
not special, and interval expressions are not available. The
POSIX character classes (`[[:alnum:]]', etc.) are supported, as
- Brian Kernighan's `awk' does support them. Characters described
- by octal and hexadecimal escape sequences are treated literally,
- even if they represent regexp metacharacters.
+ BWK `awk' does support them. Characters described by octal and
+ hexadecimal escape sequences are treated literally, even if they
+ represent regexp metacharacters.
`--re-interval'
Allow interval expressions in regexps, if `--traditional' has been
@@ -4740,9 +4744,8 @@ field separator a new string? It turns out that different `awk'
versions answer this question differently, and you should not rely on
any specific behavior in your programs. (d.c.)
- As a point of information, Brian Kernighan's `awk' allows `^' to
-match only at the beginning of the record. `gawk' also works this way.
-For example:
+ As a point of information, BWK `awk' allows `^' to match only at the
+beginning of the record. `gawk' also works this way. For example:
$ echo 'xxAA xxBxx C' |
> gawk -F '(^x+)|( +)' '{ for (i = 1; i <= NF; i++)
@@ -5599,10 +5602,10 @@ all `awk' implementations.
NOTE: Unfortunately, `gawk' has not been consistent in its
treatment of a construct like `"echo " "date" | getline'. Most
versions, including the current version, treat it at as `("echo "
- "date") | getline'. (This how Brian Kernighan's `awk' behaves.)
- Some versions changed and treated it as `"echo " ("date" |
- getline)'. (This is how `mawk' behaves.) In short, _always_ use
- explicit parentheses, and then you won't have to worry.
+ "date") | getline'. (This how BWK `awk' behaves.) Some versions
+ changed and treated it as `"echo " ("date" | getline)'. (This is
+ how `mawk' behaves.) In short, _always_ use explicit parentheses,
+ and then you won't have to worry.

File: gawk.info, Node: Getline/Variable/Pipe, Next: Getline/Coprocess, Prev: Getline/Pipe, Up: Getline
@@ -6039,6 +6042,10 @@ you forget to use the double-quote characters, your text is taken as an
`awk' expression, and you will probably get an error. Keep in mind
that a space is printed between any two items.
+ Note that the `print' statement is a statement and not an
+expression--you can't use it the pattern part of a pattern-action
+statement, for example.
+

File: gawk.info, Node: Print Examples, Next: Output Separators, Prev: Print, Up: Printing
@@ -7820,8 +7827,8 @@ you'll get.
---------- Footnotes ----------
- (1) It happens that Brian Kernighan's `awk', `gawk' and `mawk' all
-"get it right," but you should not rely on this.
+ (1) It happens that BWK `awk', `gawk' and `mawk' all "get it right,"
+but you should not rely on this.

File: gawk.info, Node: Assignment Ops, Next: Increment Ops, Prev: Concatenation, Up: All Operators
@@ -7985,8 +7992,8 @@ A workaround is:
awk '/[=]=/' /dev/null
- `gawk' does not have this problem; Brian Kernighan's `awk' and
-`mawk' also do not (*note Other Versions::).
+ `gawk' does not have this problem; BWK `awk' and `mawk' also do not
+(*note Other Versions::).

File: gawk.info, Node: Increment Ops, Prev: Assignment Ops, Up: All Operators
@@ -9133,8 +9140,7 @@ number of fields from the last input record. Most probably due to an
oversight, the standard does not say that `$0' is also preserved,
although logically one would think that it should be. In fact, `gawk'
does preserve the value of `$0' for use in `END' rules. Be aware,
-however, that Brian Kernighan's `awk', and possibly other
-implementations, do not.
+however, that BWK `awk', and possibly other implementations, do not.
The third point follows from the first two. The meaning of `print'
inside a `BEGIN' or `END' rule is the same as always: `print $0'. If
@@ -9702,8 +9708,8 @@ statement. This is discussed in *note Switch Statement::.
loop or `switch'. However, although it was never documented,
historical implementations of `awk' treated the `break' statement
outside of a loop as if it were a `next' statement (*note Next
-Statement::). (d.c.) Recent versions of Brian Kernighan's `awk' no
-longer allow this usage, nor does `gawk'.
+Statement::). (d.c.) Recent versions of BWK `awk' no longer allow
+this usage, nor does `gawk'.

File: gawk.info, Node: Continue Statement, Next: Next Statement, Prev: Break Statement, Up: Statements
@@ -9754,8 +9760,8 @@ This program loops forever once `x' reaches 5, since the increment
body of a loop. Historical versions of `awk' treated a `continue'
statement outside a loop the same way they treated a `break' statement
outside a loop: as if it were a `next' statement (*note Next
-Statement::). (d.c.) Recent versions of Brian Kernighan's `awk' no
-longer work this way, nor does `gawk'.
+Statement::). (d.c.) Recent versions of BWK `awk' no longer work this
+way, nor does `gawk'.

File: gawk.info, Node: Next Statement, Next: Nextfile Statement, Prev: Continue Statement, Up: Statements
@@ -9857,12 +9863,12 @@ listed in `ARGV'.
standard. See the Austin Group website
(http://austingroupbugs.net/view.php?id=607).
- The current version of the Brian Kernighan's `awk', and `mawk'
-(*note Other Versions::) also support `nextfile'. However, they don't
-allow the `nextfile' statement inside function bodies (*note
-User-defined::). `gawk' does; a `nextfile' inside a function body
-reads the next record and starts processing it with the first rule in
-the program, just as any other `nextfile' statement.
+ The current version of BWK `awk', and `mawk' (*note Other
+Versions::) also support `nextfile'. However, they don't allow the
+`nextfile' statement inside function bodies (*note User-defined::).
+`gawk' does; a `nextfile' inside a function body reads the next record
+and starts processing it with the first rule in the program, just as
+any other `nextfile' statement.

File: gawk.info, Node: Exit Statement, Prev: Nextfile Statement, Up: Statements
@@ -10960,7 +10966,7 @@ all `awk' versions do so. Consider this program, named `loopcheck.awk':
-| a
-| is
- Contrast this to Brian Kernighan's `awk':
+ Contrast this to BWK `awk':
$ nawk -f loopcheck.awk
-| loop
@@ -11166,9 +11172,9 @@ at a time.
`gawk' extension. As of September, 2012, it was accepted for
inclusion into the POSIX standard. See the Austin Group website
(http://austingroupbugs.net/view.php?id=544). This form of the
- `delete' statement is also supported by Brian Kernighan's `awk'
- and `mawk', as well as by a number of other implementations (*note
- Other Versions::).
+ `delete' statement is also supported by BWK `awk' and `mawk', as
+ well as by a number of other implementations (*note Other
+ Versions::).
The following statement provides a portable but nonobvious way to
clear out an array:(1)
@@ -12292,11 +12298,11 @@ Options::):
remaining in the string, counting from character START.
If START is less than one, `substr()' treats it as if it was one.
- (POSIX doesn't specify what to do in this case: Brian Kernighan's
- `awk' acts this way, and therefore `gawk' does too.) If START is
- greater than the number of characters in the string, `substr()'
- returns the null string. Similarly, if LENGTH is present but less
- than or equal to zero, the null string is returned.
+ (POSIX doesn't specify what to do in this case: BWK `awk' acts
+ this way, and therefore `gawk' does too.) If START is greater
+ than the number of characters in the string, `substr()' returns
+ the null string. Similarly, if LENGTH is present but less than or
+ equal to zero, the null string is returned.
The string returned by `substr()' _cannot_ be assigned. Thus, it
is a mistake to attempt to change a portion of a string, as shown
@@ -12370,9 +12376,9 @@ come after a backslash. At the lexical level, it looks for the escape
sequences listed in *note Escape Sequences::. Thus, for every `\' that
`awk' processes at the runtime level, you must type two backslashes at
the lexical level. When a character that is not valid for an escape
-sequence follows the `\', Brian Kernighan's `awk' and `gawk' both
-simply remove the initial `\' and put the next character into the
-string. Thus, for example, `"a\qb"' is treated as `"aqb"'.
+sequence follows the `\', BWK `awk' and `gawk' both simply remove the
+initial `\' and put the next character into the string. Thus, for
+example, `"a\qb"' is treated as `"aqb"'.
At the runtime level, the various functions handle sequences of `\'
and `&' differently. The situation is (sadly) somewhat complex.
@@ -12547,10 +12553,10 @@ parameters are enclosed in square brackets ([ ]):
function--`gawk' also buffers its output and the `fflush()'
function forces `gawk' to flush its buffers.
- `fflush()' was added to Brian Kernighan's `awk' in April of 1992.
- For two decades, it was not part of the POSIX standard. As of
- December, 2012, it was accepted for inclusion into the POSIX
- standard. See the Austin Group website
+ `fflush()' was added to BWK `awk' in April of 1992. For two
+ decades, it was not part of the POSIX standard. As of December,
+ 2012, it was accepted for inclusion into the POSIX standard. See
+ the Austin Group website
(http://austingroupbugs.net/view.php?id=634).
POSIX standardizes `fflush()' as follows: If there is no argument,
@@ -19814,9 +19820,9 @@ are:
`LC_CTYPE'
Character-type information (alphabetic, digit, upper- or
- lowercase, and so on). This information is accessed via the POSIX
- character classes in regular expressions, such as `/[[:alnum:]]/'
- (*note Regexp Operators::).
+ lowercase, and so on) as well as character encoding. This
+ information is accessed via the POSIX character classes in regular
+ expressions, such as `/[[:alnum:]]/' (*note Regexp Operators::).
`LC_MONETARY'
Monetary information, such as the currency symbol, and whether the
@@ -19826,10 +19832,6 @@ are:
Numeric information, such as which characters to use for the
decimal point and the thousands separator.(2)
-`LC_RESPONSE'
- Response information, such as how "yes" and "no" appear in the
- local language, and possibly other information as well.
-
`LC_TIME'
Time- and date-related information, such as 12- or 24-hour clock,
month printed before or after the day in a date, local month
@@ -19926,16 +19928,27 @@ outlined in *note Explaining gettext::, like so:
printf(_"Number of users is %d\n", nusers)
3. If you are creating strings dynamically, you can still translate
- them, using the `dcgettext()' built-in function:
+ them, using the `dcgettext()' built-in function:(1)
- message = nusers " users logged in"
- message = dcgettext(message, "adminprog")
- print message
+ if (groggy)
+ message = dcgettext("%d customers disturbing me\n", "adminprog")
+ else
+ message = dcgettext("enjoying %d customers\n", "adminprog")
+ printf(message, ncustomers)
Here, the call to `dcgettext()' supplies a different text domain
(`"adminprog"') in which to find the message, but it uses the
default `"LC_MESSAGES"' category.
+ The previous example only works if `ncustomers' is greater than
+ one. This example would be better done with `dcngettext()':
+
+ if (groggy)
+ message = dcngettext("%d customer disturbing me\n", "%d customers disturbing me\n", "adminprog")
+ else
+ message = dcngettext("enjoying %d customer\n", "enjoying %d customers\n", "adminprog")
+ printf(message, ncustomers)
+
4. During development, you might want to put the `.gmo' file in a
private directory for testing. This is done with the
`bindtextdomain()' built-in function:
@@ -19955,6 +19968,10 @@ outlined in *note Explaining gettext::, like so:
*Note I18N Example::, for an example program showing the steps to
create and use translations from `awk'.
+ ---------- Footnotes ----------
+
+ (1) Thanks to Bruno Haible for this example.
+

File: gawk.info, Node: Translator i18n, Next: I18N Example, Prev: Programmer i18n, Up: Internationalization
@@ -19994,8 +20011,11 @@ Instead, it parses it as usual and prints all marked strings to
standard output in the format of a GNU `gettext' Portable Object file.
Also included in the output are any constant strings that appear as the
first argument to `dcgettext()' or as the first and second argument to
-`dcngettext()'.(1) *Note I18N Example::, for the full list of steps to
-go through to create and test translations for `guide'.
+`dcngettext()'.(1) You should distribute the generated `.pot' file with
+your `awk' program; translators will eventually use it to provide you
+translations that you can also then distribute. *Note I18N Example::,
+for the full list of steps to go through to create and test
+translations for `guide'.
---------- Footnotes ----------
@@ -20212,8 +20232,7 @@ file to machine-readable `.mo' file. By default, `msgfmt' creates a
file named `messages'. This file must be renamed and placed in the
proper directory so that `gawk' can find it:
- $ msgfmt guide-mellow.po
- $ mv messages en_US.UTF-8/LC_MESSAGES/guide.mo
+ $ msgfmt guide-mellow.po -o en_US.UTF-8/LC_MESSAGES/guide.mo
Finally, we run the program to test it:
@@ -26048,8 +26067,8 @@ the current version of `gawk'.
- The `bindtextdomain()', `dcgettext()' and `dcngettext()'
functions for internationalization (*note Programmer i18n::).
- - The `fflush()' function from Brian Kernighan's version of
- `awk' (*note I/O Functions::).
+ - The `fflush()' function from BWK `awk' (*note I/O
+ Functions::).
- The `gensub()', `patsplit()', and `strtonum()' functions for
more powerful text manipulation (*note String Functions::).
@@ -26203,8 +26222,8 @@ in POSIX `awk', in the order they were added to `gawk'.
* The `next file' statement became `nextfile' (*note Nextfile
Statement::).
- * The `fflush()' function from Brian Kernighan's `awk' (then at Bell
- Laboratories; *note I/O Functions::).
+ * The `fflush()' function from BWK `awk' (then at Bell Laboratories;
+ *note I/O Functions::).
* New command-line options:
@@ -26212,9 +26231,9 @@ in POSIX `awk', in the order they were added to `gawk'.
available in the original Version 7 Unix version of `awk'
(*note V7/SVR3.1::).
- - The `-m' option from Brian Kernighan's `awk'. (He was still
- at Bell Laboratories at the time.) This was later removed
- from both his `awk' and from `gawk'.
+ - The `-m' option from BWK `awk'. (Brian was still at Bell
+ Laboratories at the time.) This was later removed from both
+ his `awk' and from `gawk'.
- The `--re-interval' option to provide interval expressions in
regexps (*note Regexp Operators::).
@@ -26374,9 +26393,9 @@ in POSIX `awk', in the order they were added to `gawk'.
* An optional third argument to `asort()' and `asorti()', specifying
how to sort (*note String Functions::).
- * The behavior of `fflush()' changed to match Brian Kernighan's `awk'
- and for POSIX; now both `fflush()' and `fflush("")' flush all open
- output redirections (*note I/O Functions::).
+ * The behavior of `fflush()' changed to match BWK `awk' and for
+ POSIX; now both `fflush()' and `fflush("")' flush all open output
+ redirections (*note I/O Functions::).
* The `isarray()' function which distinguishes if an item is an array
or not, to make it possible to traverse arrays of arrays (*note
@@ -27984,11 +28003,11 @@ Unix `awk'
since approximately 2003.
`pawk'
- Nelson H.F. Beebe at the University of Utah has modified Brian
- Kernighan's `awk' to provide timing and profiling information. It
- is different from `gawk' with the `--profile' option. (*note
- Profiling::), in that it uses CPU-based profiling, not line-count
- profiling. You may find it at either
+ Nelson H.F. Beebe at the University of Utah has modified BWK `awk'
+ to provide timing and profiling information. It is different from
+ `gawk' with the `--profile' option. (*note Profiling::), in that
+ it uses CPU-based profiling, not line-count profiling. You may
+ find it at either
`ftp://ftp.math.utah.edu/pub/pawk/pawk-20030606.tar.gz' or
`http://www.math.utah.edu/pub/pawk/pawk-20030606.tar.gz'.
@@ -28033,7 +28052,7 @@ Libmawk
This is a Python module that claims to bring `awk'-like features
to Python. See `https://github.com/alecthomas/pawk' for more
information. (This is not related to Nelson Beebe's modified
- version of Brian Kernighan's `awk', described earlier.)
+ version of BWK `awk', described earlier.)
QSE Awk
This is an embeddable `awk' interpreter. For more information see
@@ -31445,7 +31464,7 @@ Index
* BEGIN pattern, next/nextfile statements and <1>: Next Statement.
(line 45)
* BEGIN pattern, next/nextfile statements and: I/O And BEGIN/END.
- (line 37)
+ (line 36)
* BEGIN pattern, OFS/ORS variables, assigning values to: Output Separators.
(line 20)
* BEGIN pattern, operators and: Using BEGIN/END. (line 17)
@@ -31514,6 +31533,7 @@ Index
* Brennan, Michael <1>: Other Versions. (line 6)
* Brennan, Michael <2>: Simple Sed. (line 25)
* Brennan, Michael <3>: Delete. (line 56)
+* Brennan, Michael <4>: Acknowledgments. (line 76)
* Brennan, Michael: Foreword. (line 83)
* Brian Kernighan's awk <1>: I/O Functions. (line 43)
* Brian Kernighan's awk <2>: Gory Details. (line 19)
@@ -31530,8 +31550,7 @@ Index
* Brian Kernighan's awk <12>: GNU Regexp Operators.
(line 83)
* Brian Kernighan's awk <13>: Escape Sequences. (line 120)
-* Brian Kernighan's awk <14>: When. (line 21)
-* Brian Kernighan's awk: Preface. (line 13)
+* Brian Kernighan's awk: When. (line 21)
* Brian Kernighan's awk, extensions: BTL. (line 6)
* Brian Kernighan's awk, source code: Other Versions. (line 13)
* Brini, Davide: Signature Program. (line 6)
@@ -31740,9 +31759,9 @@ Index
* cut utility: Cut Program. (line 6)
* cut.awk program: Cut Program. (line 45)
* d debugger command (alias for delete): Breakpoint Control. (line 64)
-* d.c., See dark corner: Conventions. (line 38)
+* d.c., See dark corner: Conventions. (line 42)
* dark corner <1>: Glossary. (line 188)
-* dark corner: Conventions. (line 38)
+* dark corner: Conventions. (line 42)
* dark corner, "0" is actually true: Truth Values. (line 24)
* dark corner, /= operator vs. /=.../ regexp constant: Assignment Ops.
(line 148)
@@ -31793,9 +31812,10 @@ Index
* date utility, POSIX: Time Functions. (line 254)
* dates, converting to timestamps: Time Functions. (line 76)
* dates, information related to, localization: Explaining gettext.
- (line 116)
+ (line 112)
* Davies, Stephen <1>: Contributors. (line 74)
* Davies, Stephen: Acknowledgments. (line 60)
+* Day, Robert P.J.: Acknowledgments. (line 76)
* dcgettext <1>: Programmer i18n. (line 19)
* dcgettext: I18N Functions. (line 22)
* dcgettext() function (gawk), portability and: I18N Portability.
@@ -32070,7 +32090,7 @@ Index
* END pattern, next/nextfile statements and <1>: Next Statement.
(line 45)
* END pattern, next/nextfile statements and: I/O And BEGIN/END.
- (line 37)
+ (line 36)
* END pattern, operators and: Using BEGIN/END. (line 17)
* END pattern, print statement and: I/O And BEGIN/END. (line 16)
* ENDFILE pattern: BEGINFILE/ENDFILE. (line 6)
@@ -32724,8 +32744,8 @@ Index
* Kernighan, Brian <6>: Library Functions. (line 12)
* Kernighan, Brian <7>: Concatenation. (line 6)
* Kernighan, Brian <8>: Getline/Pipe. (line 6)
-* Kernighan, Brian <9>: Acknowledgments. (line 80)
-* Kernighan, Brian <10>: Conventions. (line 34)
+* Kernighan, Brian <9>: Acknowledgments. (line 76)
+* Kernighan, Brian <10>: Conventions. (line 38)
* Kernighan, Brian: History. (line 17)
* kill command, dynamic profiling: Profiling. (line 188)
* Knights, jedi: Undocumented. (line 6)
@@ -32735,16 +32755,15 @@ Index
* labels.awk program: Labels Program. (line 51)
* Langston, Peter: Advanced Features. (line 6)
* languages, data-driven: Basic High Level. (line 85)
-* LC_ALL locale category: Explaining gettext. (line 121)
+* LC_ALL locale category: Explaining gettext. (line 117)
* LC_COLLATE locale category: Explaining gettext. (line 94)
* LC_CTYPE locale category: Explaining gettext. (line 98)
* LC_MESSAGES locale category: Explaining gettext. (line 88)
* LC_MESSAGES locale category, bindtextdomain() function (gawk): Programmer i18n.
- (line 88)
+ (line 99)
* LC_MONETARY locale category: Explaining gettext. (line 104)
* LC_NUMERIC locale category: Explaining gettext. (line 108)
-* LC_RESPONSE locale category: Explaining gettext. (line 112)
-* LC_TIME locale category: Explaining gettext. (line 116)
+* LC_TIME locale category: Explaining gettext. (line 112)
* left angle bracket (<), < operator <1>: Precedence. (line 65)
* left angle bracket (<), < operator: Comparison Operators.
(line 11)
@@ -32914,13 +32933,13 @@ Index
* next file statement: Feature History. (line 169)
* next statement <1>: Next Statement. (line 6)
* next statement: Boolean Ops. (line 85)
-* next statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 37)
+* next statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 36)
* next statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE.
(line 49)
* next statement, user-defined functions and: Next Statement. (line 45)
* nextfile statement: Nextfile Statement. (line 6)
* nextfile statement, BEGIN/END patterns and: I/O And BEGIN/END.
- (line 37)
+ (line 36)
* nextfile statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE.
(line 26)
* nextfile statement, user-defined functions and: Nextfile Statement.
@@ -33734,7 +33753,7 @@ Index
* tilde (~), ~ operator: Regexp Usage. (line 19)
* time functions: Time Functions. (line 6)
* time, alarm clock example program: Alarm Program. (line 11)
-* time, localization and: Explaining gettext. (line 116)
+* time, localization and: Explaining gettext. (line 112)
* time, managing: Getlocaltime Function.
(line 6)
* time, retrieving: Time Functions. (line 17)
@@ -33968,541 +33987,542 @@ Ref: Names-Footnote-153403
Node: This Manual53476
Ref: This Manual-Footnote-159255
Node: Conventions59355
-Node: Manual History61511
-Ref: Manual History-Footnote-164587
-Ref: Manual History-Footnote-264628
-Node: How To Contribute64702
-Node: Acknowledgments65941
-Node: Getting Started70689
-Node: Running gawk73123
-Node: One-shot74313
-Node: Read Terminal75538
-Ref: Read Terminal-Footnote-177501
-Node: Long77672
-Node: Executable Scripts79048
-Ref: Executable Scripts-Footnote-180881
-Ref: Executable Scripts-Footnote-280983
-Node: Comments81530
-Node: Quoting84003
-Node: DOS Quoting89316
-Node: Sample Data Files89991
-Node: Very Simple92545
-Node: Two Rules97318
-Node: More Complex99212
-Ref: More Complex-Footnote-1102144
-Node: Statements/Lines102229
-Ref: Statements/Lines-Footnote-1106685
-Node: Other Features106950
-Node: When107878
-Ref: When-Footnote-1109764
-Node: Intro Summary109829
-Node: Invoking Gawk110595
-Node: Command Line112110
-Node: Options112901
-Ref: Options-Footnote-1128699
-Node: Other Arguments128724
-Node: Naming Standard Input131386
-Node: Environment Variables132479
-Node: AWKPATH Variable133037
-Ref: AWKPATH Variable-Footnote-1135903
-Ref: AWKPATH Variable-Footnote-2135948
-Node: AWKLIBPATH Variable136208
-Node: Other Environment Variables136967
-Node: Exit Status140624
-Node: Include Files141299
-Node: Loading Shared Libraries144877
-Node: Obsolete146261
-Node: Undocumented146958
-Node: Invoking Summary147225
-Node: Regexp148825
-Node: Regexp Usage150275
-Node: Escape Sequences152308
-Node: Regexp Operators158139
-Ref: Regexp Operators-Footnote-1165619
-Ref: Regexp Operators-Footnote-2165766
-Node: Bracket Expressions165864
-Ref: table-char-classes167754
-Node: GNU Regexp Operators170694
-Node: Case-sensitivity174417
-Ref: Case-sensitivity-Footnote-1177309
-Ref: Case-sensitivity-Footnote-2177544
-Node: Leftmost Longest177652
-Node: Computed Regexps178853
-Node: Regexp Summary182225
-Node: Reading Files183694
-Node: Records185786
-Node: awk split records186529
-Node: gawk split records191387
-Ref: gawk split records-Footnote-1195908
-Node: Fields195945
-Ref: Fields-Footnote-1198909
-Node: Nonconstant Fields198995
-Ref: Nonconstant Fields-Footnote-1201225
-Node: Changing Fields201427
-Node: Field Separators207381
-Node: Default Field Splitting210083
-Node: Regexp Field Splitting211200
-Node: Single Character Fields214541
-Node: Command Line Field Separator215600
-Node: Full Line Fields219026
-Ref: Full Line Fields-Footnote-1219534
-Node: Field Splitting Summary219580
-Ref: Field Splitting Summary-Footnote-1222712
-Node: Constant Size222813
-Node: Splitting By Content227419
-Ref: Splitting By Content-Footnote-1231492
-Node: Multiple Line231532
-Ref: Multiple Line-Footnote-1237388
-Node: Getline237567
-Node: Plain Getline239783
-Node: Getline/Variable241878
-Node: Getline/File243025
-Node: Getline/Variable/File244409
-Ref: Getline/Variable/File-Footnote-1246008
-Node: Getline/Pipe246095
-Node: Getline/Variable/Pipe248794
-Node: Getline/Coprocess249901
-Node: Getline/Variable/Coprocess251153
-Node: Getline Notes251890
-Node: Getline Summary254694
-Ref: table-getline-variants255102
-Node: Read Timeout256014
-Ref: Read Timeout-Footnote-1259841
-Node: Command-line directories259899
-Node: Input Summary260803
-Node: Input Exercises263940
-Node: Printing264673
-Node: Print266395
-Node: Print Examples267736
-Node: Output Separators270515
-Node: OFMT272531
-Node: Printf273889
-Node: Basic Printf274795
-Node: Control Letters276334
-Node: Format Modifiers280325
-Node: Printf Examples286352
-Node: Redirection288816
-Node: Special Files295788
-Node: Special FD296321
-Ref: Special FD-Footnote-1299918
-Node: Special Network299992
-Node: Special Caveats300842
-Node: Close Files And Pipes301638
-Ref: Close Files And Pipes-Footnote-1308799
-Ref: Close Files And Pipes-Footnote-2308947
-Node: Output Summary309097
-Node: Output exercises310094
-Node: Expressions310774
-Node: Values311959
-Node: Constants312635
-Node: Scalar Constants313315
-Ref: Scalar Constants-Footnote-1314174
-Node: Nondecimal-numbers314424
-Node: Regexp Constants317424
-Node: Using Constant Regexps317899
-Node: Variables320971
-Node: Using Variables321626
-Node: Assignment Options323350
-Node: Conversion325225
-Node: Strings And Numbers325749
-Ref: Strings And Numbers-Footnote-1328811
-Node: Locale influences conversions328920
-Ref: table-locale-affects331637
-Node: All Operators332225
-Node: Arithmetic Ops332855
-Node: Concatenation335360
-Ref: Concatenation-Footnote-1338179
-Node: Assignment Ops338299
-Ref: table-assign-ops343282
-Node: Increment Ops344599
-Node: Truth Values and Conditions348037
-Node: Truth Values349120
-Node: Typing and Comparison350169
-Node: Variable Typing350962
-Node: Comparison Operators354614
-Ref: table-relational-ops355024
-Node: POSIX String Comparison358574
-Ref: POSIX String Comparison-Footnote-1359658
-Node: Boolean Ops359796
-Ref: Boolean Ops-Footnote-1363866
-Node: Conditional Exp363957
-Node: Function Calls365684
-Node: Precedence369564
-Node: Locales373233
-Node: Expressions Summary374864
-Node: Patterns and Actions377405
-Node: Pattern Overview378521
-Node: Regexp Patterns380198
-Node: Expression Patterns380741
-Node: Ranges384522
-Node: BEGIN/END387628
-Node: Using BEGIN/END388390
-Ref: Using BEGIN/END-Footnote-1391126
-Node: I/O And BEGIN/END391232
-Node: BEGINFILE/ENDFILE393517
-Node: Empty396448
-Node: Using Shell Variables396765
-Node: Action Overview399048
-Node: Statements401375
-Node: If Statement403223
-Node: While Statement404721
-Node: Do Statement406765
-Node: For Statement407921
-Node: Switch Statement411073
-Node: Break Statement413461
-Node: Continue Statement415516
-Node: Next Statement417355
-Node: Nextfile Statement419745
-Node: Exit Statement422400
-Node: Built-in Variables424804
-Node: User-modified425931
-Ref: User-modified-Footnote-1433620
-Node: Auto-set433682
-Ref: Auto-set-Footnote-1446264
-Ref: Auto-set-Footnote-2446469
-Node: ARGC and ARGV446525
-Node: Pattern Action Summary450429
-Node: Arrays452652
-Node: Array Basics454201
-Node: Array Intro455027
-Ref: figure-array-elements457000
-Node: Reference to Elements459407
-Node: Assigning Elements461786
-Node: Array Example462277
-Node: Scanning an Array464009
-Node: Controlling Scanning467024
-Ref: Controlling Scanning-Footnote-1472197
-Node: Delete472513
-Ref: Delete-Footnote-1475278
-Node: Numeric Array Subscripts475335
-Node: Uninitialized Subscripts477518
-Node: Multidimensional479143
-Node: Multiscanning482256
-Node: Arrays of Arrays483845
-Node: Arrays Summary488508
-Node: Functions490613
-Node: Built-in491486
-Node: Calling Built-in492564
-Node: Numeric Functions494552
-Ref: Numeric Functions-Footnote-1498586
-Ref: Numeric Functions-Footnote-2498943
-Ref: Numeric Functions-Footnote-3498991
-Node: String Functions499260
-Ref: String Functions-Footnote-1522271
-Ref: String Functions-Footnote-2522400
-Ref: String Functions-Footnote-3522648
-Node: Gory Details522735
-Ref: table-sub-escapes524522
-Ref: table-sub-proposed526042
-Ref: table-posix-sub527406
-Ref: table-gensub-escapes528946
-Ref: Gory Details-Footnote-1530122
-Node: I/O Functions530273
-Ref: I/O Functions-Footnote-1537396
-Node: Time Functions537543
-Ref: Time Functions-Footnote-1548007
-Ref: Time Functions-Footnote-2548075
-Ref: Time Functions-Footnote-3548233
-Ref: Time Functions-Footnote-4548344
-Ref: Time Functions-Footnote-5548456
-Ref: Time Functions-Footnote-6548683
-Node: Bitwise Functions548949
-Ref: table-bitwise-ops549511
-Ref: Bitwise Functions-Footnote-1553756
-Node: Type Functions553940
-Node: I18N Functions555082
-Node: User-defined556727
-Node: Definition Syntax557531
-Ref: Definition Syntax-Footnote-1562710
-Node: Function Example562779
-Ref: Function Example-Footnote-1565419
-Node: Function Caveats565441
-Node: Calling A Function565959
-Node: Variable Scope566914
-Node: Pass By Value/Reference569902
-Node: Return Statement573412
-Node: Dynamic Typing576396
-Node: Indirect Calls577325
-Node: Functions Summary587038
-Node: Library Functions589577
-Ref: Library Functions-Footnote-1593195
-Ref: Library Functions-Footnote-2593338
-Node: Library Names593509
-Ref: Library Names-Footnote-1596982
-Ref: Library Names-Footnote-2597202
-Node: General Functions597288
-Node: Strtonum Function598316
-Node: Assert Function601096
-Node: Round Function604422
-Node: Cliff Random Function605963
-Node: Ordinal Functions606979
-Ref: Ordinal Functions-Footnote-1610056
-Ref: Ordinal Functions-Footnote-2610308
-Node: Join Function610519
-Ref: Join Function-Footnote-1612290
-Node: Getlocaltime Function612490
-Node: Readfile Function616226
-Node: Data File Management618065
-Node: Filetrans Function618697
-Node: Rewind Function622766
-Node: File Checking624324
-Ref: File Checking-Footnote-1625456
-Node: Empty Files625657
-Node: Ignoring Assigns627636
-Node: Getopt Function629190
-Ref: Getopt Function-Footnote-1640493
-Node: Passwd Functions640696
-Ref: Passwd Functions-Footnote-1649675
-Node: Group Functions649763
-Ref: Group Functions-Footnote-1657704
-Node: Walking Arrays657917
-Node: Library Functions Summary659520
-Node: Library exercises660908
-Node: Sample Programs662188
-Node: Running Examples662958
-Node: Clones663686
-Node: Cut Program664910
-Node: Egrep Program674778
-Ref: Egrep Program-Footnote-1682749
-Node: Id Program682859
-Node: Split Program686523
-Ref: Split Program-Footnote-1690061
-Node: Tee Program690189
-Node: Uniq Program692996
-Node: Wc Program700426
-Ref: Wc Program-Footnote-1704691
-Node: Miscellaneous Programs704783
-Node: Dupword Program705996
-Node: Alarm Program708027
-Node: Translate Program712841
-Ref: Translate Program-Footnote-1717232
-Ref: Translate Program-Footnote-2717502
-Node: Labels Program717636
-Ref: Labels Program-Footnote-1721007
-Node: Word Sorting721091
-Node: History Sorting725134
-Node: Extract Program726970
-Node: Simple Sed734506
-Node: Igawk Program737568
-Ref: Igawk Program-Footnote-1751872
-Ref: Igawk Program-Footnote-2752073
-Node: Anagram Program752211
-Node: Signature Program755279
-Node: Programs Summary756526
-Node: Programs Exercises757741
-Node: Advanced Features761392
-Node: Nondecimal Data763340
-Node: Array Sorting764917
-Node: Controlling Array Traversal765614
-Node: Array Sorting Functions773894
-Ref: Array Sorting Functions-Footnote-1777801
-Node: Two-way I/O777995
-Ref: Two-way I/O-Footnote-1782939
-Ref: Two-way I/O-Footnote-2783118
-Node: TCP/IP Networking783200
-Node: Profiling786045
-Node: Advanced Features Summary793587
-Node: Internationalization795451
-Node: I18N and L10N796931
-Node: Explaining gettext797617
-Ref: Explaining gettext-Footnote-1802757
-Ref: Explaining gettext-Footnote-2802941
-Node: Programmer i18n803106
-Node: Translator i18n807331
-Node: String Extraction808125
-Ref: String Extraction-Footnote-1809086
-Node: Printf Ordering809172
-Ref: Printf Ordering-Footnote-1811954
-Node: I18N Portability812018
-Ref: I18N Portability-Footnote-1814467
-Node: I18N Example814530
-Ref: I18N Example-Footnote-1817252
-Node: Gawk I18N817324
-Node: I18N Summary817962
-Node: Debugger819301
-Node: Debugging820323
-Node: Debugging Concepts820764
-Node: Debugging Terms822620
-Node: Awk Debugging825217
-Node: Sample Debugging Session826109
-Node: Debugger Invocation826629
-Node: Finding The Bug827962
-Node: List of Debugger Commands834444
-Node: Breakpoint Control835776
-Node: Debugger Execution Control839440
-Node: Viewing And Changing Data842800
-Node: Execution Stack846158
-Node: Debugger Info847671
-Node: Miscellaneous Debugger Commands851665
-Node: Readline Support856849
-Node: Limitations857741
-Node: Debugging Summary860015
-Node: Arbitrary Precision Arithmetic861183
-Node: Computer Arithmetic862670
-Ref: Computer Arithmetic-Footnote-1867057
-Node: Math Definitions867114
-Ref: table-ieee-formats870403
-Ref: Math Definitions-Footnote-1870943
-Node: MPFR features871046
-Node: FP Math Caution872663
-Ref: FP Math Caution-Footnote-1873713
-Node: Inexactness of computations874082
-Node: Inexact representation875030
-Node: Comparing FP Values876385
-Node: Errors accumulate877349
-Node: Getting Accuracy878782
-Node: Try To Round881441
-Node: Setting precision882340
-Ref: table-predefined-precision-strings883022
-Node: Setting the rounding mode884815
-Ref: table-gawk-rounding-modes885179
-Ref: Setting the rounding mode-Footnote-1888633
-Node: Arbitrary Precision Integers888812
-Ref: Arbitrary Precision Integers-Footnote-1891793
-Node: POSIX Floating Point Problems891942
-Ref: POSIX Floating Point Problems-Footnote-1895818
-Node: Floating point summary895856
-Node: Dynamic Extensions898060
-Node: Extension Intro899612
-Node: Plugin License900877
-Node: Extension Mechanism Outline901562
-Ref: figure-load-extension901986
-Ref: figure-load-new-function903471
-Ref: figure-call-new-function904473
-Node: Extension API Description906457
-Node: Extension API Functions Introduction907907
-Node: General Data Types912774
-Ref: General Data Types-Footnote-1918467
-Node: Requesting Values918766
-Ref: table-value-types-returned919503
-Node: Memory Allocation Functions920461
-Ref: Memory Allocation Functions-Footnote-1923208
-Node: Constructor Functions923304
-Node: Registration Functions925062
-Node: Extension Functions925747
-Node: Exit Callback Functions928049
-Node: Extension Version String929297
-Node: Input Parsers929947
-Node: Output Wrappers939761
-Node: Two-way processors944277
-Node: Printing Messages946481
-Ref: Printing Messages-Footnote-1947558
-Node: Updating `ERRNO'947710
-Node: Accessing Parameters948449
-Node: Symbol Table Access949679
-Node: Symbol table by name950193
-Node: Symbol table by cookie952169
-Ref: Symbol table by cookie-Footnote-1956302
-Node: Cached values956365
-Ref: Cached values-Footnote-1959869
-Node: Array Manipulation959960
-Ref: Array Manipulation-Footnote-1961058
-Node: Array Data Types961097
-Ref: Array Data Types-Footnote-1963800
-Node: Array Functions963892
-Node: Flattening Arrays967766
-Node: Creating Arrays974618
-Node: Extension API Variables979349
-Node: Extension Versioning979985
-Node: Extension API Informational Variables981886
-Node: Extension API Boilerplate982972
-Node: Finding Extensions986776
-Node: Extension Example987336
-Node: Internal File Description988066
-Node: Internal File Ops992157
-Ref: Internal File Ops-Footnote-11003589
-Node: Using Internal File Ops1003729
-Ref: Using Internal File Ops-Footnote-11006076
-Node: Extension Samples1006344
-Node: Extension Sample File Functions1007868
-Node: Extension Sample Fnmatch1015436
-Node: Extension Sample Fork1016918
-Node: Extension Sample Inplace1018131
-Node: Extension Sample Ord1019806
-Node: Extension Sample Readdir1020642
-Ref: table-readdir-file-types1021498
-Node: Extension Sample Revout1022297
-Node: Extension Sample Rev2way1022888
-Node: Extension Sample Read write array1023629
-Node: Extension Sample Readfile1025508
-Node: Extension Sample API Tests1026608
-Node: Extension Sample Time1027133
-Node: gawkextlib1028448
-Node: Extension summary1031261
-Node: Extension Exercises1034954
-Node: Language History1035676
-Node: V7/SVR3.11037319
-Node: SVR41039639
-Node: POSIX1041081
-Node: BTL1042467
-Node: POSIX/GNU1043201
-Node: Feature History1048942
-Node: Common Extensions1062072
-Node: Ranges and Locales1063384
-Ref: Ranges and Locales-Footnote-11068001
-Ref: Ranges and Locales-Footnote-21068028
-Ref: Ranges and Locales-Footnote-31068262
-Node: Contributors1068483
-Node: History summary1073908
-Node: Installation1075277
-Node: Gawk Distribution1076228
-Node: Getting1076712
-Node: Extracting1077536
-Node: Distribution contents1079178
-Node: Unix Installation1084895
-Node: Quick Installation1085512
-Node: Additional Configuration Options1087954
-Node: Configuration Philosophy1089692
-Node: Non-Unix Installation1092043
-Node: PC Installation1092501
-Node: PC Binary Installation1093812
-Node: PC Compiling1095660
-Ref: PC Compiling-Footnote-11098659
-Node: PC Testing1098764
-Node: PC Using1099940
-Node: Cygwin1104092
-Node: MSYS1104901
-Node: VMS Installation1105415
-Node: VMS Compilation1106211
-Ref: VMS Compilation-Footnote-11107433
-Node: VMS Dynamic Extensions1107491
-Node: VMS Installation Details1108864
-Node: VMS Running1111116
-Node: VMS GNV1113950
-Node: VMS Old Gawk1114673
-Node: Bugs1115143
-Node: Other Versions1119147
-Node: Installation summary1125402
-Node: Notes1126458
-Node: Compatibility Mode1127323
-Node: Additions1128105
-Node: Accessing The Source1129030
-Node: Adding Code1130466
-Node: New Ports1136644
-Node: Derived Files1141125
-Ref: Derived Files-Footnote-11146206
-Ref: Derived Files-Footnote-21146240
-Ref: Derived Files-Footnote-31146836
-Node: Future Extensions1146950
-Node: Implementation Limitations1147556
-Node: Extension Design1148804
-Node: Old Extension Problems1149958
-Ref: Old Extension Problems-Footnote-11151475
-Node: Extension New Mechanism Goals1151532
-Ref: Extension New Mechanism Goals-Footnote-11154892
-Node: Extension Other Design Decisions1155081
-Node: Extension Future Growth1157187
-Node: Old Extension Mechanism1158023
-Node: Notes summary1159785
-Node: Basic Concepts1160971
-Node: Basic High Level1161652
-Ref: figure-general-flow1161924
-Ref: figure-process-flow1162523
-Ref: Basic High Level-Footnote-11165752
-Node: Basic Data Typing1165937
-Node: Glossary1169265
-Node: Copying1194417
-Node: GNU Free Documentation License1231973
-Node: Index1257109
+Node: Manual History61700
+Ref: Manual History-Footnote-164776
+Ref: Manual History-Footnote-264817
+Node: How To Contribute64891
+Node: Acknowledgments66130
+Node: Getting Started70878
+Node: Running gawk73312
+Node: One-shot74502
+Node: Read Terminal75727
+Ref: Read Terminal-Footnote-177690
+Node: Long77861
+Node: Executable Scripts79255
+Ref: Executable Scripts-Footnote-181088
+Ref: Executable Scripts-Footnote-281190
+Node: Comments81743
+Node: Quoting84216
+Node: DOS Quoting89529
+Node: Sample Data Files90204
+Node: Very Simple92758
+Node: Two Rules97531
+Node: More Complex99425
+Ref: More Complex-Footnote-1102357
+Node: Statements/Lines102442
+Ref: Statements/Lines-Footnote-1106898
+Node: Other Features107163
+Node: When108091
+Ref: When-Footnote-1109952
+Node: Intro Summary110017
+Node: Invoking Gawk110783
+Node: Command Line112298
+Node: Options113089
+Ref: Options-Footnote-1128865
+Node: Other Arguments128890
+Node: Naming Standard Input131552
+Node: Environment Variables132645
+Node: AWKPATH Variable133203
+Ref: AWKPATH Variable-Footnote-1136069
+Ref: AWKPATH Variable-Footnote-2136114
+Node: AWKLIBPATH Variable136374
+Node: Other Environment Variables137133
+Node: Exit Status140790
+Node: Include Files141465
+Node: Loading Shared Libraries145043
+Node: Obsolete146427
+Node: Undocumented147124
+Node: Invoking Summary147391
+Node: Regexp148991
+Node: Regexp Usage150441
+Node: Escape Sequences152474
+Node: Regexp Operators158291
+Ref: Regexp Operators-Footnote-1165771
+Ref: Regexp Operators-Footnote-2165918
+Node: Bracket Expressions166016
+Ref: table-char-classes167906
+Node: GNU Regexp Operators170846
+Node: Case-sensitivity174555
+Ref: Case-sensitivity-Footnote-1177447
+Ref: Case-sensitivity-Footnote-2177682
+Node: Leftmost Longest177790
+Node: Computed Regexps178991
+Node: Regexp Summary182363
+Node: Reading Files183832
+Node: Records185924
+Node: awk split records186667
+Node: gawk split records191525
+Ref: gawk split records-Footnote-1196046
+Node: Fields196083
+Ref: Fields-Footnote-1199047
+Node: Nonconstant Fields199133
+Ref: Nonconstant Fields-Footnote-1201363
+Node: Changing Fields201565
+Node: Field Separators207519
+Node: Default Field Splitting210221
+Node: Regexp Field Splitting211338
+Node: Single Character Fields214665
+Node: Command Line Field Separator215724
+Node: Full Line Fields219150
+Ref: Full Line Fields-Footnote-1219658
+Node: Field Splitting Summary219704
+Ref: Field Splitting Summary-Footnote-1222836
+Node: Constant Size222937
+Node: Splitting By Content227543
+Ref: Splitting By Content-Footnote-1231616
+Node: Multiple Line231656
+Ref: Multiple Line-Footnote-1237512
+Node: Getline237691
+Node: Plain Getline239907
+Node: Getline/Variable242002
+Node: Getline/File243149
+Node: Getline/Variable/File244533
+Ref: Getline/Variable/File-Footnote-1246132
+Node: Getline/Pipe246219
+Node: Getline/Variable/Pipe248905
+Node: Getline/Coprocess250012
+Node: Getline/Variable/Coprocess251264
+Node: Getline Notes252001
+Node: Getline Summary254805
+Ref: table-getline-variants255213
+Node: Read Timeout256125
+Ref: Read Timeout-Footnote-1259952
+Node: Command-line directories260010
+Node: Input Summary260914
+Node: Input Exercises264051
+Node: Printing264784
+Node: Print266506
+Node: Print Examples267999
+Node: Output Separators270778
+Node: OFMT272794
+Node: Printf274152
+Node: Basic Printf275058
+Node: Control Letters276597
+Node: Format Modifiers280588
+Node: Printf Examples286615
+Node: Redirection289079
+Node: Special Files296051
+Node: Special FD296584
+Ref: Special FD-Footnote-1300181
+Node: Special Network300255
+Node: Special Caveats301105
+Node: Close Files And Pipes301901
+Ref: Close Files And Pipes-Footnote-1309062
+Ref: Close Files And Pipes-Footnote-2309210
+Node: Output Summary309360
+Node: Output exercises310357
+Node: Expressions311037
+Node: Values312222
+Node: Constants312898
+Node: Scalar Constants313578
+Ref: Scalar Constants-Footnote-1314437
+Node: Nondecimal-numbers314687
+Node: Regexp Constants317687
+Node: Using Constant Regexps318162
+Node: Variables321234
+Node: Using Variables321889
+Node: Assignment Options323613
+Node: Conversion325488
+Node: Strings And Numbers326012
+Ref: Strings And Numbers-Footnote-1329074
+Node: Locale influences conversions329183
+Ref: table-locale-affects331900
+Node: All Operators332488
+Node: Arithmetic Ops333118
+Node: Concatenation335623
+Ref: Concatenation-Footnote-1338442
+Node: Assignment Ops338548
+Ref: table-assign-ops343531
+Node: Increment Ops344834
+Node: Truth Values and Conditions348272
+Node: Truth Values349355
+Node: Typing and Comparison350404
+Node: Variable Typing351197
+Node: Comparison Operators354849
+Ref: table-relational-ops355259
+Node: POSIX String Comparison358809
+Ref: POSIX String Comparison-Footnote-1359893
+Node: Boolean Ops360031
+Ref: Boolean Ops-Footnote-1364101
+Node: Conditional Exp364192
+Node: Function Calls365919
+Node: Precedence369799
+Node: Locales373468
+Node: Expressions Summary375099
+Node: Patterns and Actions377640
+Node: Pattern Overview378756
+Node: Regexp Patterns380433
+Node: Expression Patterns380976
+Node: Ranges384757
+Node: BEGIN/END387863
+Node: Using BEGIN/END388625
+Ref: Using BEGIN/END-Footnote-1391361
+Node: I/O And BEGIN/END391467
+Node: BEGINFILE/ENDFILE393738
+Node: Empty396669
+Node: Using Shell Variables396986
+Node: Action Overview399269
+Node: Statements401596
+Node: If Statement403444
+Node: While Statement404942
+Node: Do Statement406986
+Node: For Statement408142
+Node: Switch Statement411294
+Node: Break Statement413682
+Node: Continue Statement415723
+Node: Next Statement417548
+Node: Nextfile Statement419938
+Node: Exit Statement422574
+Node: Built-in Variables424978
+Node: User-modified426105
+Ref: User-modified-Footnote-1433794
+Node: Auto-set433856
+Ref: Auto-set-Footnote-1446438
+Ref: Auto-set-Footnote-2446643
+Node: ARGC and ARGV446699
+Node: Pattern Action Summary450603
+Node: Arrays452826
+Node: Array Basics454375
+Node: Array Intro455201
+Ref: figure-array-elements457174
+Node: Reference to Elements459581
+Node: Assigning Elements461960
+Node: Array Example462451
+Node: Scanning an Array464183
+Node: Controlling Scanning467184
+Ref: Controlling Scanning-Footnote-1472357
+Node: Delete472673
+Ref: Delete-Footnote-1475424
+Node: Numeric Array Subscripts475481
+Node: Uninitialized Subscripts477664
+Node: Multidimensional479289
+Node: Multiscanning482402
+Node: Arrays of Arrays483991
+Node: Arrays Summary488654
+Node: Functions490759
+Node: Built-in491632
+Node: Calling Built-in492710
+Node: Numeric Functions494698
+Ref: Numeric Functions-Footnote-1498732
+Ref: Numeric Functions-Footnote-2499089
+Ref: Numeric Functions-Footnote-3499137
+Node: String Functions499406
+Ref: String Functions-Footnote-1522403
+Ref: String Functions-Footnote-2522532
+Ref: String Functions-Footnote-3522780
+Node: Gory Details522867
+Ref: table-sub-escapes524640
+Ref: table-sub-proposed526160
+Ref: table-posix-sub527524
+Ref: table-gensub-escapes529064
+Ref: Gory Details-Footnote-1530240
+Node: I/O Functions530391
+Ref: I/O Functions-Footnote-1537501
+Node: Time Functions537648
+Ref: Time Functions-Footnote-1548112
+Ref: Time Functions-Footnote-2548180
+Ref: Time Functions-Footnote-3548338
+Ref: Time Functions-Footnote-4548449
+Ref: Time Functions-Footnote-5548561
+Ref: Time Functions-Footnote-6548788
+Node: Bitwise Functions549054
+Ref: table-bitwise-ops549616
+Ref: Bitwise Functions-Footnote-1553861
+Node: Type Functions554045
+Node: I18N Functions555187
+Node: User-defined556832
+Node: Definition Syntax557636
+Ref: Definition Syntax-Footnote-1562815
+Node: Function Example562884
+Ref: Function Example-Footnote-1565524
+Node: Function Caveats565546
+Node: Calling A Function566064
+Node: Variable Scope567019
+Node: Pass By Value/Reference570007
+Node: Return Statement573517
+Node: Dynamic Typing576501
+Node: Indirect Calls577430
+Node: Functions Summary587143
+Node: Library Functions589682
+Ref: Library Functions-Footnote-1593300
+Ref: Library Functions-Footnote-2593443
+Node: Library Names593614
+Ref: Library Names-Footnote-1597087
+Ref: Library Names-Footnote-2597307
+Node: General Functions597393
+Node: Strtonum Function598421
+Node: Assert Function601201
+Node: Round Function604527
+Node: Cliff Random Function606068
+Node: Ordinal Functions607084
+Ref: Ordinal Functions-Footnote-1610161
+Ref: Ordinal Functions-Footnote-2610413
+Node: Join Function610624
+Ref: Join Function-Footnote-1612395
+Node: Getlocaltime Function612595
+Node: Readfile Function616331
+Node: Data File Management618170
+Node: Filetrans Function618802
+Node: Rewind Function622871
+Node: File Checking624429
+Ref: File Checking-Footnote-1625561
+Node: Empty Files625762
+Node: Ignoring Assigns627741
+Node: Getopt Function629295
+Ref: Getopt Function-Footnote-1640598
+Node: Passwd Functions640801
+Ref: Passwd Functions-Footnote-1649780
+Node: Group Functions649868
+Ref: Group Functions-Footnote-1657809
+Node: Walking Arrays658022
+Node: Library Functions Summary659625
+Node: Library exercises661013
+Node: Sample Programs662293
+Node: Running Examples663063
+Node: Clones663791
+Node: Cut Program665015
+Node: Egrep Program674883
+Ref: Egrep Program-Footnote-1682854
+Node: Id Program682964
+Node: Split Program686628
+Ref: Split Program-Footnote-1690166
+Node: Tee Program690294
+Node: Uniq Program693101
+Node: Wc Program700531
+Ref: Wc Program-Footnote-1704796
+Node: Miscellaneous Programs704888
+Node: Dupword Program706101
+Node: Alarm Program708132
+Node: Translate Program712946
+Ref: Translate Program-Footnote-1717337
+Ref: Translate Program-Footnote-2717607
+Node: Labels Program717741
+Ref: Labels Program-Footnote-1721112
+Node: Word Sorting721196
+Node: History Sorting725239
+Node: Extract Program727075
+Node: Simple Sed734611
+Node: Igawk Program737673
+Ref: Igawk Program-Footnote-1751977
+Ref: Igawk Program-Footnote-2752178
+Node: Anagram Program752316
+Node: Signature Program755384
+Node: Programs Summary756631
+Node: Programs Exercises757846
+Node: Advanced Features761497
+Node: Nondecimal Data763445
+Node: Array Sorting765022
+Node: Controlling Array Traversal765719
+Node: Array Sorting Functions773999
+Ref: Array Sorting Functions-Footnote-1777906
+Node: Two-way I/O778100
+Ref: Two-way I/O-Footnote-1783044
+Ref: Two-way I/O-Footnote-2783223
+Node: TCP/IP Networking783305
+Node: Profiling786150
+Node: Advanced Features Summary793692
+Node: Internationalization795556
+Node: I18N and L10N797036
+Node: Explaining gettext797722
+Ref: Explaining gettext-Footnote-1802748
+Ref: Explaining gettext-Footnote-2802932
+Node: Programmer i18n803097
+Ref: Programmer i18n-Footnote-1807891
+Node: Translator i18n807940
+Node: String Extraction808734
+Ref: String Extraction-Footnote-1809867
+Node: Printf Ordering809953
+Ref: Printf Ordering-Footnote-1812735
+Node: I18N Portability812799
+Ref: I18N Portability-Footnote-1815248
+Node: I18N Example815311
+Ref: I18N Example-Footnote-1818017
+Node: Gawk I18N818089
+Node: I18N Summary818727
+Node: Debugger820066
+Node: Debugging821088
+Node: Debugging Concepts821529
+Node: Debugging Terms823385
+Node: Awk Debugging825982
+Node: Sample Debugging Session826874
+Node: Debugger Invocation827394
+Node: Finding The Bug828727
+Node: List of Debugger Commands835209
+Node: Breakpoint Control836541
+Node: Debugger Execution Control840205
+Node: Viewing And Changing Data843565
+Node: Execution Stack846923
+Node: Debugger Info848436
+Node: Miscellaneous Debugger Commands852430
+Node: Readline Support857614
+Node: Limitations858506
+Node: Debugging Summary860780
+Node: Arbitrary Precision Arithmetic861948
+Node: Computer Arithmetic863435
+Ref: Computer Arithmetic-Footnote-1867822
+Node: Math Definitions867879
+Ref: table-ieee-formats871168
+Ref: Math Definitions-Footnote-1871708
+Node: MPFR features871811
+Node: FP Math Caution873428
+Ref: FP Math Caution-Footnote-1874478
+Node: Inexactness of computations874847
+Node: Inexact representation875795
+Node: Comparing FP Values877150
+Node: Errors accumulate878114
+Node: Getting Accuracy879547
+Node: Try To Round882206
+Node: Setting precision883105
+Ref: table-predefined-precision-strings883787
+Node: Setting the rounding mode885580
+Ref: table-gawk-rounding-modes885944
+Ref: Setting the rounding mode-Footnote-1889398
+Node: Arbitrary Precision Integers889577
+Ref: Arbitrary Precision Integers-Footnote-1892558
+Node: POSIX Floating Point Problems892707
+Ref: POSIX Floating Point Problems-Footnote-1896583
+Node: Floating point summary896621
+Node: Dynamic Extensions898825
+Node: Extension Intro900377
+Node: Plugin License901642
+Node: Extension Mechanism Outline902327
+Ref: figure-load-extension902751
+Ref: figure-load-new-function904236
+Ref: figure-call-new-function905238
+Node: Extension API Description907222
+Node: Extension API Functions Introduction908672
+Node: General Data Types913539
+Ref: General Data Types-Footnote-1919232
+Node: Requesting Values919531
+Ref: table-value-types-returned920268
+Node: Memory Allocation Functions921226
+Ref: Memory Allocation Functions-Footnote-1923973
+Node: Constructor Functions924069
+Node: Registration Functions925827
+Node: Extension Functions926512
+Node: Exit Callback Functions928814
+Node: Extension Version String930062
+Node: Input Parsers930712
+Node: Output Wrappers940526
+Node: Two-way processors945042
+Node: Printing Messages947246
+Ref: Printing Messages-Footnote-1948323
+Node: Updating `ERRNO'948475
+Node: Accessing Parameters949214
+Node: Symbol Table Access950444
+Node: Symbol table by name950958
+Node: Symbol table by cookie952934
+Ref: Symbol table by cookie-Footnote-1957067
+Node: Cached values957130
+Ref: Cached values-Footnote-1960634
+Node: Array Manipulation960725
+Ref: Array Manipulation-Footnote-1961823
+Node: Array Data Types961862
+Ref: Array Data Types-Footnote-1964565
+Node: Array Functions964657
+Node: Flattening Arrays968531
+Node: Creating Arrays975383
+Node: Extension API Variables980114
+Node: Extension Versioning980750
+Node: Extension API Informational Variables982651
+Node: Extension API Boilerplate983737
+Node: Finding Extensions987541
+Node: Extension Example988101
+Node: Internal File Description988831
+Node: Internal File Ops992922
+Ref: Internal File Ops-Footnote-11004354
+Node: Using Internal File Ops1004494
+Ref: Using Internal File Ops-Footnote-11006841
+Node: Extension Samples1007109
+Node: Extension Sample File Functions1008633
+Node: Extension Sample Fnmatch1016201
+Node: Extension Sample Fork1017683
+Node: Extension Sample Inplace1018896
+Node: Extension Sample Ord1020571
+Node: Extension Sample Readdir1021407
+Ref: table-readdir-file-types1022263
+Node: Extension Sample Revout1023062
+Node: Extension Sample Rev2way1023653
+Node: Extension Sample Read write array1024394
+Node: Extension Sample Readfile1026273
+Node: Extension Sample API Tests1027373
+Node: Extension Sample Time1027898
+Node: gawkextlib1029213
+Node: Extension summary1032026
+Node: Extension Exercises1035719
+Node: Language History1036441
+Node: V7/SVR3.11038084
+Node: SVR41040404
+Node: POSIX1041846
+Node: BTL1043232
+Node: POSIX/GNU1043966
+Node: Feature History1049682
+Node: Common Extensions1062773
+Node: Ranges and Locales1064085
+Ref: Ranges and Locales-Footnote-11068702
+Ref: Ranges and Locales-Footnote-21068729
+Ref: Ranges and Locales-Footnote-31068963
+Node: Contributors1069184
+Node: History summary1074609
+Node: Installation1075978
+Node: Gawk Distribution1076929
+Node: Getting1077413
+Node: Extracting1078237
+Node: Distribution contents1079879
+Node: Unix Installation1085596
+Node: Quick Installation1086213
+Node: Additional Configuration Options1088655
+Node: Configuration Philosophy1090393
+Node: Non-Unix Installation1092744
+Node: PC Installation1093202
+Node: PC Binary Installation1094513
+Node: PC Compiling1096361
+Ref: PC Compiling-Footnote-11099360
+Node: PC Testing1099465
+Node: PC Using1100641
+Node: Cygwin1104793
+Node: MSYS1105602
+Node: VMS Installation1106116
+Node: VMS Compilation1106912
+Ref: VMS Compilation-Footnote-11108134
+Node: VMS Dynamic Extensions1108192
+Node: VMS Installation Details1109565
+Node: VMS Running1111817
+Node: VMS GNV1114651
+Node: VMS Old Gawk1115374
+Node: Bugs1115844
+Node: Other Versions1119848
+Node: Installation summary1126075
+Node: Notes1127131
+Node: Compatibility Mode1127996
+Node: Additions1128778
+Node: Accessing The Source1129703
+Node: Adding Code1131139
+Node: New Ports1137317
+Node: Derived Files1141798
+Ref: Derived Files-Footnote-11146879
+Ref: Derived Files-Footnote-21146913
+Ref: Derived Files-Footnote-31147509
+Node: Future Extensions1147623
+Node: Implementation Limitations1148229
+Node: Extension Design1149477
+Node: Old Extension Problems1150631
+Ref: Old Extension Problems-Footnote-11152148
+Node: Extension New Mechanism Goals1152205
+Ref: Extension New Mechanism Goals-Footnote-11155565
+Node: Extension Other Design Decisions1155754
+Node: Extension Future Growth1157860
+Node: Old Extension Mechanism1158696
+Node: Notes summary1160458
+Node: Basic Concepts1161644
+Node: Basic High Level1162325
+Ref: figure-general-flow1162597
+Ref: figure-process-flow1163196
+Ref: Basic High Level-Footnote-11166425
+Node: Basic Data Typing1166610
+Node: Glossary1169938
+Node: Copying1195090
+Node: GNU Free Documentation License1232646
+Node: Index1257782

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 696e2a38..86a0c4c2 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
@@ -5016,7 +5029,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.)
@@ -5059,7 +5072,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.)
@@ -5682,7 +5695,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.
@@ -7040,7 +7053,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:
@@ -8219,7 +8232,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.)
@@ -8733,6 +8746,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
@@ -11089,7 +11106,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:
@@ -11432,7 +11449,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
@@ -11478,7 +11495,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
@@ -13178,7 +13195,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}
@@ -13922,7 +13939,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
@@ -13989,7 +14006,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
@@ -14118,7 +14135,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
@@ -15741,7 +15758,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}
@@ -15986,7 +16003,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
@@ -17439,7 +17456,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.
@@ -17531,7 +17548,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"}.
@@ -17905,7 +17922,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.
@@ -27765,7 +27782,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:]]/}
@@ -27786,11 +27812,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
@@ -27925,18 +27946,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}
@@ -28016,6 +28052,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}.
@@ -28306,8 +28345,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:
@@ -35201,8 +35239,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
@@ -35522,7 +35559,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}).
@@ -35537,7 +35574,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}.
@@ -35779,7 +35816,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}).
@@ -37874,7 +37911,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
@@ -37937,8 +37974,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 43c4976c..9eccea7b 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
@@ -4939,7 +4952,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.)
@@ -5527,7 +5540,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.
@@ -6754,7 +6767,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:
@@ -7838,7 +7851,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.)
@@ -8352,6 +8365,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
@@ -10550,7 +10567,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:
@@ -10888,7 +10905,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
@@ -12529,7 +12546,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}
@@ -13273,7 +13290,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
@@ -13340,7 +13357,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
@@ -13469,7 +13486,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
@@ -15046,7 +15063,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}
@@ -15291,7 +15308,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
@@ -16744,7 +16761,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.
@@ -16836,7 +16853,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"}.
@@ -17177,7 +17194,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.
@@ -26880,7 +26897,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:]]/}
@@ -26901,11 +26927,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
@@ -27040,18 +27061,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}
@@ -27131,6 +27167,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}.
@@ -27421,8 +27460,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:
@@ -34316,8 +34354,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
@@ -34637,7 +34674,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}).
@@ -34652,7 +34689,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}.
@@ -34894,7 +34931,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}).
@@ -36989,7 +37026,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
@@ -37052,8 +37089,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