aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawk.info
diff options
context:
space:
mode:
Diffstat (limited to 'doc/gawk.info')
-rw-r--r--doc/gawk.info3493
1 files changed, 3305 insertions, 188 deletions
diff --git a/doc/gawk.info b/doc/gawk.info
index ec16647a..65ae1509 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -169,11 +169,17 @@ in (a) below. A copy of the license is included in the section entitled
* Regexp Usage:: How to Use Regular Expressions.
* Escape Sequences:: How to write nonprinting characters.
* Regexp Operators:: Regular Expression Operators.
+<<<<<<< HEAD
* Bracket Expressions:: What can go between '[...]'.
* GNU Regexp Operators:: Operators specific to GNU software.
* Case-sensitivity:: How to do case-insensitive matching.
+=======
+* Bracket Expressions:: What can go between `[...]'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Leftmost Longest:: How much text matches.
* Computed Regexps:: Using Dynamic Regexps.
+* GNU Regexp Operators:: Operators specific to GNU software.
+* Case-sensitivity:: How to do case-insensitive matching.
* Regexp Summary:: Regular expressions summary.
* Records:: Controlling how data is split into
records.
@@ -189,8 +195,13 @@ in (a) below. A copy of the license is included in the section entitled
* Regexp Field Splitting:: Using regexps as the field separator.
* Single Character Fields:: Making each character a separate
field.
+<<<<<<< HEAD
* Command Line Field Separator:: Setting 'FS' from the
command-line.
+=======
+* Command Line Field Separator:: Setting `FS' from the
+ command line.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Full Line Fields:: Making the full line be a single
field.
* Field Splitting Summary:: Some final points and a summary table.
@@ -216,7 +227,7 @@ in (a) below. A copy of the license is included in the section entitled
'getline'.
* Getline Summary:: Summary of 'getline' Variants.
* Read Timeout:: Reading input with a timeout.
-* Command line directories:: What happens if you put a directory on
+* Command-line directories:: What happens if you put a directory on
the command line.
* Input Summary:: Input summary.
* Input Exercises:: Exercises.
@@ -244,7 +255,7 @@ in (a) below. A copy of the license is included in the section entitled
* Close Files And Pipes:: Closing Input and Output Files and
Pipes.
* Output Summary:: Output summary.
-* Output exercises:: Exercises.
+* Output Exercises:: Exercises.
* Values:: Constants, Variables, and Regular
Expressions.
* Constants:: String, numeric and regexp constants.
@@ -255,7 +266,7 @@ in (a) below. A copy of the license is included in the section entitled
* Variables:: Variables give names to values for
later use.
* Using Variables:: Using variables in your programs.
-* Assignment Options:: Setting variables on the command-line
+* Assignment Options:: Setting variables on the command line
and a summary of command-line syntax.
This is an advanced method of input.
* Conversion:: The conversion of strings to numbers
@@ -431,7 +442,7 @@ in (a) below. A copy of the license is included in the section entitled
information.
* Walking Arrays:: A function to walk arrays of arrays.
* Library Functions Summary:: Summary of library functions.
-* Library exercises:: Exercises.
+* Library Exercises:: Exercises.
* Running Examples:: How to run these examples.
* Clones:: Clones of common utilities.
* Cut Program:: The 'cut' utility.
@@ -770,6 +781,7 @@ Preface
Several kinds of tasks occur repeatedly when working with text files.
You might want to extract certain lines and discard the rest. Or you
may need to make changes wherever certain patterns appear, but leave the
+<<<<<<< HEAD
rest of the file alone. Writing single-use programs for these tasks in
languages such as C, C++, or Java is time-consuming and inconvenient.
Such jobs are often easier with 'awk'. The 'awk' utility interprets a
@@ -777,6 +789,13 @@ special-purpose programming language that makes it easy to handle simple
data-reformatting jobs.
The GNU implementation of 'awk' is called 'gawk'; if you invoke it
+=======
+rest of the file alone. Such jobs are often easy with `awk'. The
+`awk' utility interprets a special-purpose programming language that
+makes it easy to handle simple data-reformatting jobs.
+
+ The GNU implementation of `awk' is called `gawk'; if you invoke it
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
with the proper options or environment variables (*note Options::), it
is fully compatible with the POSIX(1) specification of the 'awk'
language and with the Unix version of 'awk' maintained by Brian
@@ -816,12 +835,21 @@ such as input/output (I/O) redirection and pipes.
Implementations of the 'awk' language are available for many
different computing environments. This Info file, while describing the
+<<<<<<< HEAD
'awk' language in general, also describes the particular implementation
of 'awk' called 'gawk' (which stands for "GNU 'awk'"). 'gawk' runs on a
broad range of Unix systems, ranging from Intel(R)-architecture PC-based
computers up through large-scale systems. 'gawk' has also been ported
to Mac OS X, Microsoft Windows (all versions) and OS/2 PCs, and OpenVMS.
(Some other, obsolete systems to which 'gawk' was once ported are no
+=======
+`awk' language in general, also describes the particular implementation
+of `awk' called `gawk' (which stands for "GNU `awk'"). `gawk' runs on
+a broad range of Unix systems, ranging from Intel-architecture PC-based
+computers up through large-scale systems. `gawk' has also been ported
+to Mac OS X, Microsoft Windows (all versions) and OS/2 PCs, and OpenVMS.
+(Some other, obsolete systems to which `gawk' was once ported are no
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
longer supported and the code for those systems has been removed.)
* Menu:
@@ -839,7 +867,12 @@ longer supported and the code for those systems has been removed.)
---------- Footnotes ----------
+<<<<<<< HEAD
(1) The 2008 POSIX standard is accessable online at <http://www.opengroup.org/onlinepubs/9699919799/>.
+=======
+ (1) The 2008 POSIX standard is accessible online at
+`http://www.opengroup.org/onlinepubs/9699919799/'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(2) These commands are available on POSIX-compliant systems, as well
as on traditional Unix-based systems. If you are using some other
@@ -878,11 +911,19 @@ designers provided feedback for the POSIX specification.
Paul Rubin wrote the GNU implementation, 'gawk', in 1986. Jay
Fenlason completed it, with advice from Richard Stallman. John Woods
+<<<<<<< HEAD
contributed parts of the code as well. In 1988 and 1989, David Trueman,
with help from me, thoroughly reworked 'gawk' for compatibility with the
newer 'awk'. Circa 1994, I became the primary maintainer. Current
development focuses on bug fixes, performance improvements, standards
compliance, and occasionally, new features.
+=======
+contributed parts of the code as well. In 1988 and 1989, David
+Trueman, with help from me, thoroughly reworked `gawk' for compatibility
+with the newer `awk'. Circa 1994, I became the primary maintainer.
+Current development focuses on bug fixes, performance improvements,
+standards compliance and, occasionally, new features.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
In May of 1997, Ju"rgen Kahrs felt the need for network access from
'awk', and with a little help from me, set about adding features to do
@@ -906,6 +947,7 @@ A Rose by Any Other Name
The 'awk' language has evolved over the years. Full details are
provided in *note Language History::. The language described in this
+<<<<<<< HEAD
Info file is often referred to as "new 'awk'" ('nawk').
For some time after new 'awk' was introduced, there were systems with
@@ -923,6 +965,21 @@ systems.) All other modern systems use some version of new 'awk'.(1)
system, which is what you should use when running your programs. (Of
course, if you're reading this Info file, chances are good that you have
'gawk'!)
+=======
+Info file is often referred to as "new `awk'". By analogy, the
+original version of `awk' is referred to as "old `awk'."
+
+ Today, on most systems, when you run the `awk' utility, you get some
+version of new `awk'.(1) If your system's standard `awk' is the old
+one, you will see something like this if you try the test program:
+
+ $ awk 1 /dev/null
+ error--> awk: syntax error near line 1
+ error--> awk: bailing out near line 1
+
+In this case, you should find a version of new `awk', or just install
+`gawk'!
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Throughout this Info file, whenever we refer to a language feature
that should be available in any complete implementation of POSIX 'awk',
@@ -931,7 +988,13 @@ specific to the GNU implementation, we use the term 'gawk'.
---------- Footnotes ----------
+<<<<<<< HEAD
(1) Many of these systems use 'gawk' for their 'awk' implementation!
+=======
+ (1) Only Solaris systems still use an old `awk' for the default
+`awk' utility. A more modern `awk' lives in `/usr/xpg6/bin' on these
+systems.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: This Manual, Next: Conventions, Prev: Names, Up: Preface
@@ -1084,12 +1147,21 @@ language. A single Texinfo source file is used to produce both the
printed and online versions of the documentation. This minor node
briefly documents the typographical conventions used in Texinfo.
+<<<<<<< HEAD
Examples you would type at the command-line are preceded by the
common shell primary and secondary prompts, '$' and '>'. Input that you
type is shown 'like this'. Output from the command is preceded by the
glyph "-|". This typically represents the command's standard output.
Error messages, and other output on the command's standard error, are
preceded by the glyph "error->". For example:
+=======
+ Examples you would type at the command line are preceded by the
+common shell primary and secondary prompts, `$' and `>'. Input that
+you type is shown `like this'. Output from the command is preceded by
+the glyph "-|". This typically represents the command's standard
+output. Error messages, and other output on the command's standard
+error, are preceded by the glyph "error-->". For example:
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
$ echo hi on stdout
-| hi on stdout
@@ -1103,6 +1175,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
------------
@@ -1153,6 +1229,7 @@ released but remains in an early stage of development.
Until the GNU operating system is more fully developed, you should
consider using GNU/Linux, a freely distributable, Unix-like operating
+<<<<<<< HEAD
system for Intel(R), Power Architecture, Sun SPARC, IBM S/390, and other
systems.(2) Many GNU/Linux distributions are available for download
from the Internet.
@@ -1164,6 +1241,12 @@ use recent versions of 'gawk' for their versions of 'awk'. NetBSD
(http://www.openbsd.org) are three of the most popular ones, but there
are others.)
+=======
+system for Intel, Power Architecture, Sun SPARC, IBM S/390, and other
+systems.(2) Many GNU/Linux distributions are available for download
+from the Internet.
+
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
The Info file itself has gone through a number of previous editions.
Paul Rubin wrote the very first draft of 'The GAWK Manual'; it was
around 40 pages in size. Diane Close and Richard Stallman improved it,
@@ -1298,16 +1381,30 @@ a pleasure working with this team of fine people.
Notable code and documentation contributions were made by a number of
people. *Note Contributors::, for the full list.
+<<<<<<< HEAD
Thanks to Patrice Dumas for the new 'makeinfo' program. Thanks to
+=======
+ Thanks to Patrice Dumas for the new `makeinfo' program. Thanks to
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Karl Berry who continues to work to keep the Texinfo markup language
sane.
+ Robert P.J. Day, Michael Brennan and Brian Kernighan kindly acted as
+reviewers for the 2015 edition of this Info file. Their feedback helped
+improve the final work.
+
I would like to thank Brian Kernighan for invaluable assistance
during the testing and debugging of 'gawk', and for ongoing help and
advice in clarifying numerous points about the language. We could not
have done nearly as good a job on either 'gawk' or its documentation
without his help.
+ Brian is in a class by himself as a programmer and technical author.
+I have to thank him (yet again) for his ongoing friendship and the role
+model he has been for me for close to 30 years! Having him as a
+reviewer is an exciting privilege. It has also been extremely
+humbling...
+
I must thank my wonderful wife, Miriam, for her patience through the
many versions of this project, for her proofreading, and for sharing me
with the computer. I would like to thank my parents for their love, and
@@ -1449,17 +1546,38 @@ end-of-file character may be different. For example, on OS/2, it is
'Ctrl-z'.)
As an example, the following program prints a friendly piece of
+<<<<<<< HEAD
advice (from Douglas Adams's 'The Hitchhiker's Guide to the Galaxy'), to
keep you from worrying about the complexities of computer programming(1)
('BEGIN' is a feature we haven't discussed yet):
+=======
+advice (from Douglas Adams's `The Hitchhiker's Guide to the Galaxy'),
+to keep you from worrying about the complexities of computer
+programming:
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
- $ awk "BEGIN { print \"Don't Panic!\" }"
+ $ awk "BEGIN { print "Don\47t Panic!" }"
-| Don't Panic!
+<<<<<<< HEAD
This program does not read any input. The '\' before each of the
inner double quotes is necessary because of the shell's quoting
rules--in particular because it mixes both single quotes and double
quotes.(2)
+=======
+ `awk' executes statements associated with `BEGIN' before reading any
+input. If there are no other statements in your program, as is the
+case here, `awk' just stops, instead of trying to read input it doesn't
+know how to process. The `\47' is a magic way of getting a single
+quote into the program, without having to engage in ugly shell quoting
+tricks.
+
+ NOTE: As a side note, if you use Bash as your shell, you should
+ execute the command `set +H' before running this program
+ interactively, to disable the C shell-style command history, which
+ treats `!' as a special character. We recommend putting this
+ command into your personal startup file.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
This next simple 'awk' program emulates the 'cat' utility; it copies
whatever you type on the keyboard to its standard output (why this works
@@ -1476,6 +1594,7 @@ is explained shortly).
-| What, me worry?
Ctrl-d
+<<<<<<< HEAD
---------- Footnotes ----------
(1) If you use Bash as your shell, you should execute the command
@@ -1487,6 +1606,8 @@ We recommend putting this command into your personal startup file.
the program text, double quotes are needed here in order to put the
single quote into the message.
+=======
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Long, Next: Executable Scripts, Prev: Read Terminal, Up: Running gawk
@@ -1499,9 +1620,15 @@ tell 'awk' to use that file for its program, you type:
awk -f SOURCE-FILE INPUT-FILE1 INPUT-FILE2 ...
+<<<<<<< HEAD
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 `-f' instructs the `awk' utility to get the `awk' program from
+the file SOURCE-FILE (*note Options::). Any file name can be used for
+SOURCE-FILE. For example, you could put the program:
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
BEGIN { print "Don't Panic!" }
@@ -1539,9 +1666,15 @@ like this:
BEGIN { print "Don't Panic!" }
+<<<<<<< HEAD
After making this file executable (with the 'chmod' utility), simply
type 'advice' at the shell and the system arranges to run 'awk'(2) as if
you had typed 'awk -f advice':
+=======
+After making this file executable (with the `chmod' utility), simply
+type `advice' at the shell and the system arranges to run `awk' as if
+you had typed `awk -f advice':
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
$ chmod +x advice
$ advice
@@ -1555,7 +1688,28 @@ at the shell.)
program that users can invoke without their having to know that the
program is written in 'awk'.
+<<<<<<< HEAD
Portability Issues with '#!'
+=======
+ Understanding `#!'
+
+ `awk' is an "interpreted" language. This means that the `awk'
+utility reads your program and then processes your data according to
+the instructions in your program. (This is different from a "compiled"
+language such as C, where your program is first compiled into machine
+code that is executed directly by your system's hardware.) The `awk'
+utility is thus termed an "interpreter". Many modern languages are
+interperted.
+
+ The line beginning with `#!' lists the full file name of an
+interpreter to run and a single optional initial command-line argument
+to pass to that interpreter. The operating system then runs the
+interpreter with the given argument and the full argument list of the
+executed program. The first argument in the list is the full file name
+of the `awk' program. The rest of the argument list contains either
+options to `awk', or data files, or both. Note that on many systems
+`awk' may be found in `/usr/bin' instead of in `/bin'. Caveat Emptor.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Some systems limit the length of the interpreter name to 32
characters. Often, this can be dealt with by using a symbolic link.
@@ -1577,6 +1731,7 @@ the name of your script ('advice'). (d.c.) Don't rely on the value of
(1) The '#!' mechanism works on GNU/Linux systems, BSD-based systems
and commercial Unix systems.
+<<<<<<< HEAD
(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
@@ -1586,6 +1741,8 @@ program. The first argument in the list is the full file name of the
'awk', or data files, or both. Note that on many systems 'awk' may be
found in '/usr/bin' instead of in '/bin'. Caveat Emptor.
+=======
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Comments, Next: Quoting, Prev: Executable Scripts, Up: Running gawk
@@ -1713,9 +1870,15 @@ the quoting rules.
Note that the single quote is not special within double quotes.
* Null strings are removed when they occur as part of a non-null
+<<<<<<< HEAD
command-line argument, while explicit non-null objects are kept.
For example, to specify that the field separator 'FS' should be set
to the null string, use:
+=======
+ command-line argument, while explicit null objects are kept. For
+ example, to specify that the field separator `FS' should be set to
+ the null string, use:
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
awk -F "" 'PROGRAM' FILES # correct
@@ -1808,10 +1971,17 @@ one "record".
In the data file 'mail-list', each record contains the name of a
person, his/her phone number, his/her email-address, and a code for
+<<<<<<< HEAD
their relationship with the author of the list. An 'A' in the last
column means that the person is an acquaintance. An 'F' in the last
column means that the person is a friend. An 'R' means that the person
is a relative:
+=======
+their relationship with the author of the list. The columns are
+aligned using spaces. An `A' in the last column means that the person
+is an acquaintance. An `F' in the last column means that the person is
+a friend. An `R' means that the person is a relative:
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Amelia 555-5553 amelia.zodiacusque@gmail.com F
Anthony 555-3412 anthony.asserturo@hotmail.com A
@@ -1830,7 +2000,8 @@ shipments during the year. Each record contains the month, the number
of green crates shipped, the number of red boxes shipped, the number of
orange bags shipped, and the number of blue packages shipped,
respectively. There are 16 entries, covering the 12 months of last year
-and the first four months of the current year.
+and the first four months of the current year. An empty line separates
+the data for the two years.
Jan 13 25 15 115
Feb 15 32 24 226
@@ -1910,11 +2081,6 @@ often more than one way to do things in 'awk'. At some point, you may
want to look back at these examples and see if you can come up with
different ways to do the same things shown here:
- * Print the length of the longest input line:
-
- awk '{ if (length($0) > max) max = length($0) }
- END { print max }' data
-
* Print every line that is longer than 80 characters:
awk 'length($0) > 80' data
@@ -1922,14 +2088,33 @@ different ways to do the same things shown here:
The sole rule has a relational expression as its pattern and it has
no action--so it uses the default action, printing the record.
+<<<<<<< HEAD
* Print the length of the longest line in 'data':
+=======
+ * Print the length of the longest input line:
- expand data | awk '{ if (x < length()) x = length() }
+ awk '{ if (length($0) > max) max = length($0) }
+ END { print max }' data
+
+ The code associated with `END' executes after all input has been
+ read; it's the other side of the coin to `BEGIN'.
+
+ * Print the length of the longest line in `data':
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
+
+ expand data | awk '{ if (x < length($0)) x = length($0) }
END { print "maximum line length is " x }'
+<<<<<<< HEAD
The input is processed by the 'expand' utility to change TABs into
spaces, so the widths compared are actually the right-margin
columns.
+=======
+ This example differs slightly from the previous one: The input is
+ processed by the `expand' utility to change TABs into spaces, so
+ the widths compared are actually the right-margin columns, as
+ opposed to the number of input characters on each line.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Print every line that has at least one field:
@@ -2026,8 +2211,8 @@ summarize, select, and rearrange the output of another utility. It uses
features that haven't been covered yet, so don't worry if you don't
understand all the details:
- LC_ALL=C ls -l | awk '$6 == "Nov" { sum += $5 }
- END { print sum }'
+ ls -l | awk '$6 == "Nov" { sum += $5 }
+ END { print sum }'
This command prints the total number of bytes in all the files in the
current directory that were last modified in November (of any year).
@@ -2204,9 +2389,15 @@ built-in functions for working with timestamps, performing bit
manipulation, for runtime string translation (internationalization),
determining the type of a variable, and array sorting.
+<<<<<<< HEAD
As we develop our presentation of the 'awk' language, we introduce
most of the variables and many of the functions. They are described
systematically in *note Built-in Variables::, and *note Built-in::.
+=======
+ As we develop our presentation of the `awk' language, we introduce
+most of the variables and many of the functions. They are described
+systematically in *note Built-in Variables::, and in *note Built-in::.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: When, Next: Intro Summary, Prev: Other Features, Up: Getting Started
@@ -2232,14 +2423,20 @@ edit-compile-test-debug cycle of software development.
Complex programs have been written in 'awk', including a complete
retargetable assembler for eight-bit microprocessors (*note Glossary::,
for more information), and a microcode assembler for a special-purpose
+<<<<<<< HEAD
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.
+=======
+Prolog computer. While the original `awk''s capabilities were strained
+by tasks of such complexity, modern versions are more capable.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
If you find yourself writing 'awk' scripts of more than, say, a few
hundred lines, you might consider using a different programming
language. The shell is good at string and pattern matching; in
+<<<<<<< HEAD
addition, it allows powerful use of the system utilities. More
conventional languages, such as C, C++, and Java, offer better
facilities for system programming and for managing the complexity of
@@ -2248,6 +2445,15 @@ programming and access to system facilities. Programs in these
languages may require more lines of source code than the equivalent
'awk' programs, but they are easier to maintain and usually run more
efficiently.
+=======
+addition, it allows powerful use of the system utilities. Python
+offers a nice balance between high-level ease of programming and access
+to system facilities.(1)
+
+ ---------- Footnotes ----------
+
+ (1) Other popular scripting languages include Ruby and Perl.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Intro Summary, Prev: When, Up: Getting Started
@@ -2257,8 +2463,16 @@ File: gawk.info, Node: Intro Summary, Prev: When, Up: Getting Started
* Programs in 'awk' consist of PATTERN-ACTION pairs.
+<<<<<<< HEAD
* Use either 'awk 'PROGRAM' FILES' or 'awk -f PROGRAM-FILE FILES' to
run 'awk'.
+=======
+ * An ACTION without a PATTERN always runs. The default ACTION for a
+ pattern without one is `{ print $0 }'.
+
+ * Use either `awk 'PROGRAM' FILES' or `awk -f PROGRAM-FILE FILES' to
+ run `awk'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* You may use the special '#!' header line to create 'awk' programs
that are directly executable.
@@ -2411,9 +2625,15 @@ The following list describes options mandated by the POSIX standard:
'-c'
'--traditional'
Specify "compatibility mode", in which the GNU extensions to the
+<<<<<<< HEAD
'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::.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
'-C'
'--copyright'
@@ -2463,10 +2683,17 @@ The following list describes options mandated by the POSIX standard:
disallowed.
This option is particularly necessary for World Wide Web CGI
+<<<<<<< HEAD
applications that pass arguments through the URL; using this option
prevents a malicious (or other) user from passing in options,
assignments, or 'awk' source code (via '--source') to the CGI
application. This option should be used with '#!' scripts (*note
+=======
+ applications that pass arguments through the URL; using this
+ option prevents a malicious (or other) user from passing in
+ options, assignments, or `awk' source code (via `-e') to the CGI
+ application. This option should be used with `#!' scripts (*note
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Executable Scripts::), like so:
#! /usr/local/bin/gawk -E
@@ -2483,6 +2710,7 @@ The following list describes options mandated by the POSIX standard:
'-h'
'--help'
Print a "usage" message summarizing the short and long style
+<<<<<<< HEAD
options that 'gawk' accepts and then exit.
'-i' SOURCE-FILE
@@ -2501,6 +2729,27 @@ The following list describes options mandated by the POSIX standard:
'-l' EXT
'--load' EXT
Load a dynamic extension named EXT. Extensions are stored as
+=======
+ options that `gawk' accepts and then exit.
+
+`-i' SOURCE-FILE
+`--include' SOURCE-FILE
+ Read `awk' source library from SOURCE-FILE. This option is
+ completely equivalent to using the `@include' directive inside
+ your program. This option is very similar to the `-f' option, but
+ there are two important differences. First, when `-i' is used,
+ the program source is not loaded if it has been previously loaded,
+ whereas with `-f', `gawk' always loads the file. Second, because
+ this option is intended to be used with code libraries, `gawk'
+ does not recognize such files as constituting main program input.
+ Thus, after processing an `-i' argument, `gawk' still expects to
+ find the main source code via the `-f' option or on the command
+ line.
+
+`-l' EXT
+`--load' EXT
+ Load a dynamic extension named EXT. Extensions are stored as
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
system shared libraries. This option searches for the library
using the 'AWKLIBPATH' environment variable. The correct library
suffix for your platform will be supplied by default, so it need
@@ -2513,8 +2762,13 @@ The following list describes options mandated by the POSIX standard:
'-L'[VALUE]
'--lint'['='VALUE]
Warn about constructs that are dubious or nonportable to other
+<<<<<<< HEAD
'awk' implementations. No space is allowed between the '-D' and
VALUE, if VALUE is supplied. Some warnings are issued when 'gawk'
+=======
+ `awk' implementations. No space is allowed between the `-L' and
+ VALUE, if VALUE is supplied. Some warnings are issued when `gawk'
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
first reads your program. Others are issued at runtime, as your
program executes. With an optional argument of 'fatal', lint
warnings become fatal errors. This may be drastic, but its use
@@ -2590,8 +2844,14 @@ The following list describes options mandated by the POSIX standard:
* Newlines are not allowed after '?' or ':' (*note Conditional
Exp::).
+<<<<<<< HEAD
* Specifying '-Ft' on the command-line does not set the value of
'FS' to be a single TAB character (*note Field Separators::).
+=======
+ * Specifying `-Ft' on the command line does not set the value
+ of `FS' to be a single TAB character (*note Field
+ Separators::).
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* The locale's decimal point character is used for parsing input
data (*note Locales::).
@@ -2651,6 +2911,7 @@ terminate it. (You may also use '-f -' to read program source from the
standard input but then you will not be able to also use the standard
input as a source of data.)
+<<<<<<< HEAD
Because it is clumsy using the standard 'awk' mechanisms to mix
source file and command-line 'awk' programs, 'gawk' provides the
'--source' option. This does not require you to pre-empt the standard
@@ -2662,6 +2923,17 @@ the command line.
If no '-f' or '--source' option is specified, then 'gawk' uses the
first non-option command-line argument as the text of the program source
code.
+=======
+ Because it is clumsy using the standard `awk' mechanisms to mix
+source file and command-line `awk' programs, `gawk' provides the `-e'
+option. This does not require you to pre-empt the standard input for
+your source code; it allows you to easily mix command-line and library
+source code (*note AWKPATH Variable::). As with `-f', the `-e' and `-i'
+options may also be used multiple times on the command line.
+
+ If no `-f' or `-e' option is specified, then `gawk' uses the first
+non-option command-line argument as the text of the program source code.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
If the environment variable 'POSIXLY_CORRECT' exists, then 'gawk'
behaves in strict POSIX mode, exactly as if you had supplied '--posix'.
@@ -2710,6 +2982,10 @@ including variable assignments, are included. As each element of 'ARGV'
is processed, 'gawk' sets the variable 'ARGIND' to the index in 'ARGV'
of the current element.
+ Changing `ARGC' and `ARGV' in your `awk' program lets you control
+how `awk' processes the input files; this is described in more detail
+in *note ARGC and ARGV::.
+
The distinction between file name arguments and variable-assignment
arguments is made when 'awk' is about to open the next input file. At
that point in execution, it checks the file name to see whether it is
@@ -2768,11 +3044,19 @@ SOME_COMMAND, and finally it reads 'file2'.
You may also use '"-"' to name standard input when reading files with
'getline' (*note Getline/File::).
+<<<<<<< HEAD
In addition, 'gawk' allows you to specify the special file name
'/dev/stdin', both on the command line and with 'getline'. Some other
versions of 'awk' also support this, but it is not standard. (Some
operating systems provide a '/dev/stdin' file in the file system;
however, 'gawk' always processes this file name itself.)
+=======
+ In addition, `gawk' allows you to specify the special file name
+`/dev/stdin', both on the command line and with `getline'. Some other
+versions of `awk' also support this, but it is not standard. (Some
+operating systems provide a `/dev/stdin' file in the filesystem;
+however, `gawk' always processes this file name itself.)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Environment Variables, Next: Exit Status, Prev: Naming Standard Input, Up: Invoking Gawk
@@ -2796,8 +3080,13 @@ File: gawk.info, Node: AWKPATH Variable, Next: AWKLIBPATH Variable, Up: Envir
2.5.1 The 'AWKPATH' Environment Variable
----------------------------------------
+<<<<<<< HEAD
The previous minor node described how 'awk' program files can be named
on the command-line with the '-f' option. In most 'awk'
+=======
+The previous minor node described how `awk' program files can be named
+on the command line with the `-f' option. In most `awk'
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
implementations, you must supply a precise path name for each program
file, unless the file is in the current directory. But in 'gawk', if
the file name supplied to the '-f' or '-i' options does not contain a
@@ -2816,11 +3105,19 @@ a standard directory in the default path and then specified on the
command line with a short file name. Otherwise, the full file name
would have to be typed for each file.
+<<<<<<< HEAD
By using the '-i' option, or the '--source' and '-f' options, your
command-line 'awk' programs can use facilities in 'awk' library files
(*note Library Functions::). Path searching is not done if 'gawk' is in
compatibility mode. This is true for both '--traditional' and
'--posix'. *Note Options::.
+=======
+ By using the `-i' option, or the `-e' and `-f' options, your
+command-line `awk' programs can use facilities in `awk' library files
+(*note Library Functions::). Path searching is not done if `gawk' is
+in compatibility mode. This is true for both `--traditional' and
+`--posix'. *Note Options::.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
If the source code is not found after the initial search, the path is
searched again after adding the default '.awk' suffix to the file name.
@@ -2881,8 +3178,13 @@ A number of other environment variables affect 'gawk''s behavior, but
they are more specialized. Those in the following list are meant to be
used by regular users.
+<<<<<<< HEAD
'POSIXLY_CORRECT'
Causes 'gawk' to switch POSIX compatibility mode, disabling all
+=======
+`POSIXLY_CORRECT'
+ Causes `gawk' to switch to POSIX compatibility mode, disabling all
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
traditional and GNU extensions. *Note Options::.
'GAWK_SOCK_RETRIES'
@@ -2900,6 +3202,7 @@ used by regular users.
before returning with an error. *Note Read Timeout::.
The environment variables in the following list are meant for use by
+<<<<<<< HEAD
the 'gawk' developers for testing and tuning. They are subject to
change. The variables are:
@@ -2914,6 +3217,22 @@ change. The variables are:
'AWK_HASH'
If this variable exists with a value of 'gst', 'gawk' switches to
+=======
+the `gawk' developers for testing and tuning. They are subject to
+change. The variables are:
+
+`AWKBUFSIZE'
+ This variable only affects `gawk' on POSIX-compliant systems.
+ With a value of `exact', `gawk' uses the size of each input file
+ as the size of the memory buffer to allocate for I/O. Otherwise,
+ the value should be a number, and `gawk' uses that number as the
+ size of the buffer to allocate. (When this variable is not set,
+ `gawk' uses the smaller of the file's size and the "default"
+ blocksize, which is usually the filesystems I/O blocksize.)
+
+`AWK_HASH'
+ If this variable exists with a value of `gst', `gawk' switches to
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
using the hash function from GNU Smalltalk for managing arrays.
This function may be marginally faster than the standard function.
@@ -3139,9 +3458,15 @@ File: gawk.info, Node: Invoking Summary, Prev: Undocumented, Up: Invoking Gaw
* Use either 'awk 'PROGRAM' FILES' or 'awk -f PROGRAM-FILE FILES' to
run 'awk'.
+<<<<<<< HEAD
* The three standard 'awk' options are '-f', '-F' and '-v'. 'gawk'
supplies these and many others, as well as corresponding GNU-style
long options.
+=======
+ * The three standard options for all versions of `awk' are `-f',
+ `-F' and `-v'. `gawk' supplies these and many others, as well as
+ corresponding GNU-style long options.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Non-option command-line arguments are usually treated as file
names, unless they have the form 'VAR=VALUE', in which case they
@@ -3184,22 +3509,36 @@ strings. Because regular expressions are such a fundamental part of
A regular expression enclosed in slashes ('/') is an 'awk' pattern
that matches every input record whose text belongs to that set. The
simplest regular expression is a sequence of letters, numbers, or both.
+<<<<<<< HEAD
Such a regexp matches any string that contains that sequence. Thus, the
regexp 'foo' matches any string containing 'foo'. Therefore, the
pattern '/foo/' matches any input record containing the three characters
'foo' _anywhere_ in the record. Other kinds of regexps let you specify
more complicated classes of strings.
+=======
+Such a regexp matches any string that contains that sequence. Thus,
+the regexp `foo' matches any string containing `foo'. Therefore, the
+pattern `/foo/' matches any input record containing the three adjacent
+characters `foo' _anywhere_ in the record. Other kinds of regexps let
+you specify more complicated classes of strings.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Menu:
* Regexp Usage:: How to Use Regular Expressions.
* Escape Sequences:: How to write nonprinting characters.
* Regexp Operators:: Regular Expression Operators.
+<<<<<<< HEAD
* Bracket Expressions:: What can go between '[...]'.
* GNU Regexp Operators:: Operators specific to GNU software.
* Case-sensitivity:: How to do case-insensitive matching.
+=======
+* Bracket Expressions:: What can go between `[...]'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Leftmost Longest:: How much text matches.
* Computed Regexps:: Using Dynamic Regexps.
+* GNU Regexp Operators:: Operators specific to GNU software.
+* Case-sensitivity:: How to do case-insensitive matching.
* Regexp Summary:: Regular expressions summary.

@@ -3326,15 +3665,30 @@ apply to both string constants and regexp constants:
'\xHH...'
The hexadecimal value HH, where HH stands for a sequence of
+<<<<<<< HEAD
hexadecimal digits ('0'-'9', and either 'A'-'F' or 'a'-'f'). Like
the same construct in ISO C, the escape sequence continues until
the first nonhexadecimal digit is seen. (c.e.) However, using
more than two hexadecimal digits produces undefined results. (The
'\x' escape sequence is not allowed in POSIX 'awk'.)
+=======
+ hexadecimal digits (`0'-`9', and either `A'-`F' or `a'-`f'). A
+ maximum of two digts are allowed after the `\x'. Any further
+ hexadecimal digits are treated as simple letters or numbers.
+ (c.e.)
+
+ CAUTION: In ISO C, the escape sequence continues until the
+ first nonhexadecimal digit is seen. For many years, `gawk'
+ would continue incorporating hexadecimal digits into the
+ value until a non-hexadecimal digit or the end of the string
+ was encountered. However, using more than two hexadecimal
+ digits produces
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
'\/'
A literal slash (necessary for regexp constants only). This
sequence is used when you want to write a regexp constant that
+<<<<<<< HEAD
contains a slash. Because the regexp is delimited by slashes, you
need to escape the slash that is part of the pattern, in order to
tell 'awk' to keep processing the rest of the regexp.
@@ -3345,6 +3699,21 @@ apply to both string constants and regexp constants:
contains a double quote. Because the string is delimited by double
quotes, you need to escape the quote that is part of the string, in
order to tell 'awk' to keep processing the rest of the string.
+=======
+ contains a slash (such as `/.*:\/home\/[[:alnum:]]+:.*/'; the
+ `[[:alnum:]]' notation is discussed shortly, in *note Bracket
+ Expressions::). Because the regexp is delimited by slashes, you
+ need to escape any slash that is part of the pattern, in order to
+ tell `awk' to keep processing the rest of the regexp.
+
+`\"'
+ A literal double quote (necessary for string constants only).
+ This sequence is used when you want to write a string constant
+ that contains a double quote (such as `"He said \"hi!\" to her."').
+ Because the string is delimited by double quotes, you need to
+ escape any quote that is part of the string, in order to tell
+ `awk' to keep processing the rest of the string.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
In 'gawk', a number of additional two-character sequences that begin
with a backslash have special meaning in regexps. *Note GNU Regexp
@@ -3379,12 +3748,21 @@ is not one of the characters previously listed, POSIX 'awk' purposely
leaves what happens as undefined. There are two choices:
Strip the backslash out
+<<<<<<< HEAD
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]+"'.)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Leave the backslash alone
Some other 'awk' implementations do this. In such implementations,
@@ -3475,10 +3853,18 @@ sequences and that are not listed in the table stand for themselves:
'|'
This is the "alternation operator" and it is used to specify
+<<<<<<< HEAD
alternatives. The '|' has the lowest precedence of all the regular
expression operators. For example, '^P|[[:digit:]]' matches any
string that matches either '^P' or '[[:digit:]]'. This means it
matches any string that starts with 'P' or contains a digit.
+=======
+ alternatives. The `|' has the lowest precedence of all the regular
+ expression operators. For example, `^P|[aeiouy]' matches any
+ string that matches either `^P' or `[aeiouy]'. This means it
+ matches any string that starts with `P' or contains (anywhere
+ within it) a lowercase English vowel.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
The alternation applies to the largest possible regexps on either
side.
@@ -3494,6 +3880,7 @@ sequences and that are not listed in the table stand for themselves:
'*'
This symbol means that the preceding regular expression should be
repeated as many times as necessary to find a match. For example,
+<<<<<<< HEAD
'ph*' applies the '*' symbol to the preceding 'h' and looks for
matches of one 'p' followed by any number of 'h's. This also
matches just 'p' if no 'h's are present.
@@ -3514,6 +3901,26 @@ sequences and that are not listed in the table stand for themselves:
example:
awk '/\(c[ad]+r x\)/ { print }' sample
+=======
+ `ph*' applies the `*' symbol to the preceding `h' and looks for
+ matches of one `p' followed by any number of `h's. This also
+ matches just `p' if no `h's are present.
+
+ There are two subtle points to understand about how `*' works.
+ First, the `*' applies only to the single preceding regular
+ expression component (e.g., in `ph*', it applies just to the `h').
+ To cause `*' to apply to a larger sub-expression, use parentheses:
+ `(ph)*' matches `ph', `phph', `phphph' and so on.
+
+ Second, `*' finds as many repetititons as possible. If the text to
+ be matched is `phhhhhhhhhhhhhhooey', `ph*' matches all of the `h's.
+
+`+'
+ This symbol is similar to `*', except that the preceding
+ expression must be matched at least once. This means that `wh+y'
+ would match `why' and `whhy', but not `wy', whereas `wh*y' would
+ match all three.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
'?'
This symbol is similar to '*', except that the preceding expression
@@ -3582,7 +3989,7 @@ as either a "character set", a "character class", or a "character list".
regexp operator or function.

-File: gawk.info, Node: Bracket Expressions, Next: GNU Regexp Operators, Prev: Regexp Operators, Up: Regexp
+File: gawk.info, Node: Bracket Expressions, Next: Leftmost Longest, Prev: Regexp Operators, Up: Regexp
3.4 Using Bracket Expressions
=============================
@@ -3603,7 +4010,13 @@ expression, put a '\' in front of it. For example:
[d\]]
+<<<<<<< HEAD
matches either 'd' or ']'.
+=======
+matches either `d' or `]'. Additionally, if you place `]' right after
+the opening `[', the closing bracket is treated as one of the
+characters to be matched.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
This treatment of '\' in bracket expressions is compatible with other
'awk' implementations and is also mandated by POSIX. The regular
@@ -3684,9 +4097,122 @@ Equivalence classes
classes.

-File: gawk.info, Node: GNU Regexp Operators, Next: Case-sensitivity, Prev: Bracket Expressions, Up: Regexp
+File: gawk.info, Node: Leftmost Longest, Next: Computed Regexps, Prev: Bracket Expressions, Up: Regexp
+
+3.5 How Much Text Matches?
+==========================
+
+Consider the following:
+
+ echo aaaabcd | awk '{ sub(/a+/, "<A>"); print }'
+
+ This example uses the `sub()' function (which we haven't discussed
+yet; *note String Functions::) to make a change to the input record.
+Here, the regexp `/a+/' indicates "one or more `a' characters," and the
+replacement text is `<A>'.
+
+ The input contains four `a' characters. `awk' (and POSIX) regular
+expressions always match the leftmost, _longest_ sequence of input
+characters that can match. Thus, all four `a' characters are replaced
+with `<A>' in this example:
+
+ $ echo aaaabcd | awk '{ sub(/a+/, "<A>"); print }'
+ -| <A>bcd
+
+ For simple match/no-match tests, this is not so important. But when
+doing text matching and substitutions with the `match()', `sub()',
+`gsub()', and `gensub()' functions, it is very important. *Note String
+Functions::, for more information on these functions. Understanding
+this principle is also important for regexp-based record and field
+splitting (*note Records::, and also *note Field Separators::).
+
+
+File: gawk.info, Node: Computed Regexps, Next: GNU Regexp Operators, Prev: Leftmost Longest, Up: Regexp
+
+3.6 Using Dynamic Regexps
+=========================
+
+The righthand side of a `~' or `!~' operator need not be a regexp
+constant (i.e., a string of characters between slashes). It may be any
+expression. The expression is evaluated and converted to a string if
+necessary; the contents of the string are then used as the regexp. A
+regexp computed in this way is called a "dynamic regexp" or a "computed
+regexp":
+
+ BEGIN { digits_regexp = "[[:digit:]]+" }
+ $0 ~ digits_regexp { print }
+
+This sets `digits_regexp' to a regexp that describes one or more digits,
+and tests whether the input record matches this regexp.
+
+ NOTE: When using the `~' and `!~' operators, there is a difference
+ between a regexp constant enclosed in slashes and a string
+ constant enclosed in double quotes. If you are going to use a
+ string constant, you have to understand that the string is, in
+ essence, scanned _twice_: the first time when `awk' reads your
+ program, and the second time when it goes to match the string on
+ the lefthand side of the operator with the pattern on the right.
+ This is true of any string-valued expression (such as
+ `digits_regexp', shown previously), not just string constants.
+
+ What difference does it make if the string is scanned twice? The
+answer has to do with escape sequences, and particularly with
+backslashes. To get a backslash into a regular expression inside a
+string, you have to type two backslashes.
+
+ For example, `/\*/' is a regexp constant for a literal `*'. Only
+one backslash is needed. To do the same thing with a string, you have
+to type `"\\*"'. The first backslash escapes the second one so that
+the string actually contains the two characters `\' and `*'.
+
+ Given that you can use both regexp and string constants to describe
+regular expressions, which should you use? The answer is "regexp
+constants," for several reasons:
+
+ * String constants are more complicated to write and more difficult
+ to read. Using regexp constants makes your programs less
+ error-prone. Not understanding the difference between the two
+ kinds of constants is a common source of errors.
+
+ * It is more efficient to use regexp constants. `awk' can note that
+ you have supplied a regexp and store it internally in a form that
+ makes pattern matching more efficient. When using a string
+ constant, `awk' must first convert the string into this internal
+ form and then perform the pattern matching.
+
+ * Using regexp constants is better form; it shows clearly that you
+ intend a regexp match.
+
+ Using `\n' in Bracket Expressions of Dynamic Regexps
+
+ Some versions of `awk' do not allow the newline character to be used
+inside a bracket expression for a dynamic regexp:
+
+ $ awk '$0 ~ "[ \t\n]"'
+ error--> awk: newline in character class [
+ error--> ]...
+ error--> source line number 1
+ error--> context is
+ error--> >>> <<<
+
+ But a newline in a regexp constant works with no problem:
+
+ $ awk '$0 ~ /[ \t\n]/'
+ here is a sample line
+ -| here is a sample line
+ Ctrl-d
+
+ `gawk' does not have this problem, and it isn't likely to occur
+often in practice, but it's worth noting for future reference.
+
+
+File: gawk.info, Node: GNU Regexp Operators, Next: Case-sensitivity, Prev: Computed Regexps, Up: Regexp
+<<<<<<< HEAD
3.5 'gawk'-Specific Regexp Operators
+=======
+3.7 `gawk'-Specific Regexp Operators
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
====================================
GNU software that deals with regular expressions provides a number of
@@ -3766,6 +4292,7 @@ No options
(e.g., '\w' matches a literal 'w'). Interval expressions are
allowed.
+<<<<<<< HEAD
'--traditional'
Traditional Unix 'awk' regexps are matched. The GNU operators are
not special, and interval expressions are not available. The POSIX
@@ -3773,6 +4300,15 @@ No options
Kernighan's 'awk' does support them. Characters described by octal
and hexadecimal escape sequences are treated literally, even if
they represent regexp metacharacters.
+=======
+`--traditional'
+ 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
+ BWK `awk' does support them. Characters described by octal and
+ hexadecimal escape sequences are treated literally, even if they
+ represent regexp metacharacters.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
'--re-interval'
Allow interval expressions in regexps, if '--traditional' has been
@@ -3780,9 +4316,9 @@ No options
default.

-File: gawk.info, Node: Case-sensitivity, Next: Leftmost Longest, Prev: GNU Regexp Operators, Up: Regexp
+File: gawk.info, Node: Case-sensitivity, Next: Regexp Summary, Prev: GNU Regexp Operators, Up: Regexp
-3.6 Case Sensitivity in Matching
+3.8 Case Sensitivity in Matching
================================
Case is normally significant in regular expressions, both when matching
@@ -3855,6 +4391,7 @@ and we don't recommend it.
that 'gawk' does the right thing.

+<<<<<<< HEAD
File: gawk.info, Node: Leftmost Longest, Next: Computed Regexps, Prev: Case-sensitivity, Up: Regexp
3.7 How Much Text Matches?
@@ -3965,6 +4502,9 @@ in practice, but it's worth noting for future reference.

File: gawk.info, Node: Regexp Summary, Prev: Computed Regexps, Up: Regexp
+=======
+File: gawk.info, Node: Regexp Summary, Prev: Case-sensitivity, Up: Regexp
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
3.9 Summary
===========
@@ -3973,7 +4513,7 @@ File: gawk.info, Node: Regexp Summary, Prev: Computed Regexps, Up: Regexp
'awk', regular expression constants are written enclosed between
slashes: '/'...'/'.
- * Regexp constants may be used by standalone in patterns and in
+ * Regexp constants may be used standalone in patterns and in
conditional expressions, or as part of matching expressions using
the '~' and '!~' operators.
@@ -3997,8 +4537,8 @@ File: gawk.info, Node: Regexp Summary, Prev: Computed Regexps, Up: Regexp
extent of the match, such as for text substitution and when the
record separator is a regexp.
- * Matching expressions may use dynamic regexps; that is string values
- treated as regular expressions.
+ * Matching expressions may use dynamic regexps, that is, string
+ values treated as regular expressions.

File: gawk.info, Node: Reading Files, Next: Printing, Prev: Regexp, Up: Top
@@ -4038,7 +4578,7 @@ to be named on the 'awk' command line (*note Getline::).
* Getline:: Reading files under explicit program control
using the 'getline' function.
* Read Timeout:: Reading input with a timeout.
-* Command line directories:: What happens if you put a directory on the
+* Command-line directories:: What happens if you put a directory on the
command line.
* Input Summary:: Input summary.
* Input Exercises:: Exercises.
@@ -4049,6 +4589,7 @@ File: gawk.info, Node: Records, Next: Fields, Up: Reading Files
4.1 How Input Is Split into Records
===================================
+<<<<<<< HEAD
The 'awk' utility divides the input for your 'awk' program into records
and fields. 'awk' keeps track of the number of records that have been
read so far from the current input file. This value is stored in a
@@ -4056,6 +4597,15 @@ built-in variable called 'FNR'. It is reset to zero when a new file is
started. Another built-in variable, 'NR', records the total number of
input records read so far from all data files. It starts at zero, but
is never automatically reset to zero.
+=======
+`awk' divides the input for your program into records and fields. It
+keeps track of the number of records that have been read so far from
+the current input file. This value is stored in a built-in variable
+called `FNR' which is reset to zero when a new file is started.
+Another built-in variable, `NR', records the total number of input
+records read so far from all data files. It starts at zero, but is
+never automatically reset to zero.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Menu:
@@ -4219,12 +4769,13 @@ trailing whitespace:
$ echo record 1 AAAA record 2 BBBB record 3 |
> gawk 'BEGIN { RS = "\n|( *[[:upper:]]+ *)" }
- > { print "Record =", $0, "and RT =", RT }'
- -| Record = record 1 and RT = AAAA
- -| Record = record 2 and RT = BBBB
- -| Record = record 3 and RT =
- -|
+ > { print "Record =", $0,"and RT = [" RT "]" }'
+ -| Record = record 1 and RT = [ AAAA ]
+ -| Record = record 2 and RT = [ BBBB ]
+ -| Record = record 3 and RT = [
+ -| ]
+<<<<<<< HEAD
The final line of output has an extra blank line. This is because the
value of 'RT' is a newline, and the 'print' statement supplies its own
terminating newline. *Note Simple Sed::, for a more useful example of
@@ -4248,6 +4799,31 @@ never happen.
The use of 'RS' as a regular expression and the 'RT' variable are
'gawk' extensions; they are not available in compatibility mode (*note
+=======
+The square brackets delineate the contents of `RT', letting you see the
+leading and trailing whitespace. The final value of `RT' `RT' is a
+newline. *Note Simple Sed::, for a more useful example of `RS' as a
+regexp and `RT'.
+
+ If you set `RS' to a regular expression that allows optional
+trailing text, such as `RS = "abc(XYZ)?"' it is possible, due to
+implementation constraints, that `gawk' may match the leading part of
+the regular expression, but not the trailing part, particularly if the
+input text that could match the trailing part is fairly long. `gawk'
+attempts to avoid this problem, but currently, there's no guarantee
+that this will never happen.
+
+ NOTE: Remember that in `awk', the `^' and `$' anchor
+ metacharacters match the beginning and end of a _string_, and not
+ the beginning and end of a _line_. As a result, something like
+ `RS = "^[[:upper:]]"' can only match at the beginning of a file.
+ This is because `gawk' views the input file as one long string
+ that happens to contain newline characters in it. It is thus best
+ to avoid anchor characters in the value of `RS'.
+
+ The use of `RS' as a regular expression and the `RT' variable are
+`gawk' extensions; they are not available in compatibility mode (*note
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Options::). In compatibility mode, only the first character of the
value of 'RS' is used to determine the end of the record.
@@ -4567,7 +5143,11 @@ File: gawk.info, Node: Field Separators, Next: Constant Size, Prev: Changing
* Default Field Splitting:: How fields are normally separated.
* Regexp Field Splitting:: Using regexps as the field separator.
* Single Character Fields:: Making each character a separate field.
+<<<<<<< HEAD
* Command Line Field Separator:: Setting 'FS' from the command-line.
+=======
+* Command Line Field Separator:: Setting `FS' from the command line.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Full Line Fields:: Making the full line be a single field.
* Field Splitting Summary:: Some final points and a summary table.
@@ -4708,9 +5288,14 @@ 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.)
+<<<<<<< HEAD
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:
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
$ echo 'xxAA xxBxx C' |
> gawk -F '(^x+)|( +)' '{ for (i = 1; i <= NF; i++)
@@ -4779,11 +5364,20 @@ Sequences::), finally yielding a single '\' to use for the field
separator.
As a special case, in compatibility mode (*note Options::), if the
+<<<<<<< HEAD
argument to '-F' is 't', then 'FS' is set to the TAB character. If you
type '-F\t' at the shell, without any quotes, the '\' gets deleted, so
'awk' figures that you really want your fields to be separated with TABs
and not 't's. Use '-v FS="t"' or '-F"[t]"' on the command line if you
really do want to separate your fields with 't's.
+=======
+argument to `-F' is `t', then `FS' is set to the TAB character. If you
+type `-F\t' at the shell, without any quotes, the `\' gets deleted, so
+`awk' figures that you really want your fields to be separated with
+TABs and not `t's. Use `-v FS="t"' or `-F"[t]"' on the command line if
+you really do want to separate your fields with `t's. Use `-F '\t''
+when not in compatibility mode to specify that TABs separate fields.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
As an example, let's use an 'awk' program file called 'edu.awk' that
contains the pattern '/edu/' and the action 'print $1':
@@ -4902,8 +5496,13 @@ which usually prints:
root
+<<<<<<< HEAD
on an incorrect implementation of 'awk', while 'gawk' prints something
like:
+=======
+on an incorrect implementation of `awk', while `gawk' prints the full
+first line of the file, something like:
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
root:nSijPlPhZZwgE:0:0:Root:/:
@@ -4982,7 +5581,7 @@ calculated idle time:
BEGIN { FIELDWIDTHS = "9 6 10 6 7 7 35" }
NR > 2 {
idle = $4
- sub(/^ */, "", idle) # strip leading spaces
+ sub(/^ +/, "", idle) # strip leading spaces
if (idle == "")
idle = 0
if (idle ~ /:/) {
@@ -5113,8 +5712,15 @@ would be to remove the quotes when they occur, with something like this:
As with 'FS', the 'IGNORECASE' variable (*note User-modified::)
affects field splitting with 'FPAT'.
+<<<<<<< HEAD
Similar to 'FIELDWIDTHS', the value of 'PROCINFO["FS"]' will be
'"FPAT"' if content-based field splitting is being used.
+=======
+ Assigning a value to `FPAT' overrides field splitting with `FS' and
+with `FIELDWIDTHS'. Similar to `FIELDWIDTHS', the value of
+`PROCINFO["FS"]' will be `"FPAT"' if content-based field splitting is
+being used.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
NOTE: Some programs export CSV data that contains embedded newlines
between the double quotes. 'gawk' provides no way to deal with
@@ -5132,6 +5738,11 @@ the first '+' to '*') allows fields to be empty:
Finally, the 'patsplit()' function makes the same functionality
available for splitting regular strings (*note String Functions::).
+ To recap, `gawk' provides three independent methods to split input
+records into fields. `gawk' uses whichever mechanism was last chosen
+based on which of the three variables--`FS', `FIELDWIDTHS', and
+`FPAT'--was last assigned to.
+
---------- Footnotes ----------
(1) At least, we don't know of one.
@@ -5284,6 +5895,7 @@ File: gawk.info, Node: Getline, Next: Read Timeout, Prev: Multiple Line, Up:
So far we have been getting our input data from 'awk''s main input
stream--either the standard input (usually your keyboard, sometimes the
output from another program) or from the files specified on the command
+<<<<<<< HEAD
line. The 'awk' language has a special built-in command called
'getline' that can be used to read input under your explicit control.
@@ -5299,6 +5911,23 @@ encounters the end of the file. If there is some error in getting a
record, such as a file that cannot be opened, then 'getline' returns -1.
In this case, 'gawk' sets the variable 'ERRNO' to a string describing
the error that occurred.
+=======
+line. The `awk' language has a special built-in command called
+`getline' that can be used to read input under your explicit control.
+
+ The `getline' command is used in several different ways and should
+_not_ be used by beginners. The examples that follow the explanation
+of the `getline' command include material that has not been covered
+yet. Therefore, come back and study the `getline' command _after_ you
+have reviewed the rest of this Info file and have a good knowledge of
+how `awk' works.
+
+ The `getline' command returns 1 if it finds a record and 0 if it
+encounters the end of the file. If there is some error in getting a
+record, such as a file that cannot be opened, then `getline' returns
+-1. In this case, `gawk' sets the variable `ERRNO' to a string
+describing the error that occurred.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
In the following examples, COMMAND stands for a string value that
represents a shell command.
@@ -5334,35 +5963,56 @@ record and split it up into fields. This is useful if you've finished
processing the current record, but want to do some special processing on
the next record _right now_. For example:
+ # Remove text between /* and */, inclusive
{
- if ((t = index($0, "/*")) != 0) {
- # value of `tmp' will be "" if t is 1
- tmp = substr($0, 1, t - 1)
- u = index(substr($0, t + 2), "*/")
- offset = t + 2
- while (u == 0) {
- if (getline <= 0) {
+ if ((i = index($0, "/*")) != 0) {
+ out = substr($0, 1, i - 1) # leading part of the string
+ rest = substr($0, i + 2) # ... */ ...
+ j = index(rest, "*/") # is */ in trailing part?
+ if (j > 0) {
+ rest = substr(rest, j + 2) # remove comment
+ } else {
+ while (j == 0) {
+ # get more text
+ if (getline <= 0) {
m = "unexpected EOF or error"
m = (m ": " ERRNO)
print m > "/dev/stderr"
exit
- }
- u = index($0, "*/")
- offset = 0
- }
- # substr() expression will be "" if */
- # occurred at end of line
- $0 = tmp substr($0, offset + u + 2)
- }
- print $0
+ }
+ # build up the line using string concatenation
+ rest = rest $0
+ j = index(rest, "*/") # is */ in trailing part?
+ if (j != 0) {
+ rest = substr(rest, j + 2)
+ break
+ }
+ }
+ }
+ # build up the output line using string concatenation
+ $0 = out rest
+ }
+ print $0
}
+<<<<<<< HEAD
This 'awk' program deletes C-style comments ('/* ... */') from the
input. By replacing the 'print $0' with other statements, you could
perform more complicated processing on the decommented input, such as
searching for matches of a regular expression. (This program has a
subtle problem--it does not work if one comment ends and another begins
on the same line.)
+=======
+ This `awk' program deletes C-style comments (`/* ... */') from the
+input. It uses a number of features we haven't covered yet, including
+string concatenation (*note Concatenation::) and the `index()' and
+`substr()' built-in functions (*note String Functions::). By replacing
+the `print $0' with other statements, you could perform more
+complicated processing on the decommented input, such as searching for
+matches of a regular expression. (This program has a subtle
+problem--it does not work if one comment ends and another begins on the
+same line.)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
This form of the 'getline' command sets 'NF', 'NR', 'FNR', 'RT', and
the value of '$0'.
@@ -5544,6 +6194,7 @@ Notice that this program ran the command 'who' and printed the previous
result. (If you try this program yourself, you will of course get
different results, depending upon who is logged in on your system.)
+<<<<<<< HEAD
This variation of 'getline' splits the record into fields, sets the
value of 'NF', and recomputes the value of '$0'. The values of 'NR' and
'FNR' are not changed. 'RT' is set.
@@ -5561,6 +6212,26 @@ you want your program to be portable to all 'awk' implementations.
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.
+=======
+ This variation of `getline' splits the record into fields, sets the
+value of `NF', and recomputes the value of `$0'. The values of `NR'
+and `FNR' are not changed. `RT' is set.
+
+ According to POSIX, `EXPRESSION | getline' is ambiguous if
+EXPRESSION contains unparenthesized operators other than `$'--for
+example, `"echo " "date" | getline' is ambiguous because the
+concatenation operator is not parenthesized. You should write it as
+`("echo " "date") | getline' if you want your program to be portable to
+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 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.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Getline/Variable/Pipe, Next: Getline/Coprocess, Prev: Getline/Pipe, Up: Getline
@@ -5727,7 +6398,7 @@ VAR
Table 4.1: 'getline' Variants and What They Set

-File: gawk.info, Node: Read Timeout, Next: Command line directories, Prev: Getline, Up: Reading Files
+File: gawk.info, Node: Read Timeout, Next: Command-line directories, Prev: Getline, Up: Reading Files
4.10 Reading Input With A Timeout
=================================
@@ -5820,7 +6491,7 @@ can block indefinitely until some other process opens it for writing.
(1) This assumes that standard input is the keyboard.

-File: gawk.info, Node: Command line directories, Next: Input Summary, Prev: Read Timeout, Up: Reading Files
+File: gawk.info, Node: Command-line directories, Next: Input Summary, Prev: Read Timeout, Up: Reading Files
4.11 Directories On The Command Line
====================================
@@ -5843,7 +6514,7 @@ error.
usable data from an 'awk' program.

-File: gawk.info, Node: Input Summary, Next: Input Exercises, Prev: Command line directories, Up: Reading Files
+File: gawk.info, Node: Input Summary, Next: Input Exercises, Prev: Command-line directories, Up: Reading Files
4.12 Summary
============
@@ -5922,10 +6593,18 @@ File: gawk.info, Node: Input Exercises, Prev: Input Summary, Up: Reading File
including abstentions, for each item.
2. *note Plain Getline::, presented a program to remove C-style
+<<<<<<< HEAD
comments ('/* ... */') from the input. That program does not work
if one comment ends on one line and another one starts later on the
same line. Write a program that does handle multiple comments on
the line.
+=======
+ comments (`/* ... */') from the input. That program does not work
+ if one comment ends on one line and another one starts later on
+ the same line. That can be fixed by making one simple change.
+ What is it?
+
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Printing, Next: Expressions, Prev: Reading Files, Up: Top
@@ -5962,7 +6641,7 @@ function.
descriptors.
* Close Files And Pipes:: Closing Input and Output Files and Pipes.
* Output Summary:: Output summary.
-* Output exercises:: Exercises.
+* Output Exercises:: Exercises.

File: gawk.info, Node: Print, Next: Print Examples, Up: Printing
@@ -5994,6 +6673,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
@@ -6711,8 +7394,13 @@ rename the files. It then sends the list to the shell for execution.

File: gawk.info, Node: Special Files, Next: Close Files And Pipes, Prev: Redirection, Up: Printing
+<<<<<<< HEAD
5.7 Special File Name in 'gawk'
===============================
+=======
+5.7 Special File Names in `gawk'
+================================
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
'gawk' provides a number of special file names that it interprets
internally. These file names provide access to standard file
@@ -6746,10 +7434,17 @@ message to standard error in an 'awk' program is as follows:
print "Serious error detected!" | "cat 1>&2"
This works by opening a pipeline to a shell command that can access the
+<<<<<<< HEAD
standard error stream that it inherits from the 'awk' process. This is
far from elegant, and it is also inefficient, because it requires a
separate process. So people writing 'awk' programs often don't do this.
Instead, they send the error messages to the screen, like this:
+=======
+standard error stream that it inherits from the `awk' process. This is
+far from elegant, and it also requires a separate process. So people
+writing `awk' programs often don't do this. Instead, they send the
+error messages to the screen, like this:
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
print "Serious error detected!" > "/dev/tty"
@@ -7014,7 +7709,7 @@ call. See the system manual pages for information on how to decode this
value.

-File: gawk.info, Node: Output Summary, Next: Output exercises, Prev: Close Files And Pipes, Up: Printing
+File: gawk.info, Node: Output Summary, Next: Output Exercises, Prev: Close Files And Pipes, Up: Printing
5.9 Summary
===========
@@ -7039,7 +7734,7 @@ File: gawk.info, Node: Output Summary, Next: Output exercises, Prev: Close Fi
communications.

-File: gawk.info, Node: Output exercises, Prev: Output Summary, Up: Printing
+File: gawk.info, Node: Output Exercises, Prev: Output Summary, Up: Printing
5.10 Exercises
==============
@@ -7238,10 +7933,18 @@ File: gawk.info, Node: Regexp Constants, Prev: Nondecimal-numbers, Up: Consta
....................................
A regexp constant is a regular expression description enclosed in
+<<<<<<< HEAD
slashes, such as '/^beginning and end$/'. Most regexps used in 'awk'
programs are constant, but the '~' and '!~' matching operators can also
match computed or dynamic regexps (which are just ordinary strings or
variables that contain a regexp).
+=======
+slashes, such as `/^beginning and end$/'. Most regexps used in `awk'
+programs are constant, but the `~' and `!~' matching operators can also
+match computed or dynamic regexps (which are typically just ordinary
+strings or variables that contain a regexp, but could be a more complex
+expression).
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Using Constant Regexps, Next: Variables, Prev: Constants, Up: Values
@@ -7313,12 +8016,21 @@ For example:
}
In this example, the programmer wants to pass a regexp constant to
+<<<<<<< HEAD
the user-defined function 'mysub', which in turn passes it on to either
'sub()' or 'gsub()'. However, what really happens is that the 'pat'
parameter is either one or zero, depending upon whether or not '$0'
matches '/hi/'. 'gawk' issues a warning when it sees a regexp constant
used as a parameter to a user-defined function, since passing a truth
value in this way is probably not what was intended.
+=======
+the user-defined function `mysub()', which in turn passes it on to
+either `sub()' or `gsub()'. However, what really happens is that the
+`pat' parameter is either one or zero, depending upon whether or not
+`$0' matches `/hi/'. `gawk' issues a warning when it sees a regexp
+constant used as a parameter to a user-defined function, since passing
+a truth value in this way is probably not what was intended.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Variables, Next: Conversion, Prev: Using Constant Regexps, Up: Values
@@ -7334,7 +8046,7 @@ on the 'awk' command line.
* Menu:
* Using Variables:: Using variables in your programs.
-* Assignment Options:: Setting variables on the command-line and a
+* Assignment Options:: Setting variables on the command line and a
summary of command-line syntax. This is an
advanced method of input.
@@ -7757,13 +8469,19 @@ it's parsed as follows:
=> -12 (-24)
=> -12-24
- As mentioned earlier, when doing concatenation, _parenthesize_.
-Otherwise, you're never quite sure what you'll get.
+ As mentioned earlier, when mixing concatenation with other
+operators, _parenthesize_. Otherwise, you're never quite sure what
+you'll get.
---------- Footnotes ----------
+<<<<<<< HEAD
(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.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Assignment Ops, Next: Increment Ops, Prev: Concatenation, Up: All Operators
@@ -7928,8 +8646,13 @@ A workaround is:
awk '/[=]=/' /dev/null
+<<<<<<< HEAD
'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::).
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Increment Ops, Prev: Assignment Ops, Up: All Operators
@@ -8094,6 +8817,7 @@ File: gawk.info, Node: Variable Typing, Next: Comparison Operators, Up: Typin
6.3.2.1 String Type Versus Numeric Type
.......................................
+<<<<<<< HEAD
The 1992 POSIX standard introduced the concept of a "numeric string",
which is simply a string that looks like a number--for example, '" +2"'.
This concept is used for determining the type of a variable. The type
@@ -8104,6 +8828,13 @@ determine how they are compared.
quite right for several editions. Fortunately, as of at least the 2008
standard (and possibly earlier), the standard has been fixed, and
variable typing follows these rules:(1)
+=======
+The POSIX standard introduced the concept of a "numeric string", which
+is simply a string that looks like a number--for example, `" +2"'.
+This concept is used for determining the type of a variable. The type
+of the variable is important because the types of two variables
+determine how they are compared. Variable typing follows these rules:
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* A numeric constant or the result of a numeric operation has the
NUMERIC attribute.
@@ -8145,12 +8876,21 @@ operands, according to the following symmetric matrix:
STRNUM | string numeric numeric
-----+-------------------------------
+<<<<<<< HEAD
The basic idea is that user input that looks numeric--and _only_ user
input--should be treated as numeric, even though it is actually made of
characters and is therefore also a string. Thus, for example, the
string constant '" +3.14"', when it appears in program source code, is a
string--even though it looks numeric--and is _never_ treated as number
for comparison purposes.
+=======
+ The basic idea is that user input that looks numeric--and _only_
+user input--should be treated as numeric, even though it is actually
+made of characters and is therefore also a string. Thus, for example,
+the string constant `" +3.14"', when it appears in program source code,
+is a string--even though it looks numeric--and is _never_ treated as a
+number for comparison purposes.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
In short, when one operand is a "pure" string, such as a string
constant, then a string comparison is performed. Otherwise, a numeric
@@ -8181,11 +8921,14 @@ comparison between the two different constants is true, '0' otherwise:
$ echo ' +3.14' | gawk '{ print $1 == 3.14 }' True
-| 1
+<<<<<<< HEAD
---------- Footnotes ----------
(1) 'gawk' has followed these rules for many years, and it is
gratifying that the POSIX standard is also now correct.
+=======
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Comparison Operators, Next: POSIX String Comparison, Prev: Variable Typing, Up: Typing and Comparison
@@ -8389,9 +9132,15 @@ because of the way they work. Evaluation of the full expression is
"short-circuited" if the result can be determined part way through its
evaluation.
+<<<<<<< HEAD
Statements that use '&&' or '||' can be continued simply by putting a
newline after them. But you cannot put a newline in front of either of
these operators without using backslash continuation (*note
+=======
+ Statements that end with `&&' or `||' can be continued simply by
+putting a newline after them. But you cannot put a newline in front of
+either of these operators without using backslash continuation (*note
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Statements/Lines::).
The actual value of an expression using the '!' operator is either
@@ -8402,7 +9151,7 @@ following program is one way to print lines in between special
bracketing lines:
$1 == "START" { interested = ! interested; next }
- interested == 1 { print }
+ interested { print }
$1 == "END" { interested = ! interested; next }
The variable 'interested', as with all 'awk' variables, starts out
@@ -8412,8 +9161,21 @@ using '!'. The next rule prints lines as long as 'interested' is true.
When a line is seen whose first field is 'END', 'interested' is toggled
back to false.(1)
+<<<<<<< HEAD
NOTE: The 'next' statement is discussed in *note Next Statement::.
'next' tells 'awk' to skip the rest of the rules, get the next
+=======
+ Most commonly, the `!' operator is used in the conditions of `if'
+and `while' statements, where it often makes more sense to phrase the
+logic in the negative:
+
+ if (! SOME CONDITION || SOME OTHER CONDITION) {
+ ... DO WHATEVER PROCESSING ...
+ }
+
+ NOTE: The `next' statement is discussed in *note Next Statement::.
+ `next' tells `awk' to skip the rest of the rules, get the next
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
record, and start processing the rules over again at the top. The
reason it's there is to avoid printing the bracketing 'START' and
'END' lines.
@@ -8865,7 +9627,7 @@ precisely 'li':
'li'.) Contrast this with the following regular expression match, which
accepts any record with a first field that contains 'li':
- $ awk '$1 ~ /foo/ { print $2 }' mail-list
+ $ awk '$1 ~ /li/ { print $2 }' mail-list
-| 555-5553
-| 555-6699
@@ -9080,11 +9842,18 @@ direction. Traditionally, due largely to implementation issues, '$0'
and 'NF' were _undefined_ inside an 'END' rule. The POSIX standard
specifies that 'NF' is available in an 'END' rule. It contains the
number of fields from the last input record. Most probably due to an
+<<<<<<< HEAD
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.
+=======
+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 BWK `awk', and possibly other implementations, do not.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
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
@@ -9564,22 +10333,31 @@ match to a given case is made, the case statement bodies execute until a
'break', 'continue', 'next', 'nextfile' or 'exit' is encountered, or the
end of the 'switch' statement itself. For example:
- switch (NR * 2 + 1) {
- case 3:
- case "11":
- print NR - 1
- break
-
- case /2[[:digit:]]+/:
- print NR
-
- default:
- print NR + 1
-
- case -1:
- print NR * -1
+ while ((c = getopt(ARGC, ARGV, "aksx")) != -1) {
+ switch (c) {
+ case "a":
+ # report size of all files
+ all_files = TRUE;
+ break
+ case "k":
+ BLOCK_SIZE = 1024 # 1K block size
+ break
+ case "s":
+ # do sums only
+ sum_only = TRUE
+ break
+ case "x":
+ # don't cross filesystems
+ fts_flags = or(fts_flags, FTS_XDEV)
+ break
+ case "?":
+ default:
+ usage()
+ break
+ }
}
+<<<<<<< HEAD
Note that if none of the statements specified above halt execution of
a matched 'case' statement, execution falls through to the next 'case'
until execution halts. In the above example, for any case value
@@ -9587,6 +10365,14 @@ starting with '2' followed by one or more digits, the 'print' statement
is executed and then falls through into the 'default' section, executing
its 'print' statement. In turn, the -1 case will also be executed since
the 'default' does not halt execution.
+=======
+ Note that if none of the statements specified above halt execution
+of a matched `case' statement, execution falls through to the next
+`case' until execution halts. In the above example, the `case' for
+`"?"' falls through to the `default' case, which is to call a function
+named `usage()'. (The `getopt()' function being called here is
+described in *note Getopt Function::.)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Break Statement, Next: Continue Statement, Prev: Switch Statement, Up: Statements
@@ -9639,12 +10425,21 @@ Statement::.)
The 'break' statement is also used to break out of the 'switch'
statement. This is discussed in *note Switch Statement::.
+<<<<<<< HEAD
The 'break' statement has no meaning when used outside the body of a
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'.
+=======
+ The `break' statement has no meaning when used outside the body of a
+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 BWK `awk' no longer allow
+this usage, nor does `gawk'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Continue Statement, Next: Next Statement, Prev: Break Statement, Up: Statements
@@ -9687,6 +10482,7 @@ the previous example with the following 'while' loop:
print ""
}
+<<<<<<< HEAD
This program loops forever once 'x' reaches 5.
The 'continue' statement has no special meaning with respect to the
@@ -9696,6 +10492,18 @@ 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'.
+=======
+This program loops forever once `x' reaches 5, since the increment
+(`x++') is never reached.
+
+ The `continue' statement has no special meaning with respect to the
+`switch' statement, nor does it have any meaning when used outside the
+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 BWK `awk' no longer work this
+way, nor does `gawk'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Next Statement, Next: Nextfile Statement, Prev: Continue Statement, Up: Statements
@@ -9763,10 +10571,17 @@ statement instructs 'awk' to stop processing the current data file.
Upon execution of the 'nextfile' statement, 'FILENAME' is updated to
the name of the next data file listed on the command line, 'FNR' is
reset to one, and processing starts over with the first rule in the
+<<<<<<< HEAD
program. If the 'nextfile' statement causes the end of the input to be
reached, then the code in any 'END' rules is executed. An exception to
this is when 'nextfile' is invoked during execution of any statement in
an 'END' rule; In this case, it causes the program to stop immediately.
+=======
+program. If the `nextfile' statement causes the end of the input to be
+reached, then the code in any `END' rules is executed. An exception to
+this is when `nextfile' is invoked during execution of any statement in
+an `END' rule; in this case, it causes the program to stop immediately.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
*Note BEGIN/END::.
The 'nextfile' statement is useful when there are many data files to
@@ -9775,10 +10590,18 @@ Without 'nextfile', in order to move on to the next data file, a program
would have to continue scanning the unwanted records. The 'nextfile'
statement accomplishes this much more efficiently.
+<<<<<<< HEAD
In 'gawk', execution of 'nextfile' causes additional things to
happen: any 'ENDFILE' rules are executed except in the case as mentioned
below, 'ARGIND' is incremented, and any 'BEGINFILE' rules are executed.
('ARGIND' hasn't been introduced yet. *Note Built-in Variables::.)
+=======
+ In `gawk', execution of `nextfile' causes additional things to
+happen: any `ENDFILE' rules are executed if `gawk' is not currently in
+an `END' or `BEGINFILE' rule, `ARGIND' is incremented, and any
+`BEGINFILE' rules are executed. (`ARGIND' hasn't been introduced yet.
+*Note Built-in Variables::.)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
With 'gawk', 'nextfile' is useful inside a 'BEGINFILE' rule to skip
over a file that would otherwise cause 'gawk' to exit with a fatal
@@ -9796,12 +10619,21 @@ in 'ARGV'.
standard. See the Austin Group website
(http://austingroupbugs.net/view.php?id=607).
+<<<<<<< HEAD
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.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Exit Statement, Prev: Nextfile Statement, Up: Statements
@@ -10172,7 +11004,8 @@ they are not special.
'FUNCTAB #'
An array whose indices and corresponding values are the names of
- all the user-defined or extension functions in the program.
+ all the built-in, user-defined and extension functions in the
+ program.
NOTE: Attempting to use the 'delete' statement with the
'FUNCTAB' array causes a fatal error. Any attempt to assign
@@ -10208,9 +11041,18 @@ they are not special.
'"array"'
The identifier is an array.
+<<<<<<< HEAD
'"extension"'
The identifier is an extension function loaded via
'@load'.
+=======
+ `"builtin"'
+ The identifier is a built-in function.
+
+ `"extension"'
+ The identifier is an extension function loaded via
+ `@load' or `-l'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
'"scalar"'
The identifier is a scalar.
@@ -10447,8 +11289,21 @@ elements from 'ARGV' (*note Delete::).
All of these actions are typically done in the 'BEGIN' rule, before
actual processing of the input begins. *Note Split Program::, and see
*note Tee Program::, for examples of each way of removing elements from
+<<<<<<< HEAD
'ARGV'. The following fragment processes 'ARGV' in order to examine,
and then remove, command-line options:
+=======
+`ARGV'.
+
+ To actually get options into an `awk' program, end the `awk' options
+with `--' and then supply the `awk' program's options, in the following
+manner:
+
+ awk -f myprog.awk -- -v -q file1 file2 ...
+
+ The following fragment processes `ARGV' in order to examine, and
+then remove, the above command-line options:
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
BEGIN {
for (i = 1; i < ARGC; i++) {
@@ -10466,6 +11321,7 @@ and then remove, command-line options:
}
}
+<<<<<<< HEAD
To actually get the options into the 'awk' program, end the 'awk'
options with '--' and then supply the 'awk' program's options, in the
following manner:
@@ -10479,6 +11335,16 @@ the 'awk' program to deal with. As soon as it sees an unknown option,
recognize. The previous example with 'gawk' would be:
gawk -f myprog -q -v file1 file2 ...
+=======
+ Ending the `awk' options with `--' isn't necessary in `gawk'. Unless
+`--posix' has been specified, `gawk' silently puts any unrecognized
+options into `ARGV' for the `awk' program to deal with. As soon as it
+sees an unknown option, `gawk' stops looking for other options that it
+might otherwise recognize. The previous command line with `gawk' would
+be:
+
+ gawk -f myprog.awk -q -v file1 file2 ...
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Because '-q' is not a valid 'gawk' option, it and the following '-v' are
passed on to the 'awk' program. (*Note Getopt Function::, for an 'awk'
@@ -10649,7 +11515,8 @@ array element value:
Index 0 Value 8
Index 2 Value ""
-The pairs are shown in jumbled order because their order is irrelevant.
+The pairs are shown in jumbled order because their order is
+irrelevant.(1)
One advantage of associative arrays is that new pairs can be added at
any time. For example, suppose a tenth element is added to the array
@@ -10678,9 +11545,16 @@ from English to French:
Here we decided to translate the number one in both spelled-out and
numeric form--thus illustrating that a single array can have both
numbers and strings as indices. (In fact, array subscripts are always
+<<<<<<< HEAD
strings; this is discussed in more detail in *note Numeric Array
Subscripts::.) Here, the number '1' isn't double-quoted, since 'awk'
automatically converts it to a string.
+=======
+strings. There are some subtleties to how numbers work when used as
+array subscripts; this is discussed in more detail in *note Numeric
+Array Subscripts::.) Here, the number `1' isn't double-quoted, since
+`awk' automatically converts it to a string.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
The value of 'IGNORECASE' has no effect upon array subscripting. The
identical string value used to store an array element must be used to
@@ -10691,6 +11565,11 @@ starting at one. (*Note String Functions::.)
'awk''s arrays are efficient--the time to access an element is
independent of the number of elements in the array.
+ ---------- Footnotes ----------
+
+ (1) The ordering will vary among `awk' implementations, which
+typically use hash tables to store array elements and values.
+

File: gawk.info, Node: Reference to Elements, Next: Assigning Elements, Prev: Array Intro, Up: Array Basics
@@ -10725,8 +11604,14 @@ been assigned any value as well as elements that have been deleted
# Check if "foo" exists in a: Incorrect!
if (a["foo"] != "") ...
+<<<<<<< HEAD
This is incorrect, since this will _create_ 'a["foo"]' if it didn't
exist before!
+=======
+ This is incorrect for two reasons. First, it _creates_ `a["foo"]'
+ if it didn't exist before! Second, it is valid (if a bit unusual)
+ to set an array element equal to the empty string.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
To determine whether an element exists in an array at a certain
index, use the following expression:
@@ -10735,9 +11620,16 @@ index, use the following expression:
This expression tests whether the particular index INDX exists, without
the side effect of creating that element if it is not present. The
+<<<<<<< HEAD
expression has the value one (true) if 'ARRAY[INDX]' exists and zero
(false) if it does not exist. For example, this statement tests whether
the array 'frequencies' contains the index '2':
+=======
+expression has the value one (true) if `ARRAY[INDX]' exists and zero
+(false) if it does not exist. (We use INDX here, since `index' is the
+name of a built-in function.) For example, this statement tests
+whether the array `frequencies' contains the index `2':
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
if (2 in frequencies)
print "Subscript 2 is present."
@@ -10900,7 +11792,11 @@ all 'awk' versions do so. Consider this program, named 'loopcheck.awk':
-| a
-| is
+<<<<<<< HEAD
Contrast this to Brian Kernighan's 'awk':
+=======
+ Contrast this to BWK `awk':
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
$ nawk -f loopcheck.awk
-| loop
@@ -11106,9 +12002,15 @@ 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
+<<<<<<< HEAD
'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::).
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
The following statement provides a portable but nonobvious way to
clear out an array:(1)
@@ -11197,7 +12099,7 @@ might look like this:
> line 2
> line 3' | awk '{ l[lines] = $0; ++lines }
> END {
- > for (i = lines-1; i >= 0; --i)
+ > for (i = lines - 1; i >= 0; i--)
> print l[i]
> }'
-| line 3
@@ -11218,7 +12120,7 @@ following version of the program works correctly:
{ l[lines++] = $0 }
END {
- for (i = lines - 1; i >= 0; --i)
+ for (i = lines - 1; i >= 0; i--)
print l[i]
}
@@ -11277,10 +12179,11 @@ multidimensional array, use the same operator ('in') that is used for
single dimensional arrays. Write the whole sequence of indices in
parentheses, separated by commas, as the left operand:
- (SUBSCRIPT1, SUBSCRIPT2, ...) in ARRAY
+ if ((SUBSCRIPT1, SUBSCRIPT2, ...) in ARRAY)
+ ...
- The following example treats its input as a two-dimensional array of
-fields; it rotates this array 90 degrees clockwise and prints the
+ Here is an example that treats its input as a two-dimensional array
+of fields; it rotates this array 90 degrees clockwise and prints the
result. It assumes that all lines have the same number of elements:
{
@@ -11660,7 +12563,8 @@ with numbers. Optional parameters are enclosed in square brackets ([ ]):
'log(X)'
Return the natural logarithm of X, if X is positive; otherwise,
- report an error.
+ return `NaN' ("not a number") on IEEE 754 systems. Additionally,
+ `gawk' prints a warning message when `x' is negative.
'rand()'
Return a random number. The values of 'rand()' are uniformly
@@ -11731,6 +12635,9 @@ with numbers. Optional parameters are enclosed in square brackets ([ ]):
easy to keep track of the seeds in case you need to consistently
reproduce sequences of random numbers.
+ POSIX does not specify the initial seed; it differs among `awk'
+ implementations.
+
---------- Footnotes ----------
(1) The C version of 'rand()' on many Unix systems is known to
@@ -12235,12 +13142,21 @@ Options::):
also returned if LENGTH is greater than the number of characters
remaining in the string, counting from character START.
+<<<<<<< HEAD
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.
+=======
+ If START is less than one, `substr()' treats it as if it was one.
+ (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.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
The string returned by 'substr()' _cannot_ be assigned. Thus, it
is a mistake to attempt to change a portion of a string, as shown
@@ -12296,9 +13212,19 @@ File: gawk.info, Node: Gory Details, Up: String Functions
9.1.3.1 More About '\' and '&' with 'sub()', 'gsub()', and 'gensub()'
.....................................................................
+<<<<<<< HEAD
When using 'sub()', 'gsub()', or 'gensub()', and trying to get literal
backslashes and ampersands into the replacement text, you need to
remember that there are several levels of "escape processing" going on.
+=======
+ CAUTION: This section has been known to cause headaches. You
+ might want to skip it upon first reading.
+
+ When using `sub()', `gsub()', or `gensub()', and trying to get
+literal backslashes and ampersands into the replacement text, you need
+to remember that there are several levels of "escape processing" going
+on.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
First, there is the "lexical" level, which is when 'awk' reads your
program and builds an internal copy of it to execute. Then there is the
@@ -12310,6 +13236,7 @@ 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
+<<<<<<< HEAD
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"'.
@@ -12334,6 +13261,32 @@ is illustrated in *note Table 9.1: table-sub-escapes.
Table 9.1: Historical Escape Sequence Processing for 'sub()' and
'gsub()'
+=======
+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.
+Historically, the `sub()' and `gsub()' functions treated the two
+character sequence `\&' specially; this sequence was replaced in the
+generated text with a single `&'. Any other `\' within the REPLACEMENT
+string that did not precede an `&' was passed through unchanged. This
+is illustrated in *note table-sub-escapes::.
+
+ You type `sub()' sees `sub()' generates
+ ------- --------- --------------
+ `\&' `&' The matched text
+ `\\&' `\&' A literal `&'
+ `\\\&' `\&' A literal `&'
+ `\\\\&' `\\&' A literal `\&'
+ `\\\\\&' `\\&' A literal `\&'
+ `\\\\\\&' `\\\&' A literal `\\&'
+ `\\q' `\q' A literal `\q'
+
+Table 9.1: Historical Escape Sequence Processing for `sub()' and
+`gsub()'
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
This table shows both the lexical-level processing, where an odd number
of backslashes becomes an even number at the runtime level, as well as
@@ -12342,6 +13295,7 @@ the rest of the following tables only show the case of even numbers of
backslashes entered at the lexical level.)
The problem with the historical approach is that there is no way to
+<<<<<<< HEAD
get a literal '\' followed by the matched text.
The 1992 POSIX standard attempted to fix this problem. That standard
@@ -12388,6 +13342,29 @@ table-sub-proposed.
'\\\\' '\\' '\\'
Table 9.3: Proposed Rules For 'sub()' And Backslash
+=======
+get a literal `\' followed by the matched text.
+
+ Several editions of the POSIX standard attempted to fix this problem
+but weren't successful. The details are irrelevant at this point in
+time.
+
+ At one point, the `gawk' maintainer submitted proposed text for a
+revised standard that reverts to rules that correspond more closely to
+the original existing practice. The proposed rules have special cases
+that make it possible to produce a `\' preceding the matched text.
+This is shown in *note table-sub-proposed::.
+
+ You type `sub()' sees `sub()' generates
+ ------- --------- --------------
+ `\\\\\\&' `\\\&' A literal `\&'
+ `\\\\&' `\\&' A literal `\', followed by the matched text
+ `\\&' `\&' A literal `&'
+ `\\q' `\q' A literal `\q'
+ `\\\\' `\\' `\\'
+
+Table 9.2: GNU `awk' Rules For `sub()' And Backslash
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
In a nutshell, at the runtime level, there are now three special
sequences of characters ('\\\&', '\\&' and '\&') whereas historically
@@ -12395,17 +13372,26 @@ there was only one. However, as in the historical case, any '\' that is
not part of one of these three sequences is not special and appears in
the output literally.
+<<<<<<< HEAD
'gawk' 3.0 and 3.1 follow these proposed POSIX rules for 'sub()' and
'gsub()'. The POSIX standard took much longer to be revised than was
expected in 1996. The 2001 standard does not follow the above rules.
Instead, the rules there are somewhat simpler. The results are similar
except for one case.
+=======
+ `gawk' 3.0 and 3.1 follow these rules for `sub()' and `gsub()'. The
+POSIX standard took much longer to be revised than was expected. In
+addition, the `gawk' maintainer's proposal was lost during the
+standardization process. The final rules are somewhat simpler. The
+results are similar except for one case.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
The POSIX rules state that '\&' in the replacement string produces a
literal '&', '\\' produces a literal '\', and '\' followed by anything
else is not special; the '\' is placed straight into the output. These
rules are presented in *note Table 9.4: table-posix-sub.
+<<<<<<< HEAD
You type 'sub()' sees 'sub()' generates
----- ------- ----------
'\\\\\\&' '\\\&' a literal '\&'
@@ -12415,10 +13401,22 @@ rules are presented in *note Table 9.4: table-posix-sub.
'\\\\' '\\' '\'
Table 9.4: POSIX Rules For 'sub()' And 'gsub()'
+=======
+ You type `sub()' sees `sub()' generates
+ ------- --------- --------------
+ `\\\\\\&' `\\\&' A literal `\&'
+ `\\\\&' `\\&' A literal `\', followed by the matched text
+ `\\&' `\&' A literal `&'
+ `\\q' `\q' A literal `\q'
+ `\\\\' `\\' `\'
+
+Table 9.3: POSIX Rules For `sub()' And `gsub()'
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
The only case where the difference is noticeable is the last one:
'\\\\' is seen as '\\' and produces '\' instead of '\\'.
+<<<<<<< HEAD
Starting with version 3.1.4, 'gawk' followed the POSIX rules when
'--posix' is specified (*note Options::). Otherwise, it continued to
follow the 1996 proposed rules, since that had been its behavior for
@@ -12429,6 +13427,18 @@ rules the default, breaking well over a decade's worth of backwards
compatibility.(2) Needless to say, this was a bad idea, and as of
version 4.0.1, 'gawk' resumed its historical behavior, and only follows
the POSIX rules when '--posix' is given.
+=======
+ Starting with version 3.1.4, `gawk' followed the POSIX rules when
+`--posix' is specified (*note Options::). Otherwise, it continued to
+follow the proposed rules, since that had been its behavior for many
+years.
+
+ When version 4.0.0 was released, the `gawk' maintainer made the
+POSIX rules the default, breaking well over a decade's worth of
+backwards compatibility.(1) Needless to say, this was a bad idea, and
+as of version 4.0.1, `gawk' resumed its historical behavior, and only
+follows the POSIX rules when `--posix' is given.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
The rules for 'gensub()' are considerably simpler. At the runtime
level, whenever 'gawk' sees a '\', if the following character is a
@@ -12437,6 +13447,7 @@ subexpression is placed in the generated output. Otherwise, no matter
what character follows the '\', it appears in the generated text and the
'\' does not, as shown in *note Table 9.5: table-gensub-escapes.
+<<<<<<< HEAD
You type 'gensub()' sees 'gensub()' generates
----- --------- ------------
'&' '&' the matched text
@@ -12447,6 +13458,18 @@ what character follows the '\', it appears in the generated text and the
'\\q' '\q' a literal 'q'
Table 9.5: Escape Sequence Processing For 'gensub()'
+=======
+ You type `gensub()' sees `gensub()' generates
+ ------- ------------ -----------------
+ `&' `&' The matched text
+ `\\&' `\&' A literal `&'
+ `\\\\' `\\' A literal `\'
+ `\\\\&' `\\&' A literal `\', then the matched text
+ `\\\\\\&' `\\\&' A literal `\&'
+ `\\q' `\q' A literal `q'
+
+Table 9.4: Escape Sequence Processing For `gensub()'
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Because of the complexity of the lexical and runtime level processing
and the special cases for 'sub()' and 'gsub()', we recommend the use of
@@ -12465,9 +13488,7 @@ Although this makes a certain amount of sense, it can be surprising.
---------- Footnotes ----------
- (1) This consequence was certainly unintended.
-
- (2) This was rather naive of him, despite there being a note in this
+ (1) This was rather naive of him, despite there being a note in this
section indicating that the next major version would move to the POSIX
rules.
@@ -12514,10 +13535,17 @@ parameters are enclosed in square brackets ([ ]):
function--'gawk' also buffers its output and the 'fflush()'
function forces 'gawk' to flush its buffers.
+<<<<<<< HEAD
'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
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(http://austingroupbugs.net/view.php?id=634).
POSIX standardizes 'fflush()' as follows: If there is no argument,
@@ -12994,7 +14022,7 @@ bitwise AND, OR, and XOR. The operations are described in *note Table
0 | 0 0 | 0 1 | 0 1
1 | 0 1 | 1 1 | 1 0
-Table 9.6: Bitwise Operations
+Table 9.5: Bitwise Operations
As you can see, the result of an AND operation is 1 only when _both_
bits are 1. The result of an OR operation is 1 if _either_ bit is 1.
@@ -13192,8 +14220,16 @@ File: gawk.info, Node: Definition Syntax, Next: Function Example, Up: User-de
9.2.1 Function Definition Syntax
--------------------------------
+<<<<<<< HEAD
Definitions of functions can appear anywhere between the rules of an
'awk' program. Thus, the general form of an 'awk' program is extended
+=======
+ It's entirely fair to say that the `awk' syntax for local variable
+ definitions is appallingly awful. -- Brian Kernighan
+
+ Definitions of functions can appear anywhere between the rules of an
+`awk' program. Thus, the general form of an `awk' program is extended
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
to include sequences of rules _and_ user-defined function definitions.
There is no need to put the definition of a function before all uses of
the function. This is because 'awk' reads the entire program before
@@ -13221,8 +14257,13 @@ call.
have a parameter with the same name as the function itself. In
addition, according to the POSIX standard, function parameters cannot
have the same name as one of the special built-in variables (*note
+<<<<<<< HEAD
Built-in Variables::). Not all versions of 'awk' enforce this
restriction.)
+=======
+Built-in Variables::). Not all versions of `awk' enforce this
+restriction.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Local variables act like the empty string if referenced where a
string value is required, and like zero if referenced where a numeric
@@ -13328,7 +14369,8 @@ this program, using our function to format the results, prints:
5.6
21.2
- This function deletes all the elements in an array:
+ This function deletes all the elements in an array (recall that the
+extra whitespace signifies the start of the local variable list):
function delarray(a, i)
{
@@ -13347,22 +14389,22 @@ standard.)
The following is an example of a recursive function. It takes a
string as an input parameter and returns the string in backwards order.
Recursive functions must always have a test that stops the recursion.
-In this case, the recursion terminates when the starting position is
-zero, i.e., when there are no more characters left in the string.
+In this case, the recursion terminates when the input string is already
+empty.
- function rev(str, start)
+ function rev(str)
{
- if (start == 0)
+ if (str == "")
return ""
- return (substr(str, start, 1) rev(str, start - 1))
+ return (rev(substr(str, 2)) substr(str, 1, 1))
}
If this function is in a file named 'rev.awk', it can be tested this
way:
$ echo "Don't Panic!" |
- > gawk --source '{ print rev($0, length($0)) }' -f rev.awk
+ > gawk -e '{ print rev($0) }' -f rev.awk
-| !cinaP t'noD
The C 'ctime()' function takes a timestamp and returns it in a
@@ -13611,8 +14653,13 @@ function _are_ visible outside that function.
a[1], a[2], a[3]
}
+<<<<<<< HEAD
prints 'a[1] = 1, a[2] = two, a[3] = 3', because 'changeit' stores
'"two"' in the second element of 'a'.
+=======
+ prints `a[1] = 1, a[2] = two, a[3] = 3', because `changeit()'
+ stores `"two"' in the second element of `a'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Some 'awk' implementations allow you to call a function that has not
been defined. They only report a problem at runtime when the program
@@ -13760,7 +14807,11 @@ File: gawk.info, Node: Indirect Calls, Next: Functions Summary, Prev: User-de
9.3 Indirect Function Calls
===========================
+<<<<<<< HEAD
This section describes a 'gawk'-specific extension.
+=======
+This section describes an advanced, `gawk'-specific extension.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Often, you may wish to defer the choice of function to call until
runtime. For example, you may have different kinds of records, each of
@@ -13798,8 +14849,13 @@ your test scores:
}
This style of programming works, but can be awkward. With "indirect"
+<<<<<<< HEAD
function calls, you tell 'gawk' to use the _value_ of a variable as the
name of the function to call.
+=======
+function calls, you tell `gawk' to use the _value_ of a variable as the
+_name_ of the function to call.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
The syntax is similar to that of a regular function call: an
identifier immediately followed by a left parenthesis, any arguments,
@@ -13841,7 +14897,6 @@ using indirect function calls.
Otherwise they perform the expected computations and are not unusual.
# For each record, print the class name and the requested statistics
-
{
class_name = $1
gsub(/_/, " ", class_name) # Replace _ with spaces
@@ -14028,11 +15083,19 @@ names of the two comparison functions:
Remember that you must supply a leading '@' in front of an indirect
function call.
+<<<<<<< HEAD
Unfortunately, indirect function calls cannot be used with the
built-in functions. However, you can generally write "wrapper"
functions which call the built-in ones, and those can be called
indirectly. (Other than, perhaps, the mathematical functions, there is
not a lot of reason to try to call the built-in functions indirectly.)
+=======
+ Starting with version 4.1.2 of `gawk', indirect function calls may
+also be used with built-in functions and with extension functions
+(*note Dynamic Extensions::). The only thing you cannot do is pass a
+regular expression constant to a built-in function through an indirect
+function call.(1)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
'gawk' does its best to make indirect function calls efficient. For
example, in the following case:
@@ -14040,7 +15103,16 @@ example, in the following case:
for (i = 1; i <= n; i++)
@the_func()
+<<<<<<< HEAD
'gawk' will look up the actual function to call only once.
+=======
+`gawk' looks up the actual function to call only once.
+
+ ---------- Footnotes ----------
+
+ (1) This may change in a future version; recheck the documentation
+that comes with your version of `gawk' to see if it has.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Functions Summary, Prev: Indirect Calls, Up: Functions
@@ -14076,8 +15148,15 @@ File: gawk.info, Node: Functions Summary, Prev: Indirect Calls, Up: Functions
whitespace.
* User-defined functions may call other user-defined (and built-in)
+<<<<<<< HEAD
functions and may call themselves recursively. Function parameters
"hide" any global variables of the same names.
+=======
+ functions and may call themselves recursively. Function parameters
+ "hide" any global variables of the same names. You cannot use the
+ name of a reserved variable (such as `ARGC') as the name of a
+ parameter in user-defined functions.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Scalar values are passed to user-defined functions by value. Array
parameters are passed by reference; any changes made by the
@@ -14092,10 +15171,18 @@ File: gawk.info, Node: Functions Summary, Prev: Indirect Calls, Up: Functions
function, how that function treats the variable can set its nature:
either scalar or array.
+<<<<<<< HEAD
* 'gawk' provides indirect function calls using a special syntax. By
setting a variable to the name of a user-defined function, you can
determine at runtime what function will be called at that point in
the program. This is equivalent to function pointers in C and C++.
+=======
+ * `gawk' provides indirect function calls using a special syntax.
+ By setting a variable to the name of a function, you can determine
+ at runtime what function will be called at that point in the
+ program. This is equivalent to function pointers in C and C++.
+
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Library Functions, Next: Sample Programs, Prev: Functions, Up: Top
@@ -14121,9 +15208,15 @@ P.J. Plauger wrote:
In fact, they felt this idea was so important that they placed this
statement on the cover of their book. Because we believe strongly that
+<<<<<<< HEAD
their statement is correct, this major node and *note Sample Programs::,
provide a good-sized body of code for you to read, and we hope, to learn
from.
+=======
+their statement is correct, this major node and *note Sample
+Programs::, provide a good-sized body of code for you to read and, we
+hope, to learn from.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
This major node presents a library of useful 'awk' functions. Many
of the sample programs presented later in this Info file use these
@@ -14174,7 +15267,7 @@ for different implementations of 'awk' is pretty straightforward.
* Group Functions:: Functions for getting group information.
* Walking Arrays:: A function to walk arrays of arrays.
* Library Functions Summary:: Summary of library functions.
-* Library exercises:: Exercises.
+* Library Exercises:: Exercises.
---------- Footnotes ----------
@@ -14309,8 +15402,9 @@ versions of 'awk':
ret = 0
for (i = 1; i <= n; i++) {
c = substr(str, i, 1)
- if ((k = index("01234567", c)) > 0)
- k-- # adjust for 1-basing in awk
+ # index() returns 0 if c not in string,
+ # includes c == "0"
+ k = index("1234567", c)
ret = ret * 8 + k
}
@@ -14322,6 +15416,8 @@ versions of 'awk':
for (i = 1; i <= n; i++) {
c = substr(str, i, 1)
c = tolower(c)
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("123456789abcdef", c)
ret = ret * 16 + k
@@ -14601,8 +15697,7 @@ use on some older systems, they are not really worth worrying about:
}
#### test code ####
- # BEGIN \
- # {
+ # BEGIN {
# for (;;) {
# printf("enter a character: ")
# if (getline var <= 0)
@@ -15268,8 +16363,7 @@ option, and it ends option processing. Continuing on:
i = index(options, thisopt)
if (i == 0) {
if (Opterr)
- printf("%c -- invalid option\n",
- thisopt) > "/dev/stderr"
+ printf("%c -- invalid option\n", thisopt) > "/dev/stderr"
if (_opti >= length(argv[Optind])) {
Optind++
_opti = 0
@@ -15723,8 +16817,7 @@ the same names:
# group.awk --- functions for dealing with the group file
- BEGIN \
- {
+ BEGIN {
# Change to suit your system
_gr_awklib = "/usr/local/libexec/awk/"
}
@@ -15928,7 +17021,7 @@ value. Here is a main program to demonstrate:
-| a[3] = 3

-File: gawk.info, Node: Library Functions Summary, Next: Library exercises, Prev: Walking Arrays, Up: Library Functions
+File: gawk.info, Node: Library Functions Summary, Next: Library Exercises, Prev: Walking Arrays, Up: Library Functions
10.8 Summary
============
@@ -15964,7 +17057,7 @@ File: gawk.info, Node: Library Functions Summary, Next: Library exercises, Pr
A simple function to traverse an array of arrays to any depth.

-File: gawk.info, Node: Library exercises, Prev: Library Functions Summary, Up: Library Functions
+File: gawk.info, Node: Library Exercises, Prev: Library Functions Summary, Up: Library Functions
10.9 Exercises
==============
@@ -16145,8 +17238,7 @@ through the command-line options. Exactly one of the variables
should be done by fields or by characters, respectively. When cutting
by characters, the output field separator is set to the null string:
- BEGIN \
- {
+ BEGIN {
FS = "\t" # default
OFS = FS
while ((c = getopt(ARGC, ARGV, "sf:c:d:")) != -1) {
@@ -16530,8 +17622,7 @@ line is printed, with a leading file name and colon if necessary:
The 'END' rule takes care of producing the correct exit status. If
there are no matches, the exit status is one; otherwise it is zero:
- END \
- {
+ END {
exit (total == 0)
}
@@ -16549,6 +17640,7 @@ options, and then exits:
The variable 'e' is used so that the function fits nicely on the
printed page.
+<<<<<<< HEAD
Just a note on programming style: you may have noticed that the 'END'
rule uses backslash continuation, with the open brace on a line by
itself. This is so that it more closely resembles the way functions are
@@ -16556,6 +17648,8 @@ written. Many of the examples in this major node use this style. You
can decide for yourself if you like writing your 'BEGIN' and 'END' rules
this way or not.
+=======
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
---------- Footnotes ----------
(1) It also introduces a subtle bug; if a match happens, we output
@@ -16598,8 +17692,7 @@ the group numbers:
# uid=12(foo) euid=34(bar) gid=3(baz) \
# egid=5(blat) groups=9(nine),2(two),1(one)
- BEGIN \
- {
+ BEGIN {
uid = PROCINFO["uid"]
euid = PROCINFO["euid"]
gid = PROCINFO["gid"]
@@ -16806,8 +17899,7 @@ by setting 'ARGV[1]' to '"-"' and 'ARGC' to two:
# Copy standard input to all named output files.
# Append content if -a option is supplied.
#
- BEGIN \
- {
+ BEGIN {
for (i = 1; i < ARGC; i++)
copy[i] = ARGV[i]
@@ -16857,8 +17949,7 @@ statements, while the second executes N'*'M 'if' statements.
Finally, the 'END' rule cleans up by closing all the output files:
- END \
- {
+ END {
for (i in copy)
close(copy[i])
}
@@ -16945,8 +18036,7 @@ standard output, '/dev/stdout':
# -n skip n fields
# +n skip n characters, skip fields first
- BEGIN \
- {
+ BEGIN {
count = 1
outputfile = "/dev/stdout"
opts = "udc0:1:2:3:4:5:6:7:8:9:"
@@ -16958,7 +18048,7 @@ standard output, '/dev/stdout':
else if (c == "c")
do_count++
else if (index("0123456789", c) != 0) {
- # getopt requires args to options
+ # getopt() requires args to options
# this messes us up for things like -5
if (Optarg ~ /^[[:digit:]]+$/)
fcount = (c Optarg) + 0
@@ -17334,8 +18424,7 @@ Statement::), but the processing could be done with a series of
# Requires getlocaltime() library function
# usage: alarm time [ "message" [ count [ delay ] ] ]
- BEGIN \
- {
+ BEGIN {
# Initial argument sanity checking
usage1 = "usage: alarm time ['message' [count [delay]]]"
usage2 = sprintf("\t(%s) time ::= hh:mm", ARGV[1])
@@ -17548,6 +18637,10 @@ array only once, in a 'BEGIN' rule. However, this assumes that the
"from" and "to" lists will never change throughout the lifetime of the
program.
+ Another obvious improvement is to enable the use of ranges, such as
+`a-z', as allowed by the `tr' utility. Look at the code for `cut.awk'
+(*note Cut Program::) for inspiration.
+
---------- Footnotes ----------
(1) On some older systems, including Solaris, the system version of
@@ -17555,8 +18648,13 @@ program.
in square brackets ('[a-z]') and quoted, to prevent the shell from
attempting a file name expansion. This is not a feature.
+<<<<<<< HEAD
(2) This program was written before 'gawk' acquired the ability to
split each character in a string into separate array elements.
+=======
+ (2) This program was also written before `gawk' acquired the ability
+to split each character in a string into separate array elements.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Labels Program, Next: Word Sorting, Prev: Translate Program, Up: Miscellaneous Programs
@@ -17655,8 +18753,7 @@ not have been an even multiple of 20 labels in the data:
Count++
}
- END \
- {
+ END {
printpage()
}
@@ -18148,8 +19245,13 @@ language.(1) It works as follows:
2. For any arguments that do represent 'awk' text, put the arguments
into a shell variable that will be expanded. There are two cases:
+<<<<<<< HEAD
a. Literal text, provided with '--source' or '--source='. This
text is just appended directly.
+=======
+ a. Literal text, provided with `-e' or `--source'. This text is
+ just appended directly.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
b. Source file names, provided with '-f'. We use a neat trick
and append '@include FILENAME' to the shell variable's
@@ -18638,14 +19740,30 @@ File: gawk.info, Node: Programs Exercises, Prev: Programs Summary, Up: Sample
Program::) to accept the same arguments and perform in the same
way.
+<<<<<<< HEAD
4. The 'split.awk' program (*note Split Program::) uses the 'chr()'
and 'ord()' functions to move through the letters of the alphabet.
Modify the program to instead use only the 'awk' built-in
functions, such as 'index()' and 'substr()'.
5. The 'split.awk' program (*note Split Program::) assumes that
+=======
+ 4. The `split.awk' program (*note Split Program::) assumes that
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
letters are contiguous in the character set, which isn't true for
- EBCDIC systems. Fix this problem.
+ EBCDIC systems. Fix this problem. (Hint: Consider a different
+ way to work through the alphabet, without relying on `ord()' and
+ `chr()'.)
+
+ 5. In `uniq.awk' (*note Uniq Program::, the logic for choosing which
+ lines to print represents a "state machine", which is "a device
+ that can be in one of a set number of stable conditions depending
+ on its previous condition and on the present values of its
+ inputs."(1) Brian Kernighan suggests that "an alternative approach
+ to state mechines is to just read the input into an array, then
+ use indexing. It's almost always easier code, and for most inputs
+ where you would use this, just as fast." Rewrite the logic to
+ follow this suggestion.
6. Why can't the 'wc.awk' program (*note Wc Program::) just use the
value of 'FNR' in 'endfile()'? Hint: Examine the code in *note
@@ -18706,6 +19824,11 @@ File: gawk.info, Node: Programs Exercises, Prev: Programs Summary, Up: Sample
13. Modify 'anagram.awk' (*note Anagram Program::), to avoid the use
of the external 'sort' utility.
+ ---------- Footnotes ----------
+
+ (1) This is the definition returned from entering `define: state
+machine' into Google.
+

File: gawk.info, Node: Advanced Features, Next: Internationalization, Prev: Sample Programs, Up: Top
@@ -19144,24 +20267,7 @@ File: gawk.info, Node: Two-way I/O, Next: TCP/IP Networking, Prev: Array Sort
12.3 Two-Way Communications with Another Process
================================================
- From: brennan@whidbey.com (Mike Brennan)
- Newsgroups: comp.lang.awk
- Subject: Re: Learn the SECRET to Attract Women Easily
- Date: 4 Aug 1997 17:34:46 GMT
- Message-ID: <5s53rm$eca@news.whidbey.com>
-
- On 3 Aug 1997 13:17:43 GMT, Want More Dates???
- <tracy78@kilgrona.com> wrote:
- >Learn the SECRET to Attract Women Easily
- >
- >The SCENT(tm) Pheromone Sex Attractant For Men to Attract Women
-
- The scent of awk programmers is a lot more attractive to women than
- the scent of perl programmers.
- --
- Mike Brennan
-
- It is often useful to be able to send data to a separate program for
+It is often useful to be able to send data to a separate program for
processing and then read the result. This can always be done with
temporary files:
@@ -19177,6 +20283,7 @@ temporary files:
close(tempfile)
system("rm " tempfile)
+<<<<<<< HEAD
This works, but not elegantly. Among other things, it requires that the
program be run in a directory that cannot be shared among users; for
example, '/tmp' will not do, as another user might happen to be using a
@@ -19186,6 +20293,16 @@ temporary file with the same name.
another process. The second process is termed a "coprocess", since it
runs in parallel with 'gawk'. The two-way connection is created using
the '|&' operator (borrowed from the Korn shell, 'ksh'):(1)
+=======
+This works, but not elegantly. Among other things, it requires that
+the program be run in a directory that cannot be shared among users;
+for example, `/tmp' will not do, as another user might happen to be
+using a temporary file with the same name.(1) However, with `gawk', it
+is possible to open a _two-way_ pipe to another process. The second
+process is termed a "coprocess", since it runs in parallel with `gawk'.
+The two-way connection is created using the `|&' operator (borrowed
+from the Korn shell, `ksh'):(2)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
do {
print DATA |& "subprogram"
@@ -19271,7 +20388,11 @@ using regular pipes.
---------- Footnotes ----------
- (1) This is very different from the same operator in the C shell and
+ (1) Michael Brennan suggests the use of `rand()' to generate unique
+file names. This is a valid point; nevertheless, temporary files remain
+more difficult than two-way pipes.
+
+ (2) This is very different from the same operator in the C shell and
in Bash.

@@ -19294,7 +20415,11 @@ network connection.
You can think of this as just a _very long_ two-way pipeline to a
coprocess. The way 'gawk' decides that you want to use TCP/IP
networking is by recognizing special file names that begin with one of
+<<<<<<< HEAD
'/inet/', '/inet4/' or '/inet6'.
+=======
+`/inet/', `/inet4/' or `/inet6/'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
The full syntax of the special file name is
'/NET-TYPE/PROTOCOL/LOCAL-PORT/REMOTE-HOST/REMOTE-PORT'. The components
@@ -19763,11 +20888,19 @@ are:
Text-collation information; i.e., how different characters and/or
groups of characters sort in a given language.
+<<<<<<< HEAD
'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::).
+=======
+`LC_CTYPE'
+ Character-type information (alphabetic, digit, upper- or
+ 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::).
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
'LC_MONETARY'
Monetary information, such as the currency symbol, and whether the
@@ -19777,11 +20910,15 @@ are:
Numeric information, such as which characters to use for the
decimal point and the thousands separator.(2)
+<<<<<<< HEAD
'LC_RESPONSE'
Response information, such as how "yes" and "no" appear in the
local language, and possibly other information as well.
'LC_TIME'
+=======
+`LC_TIME'
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Time- and date-related information, such as 12- or 24-hour clock,
month printed before or after the day in a date, local month
abbreviations, and so on.
@@ -19877,17 +21014,36 @@ 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
+<<<<<<< HEAD
them, using the 'dcgettext()' built-in function:
+=======
+ them, using the `dcgettext()' built-in function:(1)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
- 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.
+<<<<<<< HEAD
4. During development, you might want to put the '.gmo' file in a
+=======
+ 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
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
private directory for testing. This is done with the
'bindtextdomain()' built-in function:
@@ -19905,6 +21061,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
@@ -19939,6 +21099,7 @@ create the initial '.pot' file:
$ gawk --gen-pot -f guide.awk > guide.pot
+<<<<<<< HEAD
When run with '--gen-pot', 'gawk' does not execute your program.
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
@@ -19946,6 +21107,18 @@ 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'.
+=======
+ When run with `--gen-pot', `gawk' does not execute your program.
+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) 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'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
---------- Footnotes ----------
@@ -20162,8 +21335,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:
@@ -20415,7 +21587,7 @@ are given on the command line as arguments to one or more '-f' options.
('gawk' is not designed to debug command-line programs, only programs
contained in files.) In our case, we invoke the debugger like this:
- $ gawk -D -f getopt.awk -f join.awk -f uniq.awk inputfile
+ $ gawk -D -f getopt.awk -f join.awk -f uniq.awk -1 inputfile
where both 'getopt.awk' and 'uniq.awk' are in '$AWKPATH'. (Experienced
users of GDB or similar debuggers should note that this syntax is
@@ -20467,7 +21639,7 @@ for a breakpoint in 'uniq.awk' is at the beginning of the function
To set the breakpoint, use the 'b' (breakpoint) command:
gawk> b are_equal
- -| Breakpoint 1 set at file `awklib/eg/prog/uniq.awk', line 64
+ -| Breakpoint 1 set at file `awklib/eg/prog/uniq.awk', line 63
The debugger tells us the file and line number where the breakpoint
is. Now type 'r' or 'run' and the program runs until it hits the
@@ -20477,8 +21649,8 @@ breakpoint for the first time:
-| Starting program:
-| Stopping in Rule ...
-| Breakpoint 1, are_equal(n, m, clast, cline, alast, aline)
- at `awklib/eg/prog/uniq.awk':64
- -| 64 if (fcount == 0 && charcount == 0)
+ at `awklib/eg/prog/uniq.awk':63
+ -| 63 if (fcount == 0 && charcount == 0)
gawk>
Now we can look at what's going on inside our program. First of all,
@@ -20488,14 +21660,22 @@ current stack frames:
gawk> bt
-| #0 are_equal(n, m, clast, cline, alast, aline)
- at `awklib/eg/prog/uniq.awk':69
- -| #1 in main() at `awklib/eg/prog/uniq.awk':89
+ at `awklib/eg/prog/uniq.awk':68
+ -| #1 in main() at `awklib/eg/prog/uniq.awk':88
+<<<<<<< HEAD
This tells us that 'are_equal()' was called by the main program at
line 89 of 'uniq.awk'. (This is not a big surprise, since this is the
only call to 'are_equal()' in the program, but in more complex programs,
knowing who called a function and with what parameters can be the key to
finding the source of the problem.)
+=======
+ This tells us that `are_equal()' was called by the main program at
+line 88 of `uniq.awk'. (This is not a big surprise, since this is the
+only call to `are_equal()' in the program, but in more complex
+programs, knowing who called a function and with what parameters can be
+the key to finding the source of the problem.)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Now that we're in 'are_equal()', we can start looking at the values
of some variables. Let's say we type 'p n' ('p' is short for "print").
@@ -20511,13 +21691,13 @@ was called without arguments (*note Function Calls::).
A more useful variable to display might be the current record:
gawk> p $0
- -| $0 = string ("gawk is a wonderful program!")
+ -| $0 = "gawk is a wonderful program!"
This might be a bit puzzling at first since this is the second line of
our test input above. Let's look at 'NR':
gawk> p NR
- -| NR = number (2)
+ -| NR = 2
So we can see that 'are_equal()' was only called for the second record
of the file. Of course, this is because our program contains a rule for
@@ -20531,7 +21711,7 @@ of the file. Of course, this is because our program contains a rule for
OK, let's just check that that rule worked correctly:
gawk> p last
- -| last = string ("awk is a wonderful program!")
+ -| last = "awk is a wonderful program!"
Everything we have done so far has verified that the program has
worked as planned, up to and including the call to 'are_equal()', so the
@@ -20540,38 +21720,47 @@ begin "stepping through" the lines of 'are_equal()'. We start by typing
'n' (for "next"):
gawk> n
- -| 67 if (fcount > 0) {
+ -| 66 if (fcount > 0) {
+<<<<<<< HEAD
This tells us that 'gawk' is now ready to execute line 67, which
decides whether to give the lines the special "field skipping" treatment
indicated by the '-f' command-line option. (Notice that we skipped from
where we were before at line 64 to here, since the condition in line 64
'if (fcount == 0 && charcount == 0)' was false.)
+=======
+ This tells us that `gawk' is now ready to execute line 66, which
+decides whether to give the lines the special "field skipping" treatment
+indicated by the `-1' command-line option. (Notice that we skipped
+from where we were before at line 63 to here, since the condition in
+line 63 `if (fcount == 0 && charcount == 0)' was false.)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Continuing to step, we now get to the splitting of the current and
last records:
gawk> n
- -| 68 n = split(last, alast)
+ -| 67 n = split(last, alast)
gawk> n
- -| 69 m = split($0, aline)
+ -| 68 m = split($0, aline)
At this point, we should be curious to see what our records were
split into, so we try to look:
gawk> p n m alast aline
- -| n = number (5)
- -| m = number (5)
+ -| n = 5
+ -| m = untyped variable
-| alast = array, 5 elements
- -| aline = array, 5 elements
+ -| aline = untyped variable
(The 'p' command can take more than one argument, similar to 'awk''s
'print' statement.)
This is kind of disappointing, though. All we found out is that
-there are five elements in each of our arrays. Useful enough (we now
-know that none of the words were accidentally left out), but what if we
-want to see inside the array?
+there are five elements in `alast'; `m' and `aline' don't have values
+yet since we are at line 68 but haven't executed it yet. This
+information is useful enough (we now know that none of the words were
+accidentally left out), but what if we want to see inside the array?
The first choice would be to use subscripts:
@@ -20581,25 +21770,25 @@ want to see inside the array?
Oops!
gawk> p alast[1]
- -| alast["1"] = string ("awk")
+ -| alast["1"] = "awk"
This would be kind of slow for a 100-member array, though, so 'gawk'
provides a shortcut (reminiscent of another language not to be
mentioned):
gawk> p @alast
- -| alast["1"] = string ("awk")
- -| alast["2"] = string ("is")
- -| alast["3"] = string ("a")
- -| alast["4"] = string ("wonderful")
- -| alast["5"] = string ("program!")
+ -| alast["1"] = "awk"
+ -| alast["2"] = "is"
+ -| alast["3"] = "a"
+ -| alast["4"] = "wonderful"
+ -| alast["5"] = "program!"
It looks like we got this far OK. Let's take another step or two:
gawk> n
- -| 70 clast = join(alast, fcount, n)
+ -| 69 clast = join(alast, fcount, n)
gawk> n
- -| 71 cline = join(aline, fcount, m)
+ -| 70 cline = join(aline, fcount, m)
Well, here we are at our error (sorry to spoil the suspense). What
we had in mind was to join the fields starting from the second one to
@@ -20607,8 +21796,8 @@ make the virtual record to compare, and if the first field was numbered
zero, this would work. Let's look at what we've got:
gawk> p cline clast
- -| cline = string ("gawk is a wonderful program!")
- -| clast = string ("awk is a wonderful program!")
+ -| cline = "gawk is a wonderful program!"
+ -| clast = "awk is a wonderful program!"
Hey, those look pretty familiar! They're just our original,
unaltered, input records. A little thinking (the human brain is still
@@ -21243,7 +22432,11 @@ some limitations. A few which are worth being aware of are:
what your mistake was, though, you'll feel like a real guru.
* If you perused the dump of opcodes in *note Miscellaneous Debugger
+<<<<<<< HEAD
Commands::, (or if you are already familiar with 'gawk' internals),
+=======
+ Commands:: (or if you are already familiar with `gawk' internals),
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
you will realize that much of the internal manipulation of data in
'gawk', as in many interpreters, is done on a stack. 'Op_push',
'Op_pop', etc., are the "bread and butter" of most 'gawk' code.
@@ -21286,9 +22479,15 @@ File: gawk.info, Node: Debugging Summary, Prev: Limitations, Up: Debugger
Debugger, GDB.
* Debuggers let you step through your program one statement at a
+<<<<<<< HEAD
time, examine and change variable and array values, and do a number
of other things that let understand what your program is actually
doing (as opposed to what it is supposed to do).
+=======
+ time, examine and change variable and array values, and do a
+ number of other things that let you understand what your program
+ is actually doing (as opposed to what it is supposed to do).
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Like most debuggers, the 'gawk' debugger works in terms of stack
frames, and lets you set both breakpoints (stop at a point in the
@@ -21318,6 +22517,10 @@ continues on to present arbitrary precision integers, and concludes with
a description of some points where 'gawk' and the POSIX standard are not
quite in agreement.
+ NOTE: Most users of `gawk' can safely skip this chapter. But if
+ you want to do scientific calculations with `gawk', this is the
+ place to be.
+
* Menu:
* Computer Arithmetic:: A quick intro to computer math.
@@ -21451,9 +22654,24 @@ material here.
another number and infinity produce infinity.
"NaN"
+<<<<<<< HEAD
"Not A Number." A special value indicating a result that can't
happen in real math, but that can happen in floating-point
computations.
+=======
+ "Not A Number."(1). A special value that results from attempting a
+ calculation that has no answer as a real number. In such a case,
+ programs can either receive a floating-point exception, or get
+ `NaN' back as the result. The IEEE 754 standard recommends that
+ systems return `NaN'. Some examples:
+
+ `sqrt(-1)'
+ This makes sense in the range of complex numbers, but not in
+ the range of real numbers, so the result is `NaN'.
+
+ `log(-8)'
+ -8 is out of the domain of `log()', so the result is `NaN'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
"Normalized"
How the significand (see later in this list) is usually stored.
@@ -21511,6 +22729,11 @@ Table 15.1: Basic IEEE Format Context Values
NOTE: The precision numbers include the implied leading one that
gives them one extra bit of significand.
+ ---------- Footnotes ----------
+
+ (1) Thanks to Michael Brennan for this description, which I have
+paraphrased, and for the examples
+

File: gawk.info, Node: MPFR features, Next: FP Math Caution, Prev: Math Definitions, Up: Arbitrary Precision Arithmetic
@@ -21539,10 +22762,16 @@ Auto-set::).
The MPFR library provides precise control over precisions and
rounding modes, and gives correctly rounded, reproducible,
+<<<<<<< HEAD
platform-independent results. With either of the command-line options
'--bignum' or '-M', all floating-point arithmetic operators and numeric
functions can yield results to any desired precision level supported by
MPFR.
+=======
+platform-independent results. With the `-M' command-line option, all
+floating-point arithmetic operators and numeric functions can yield
+results to any desired precision level supported by MPFR.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Two built-in variables, 'PREC' and 'ROUNDMODE', provide control over
the working precision and the rounding mode. The precision and the
@@ -21555,8 +22784,12 @@ File: gawk.info, Node: FP Math Caution, Next: Arbitrary Precision Integers, P
15.4 Floating Point Arithmetic: Caveat Emptor!
==============================================
+<<<<<<< HEAD
Math class is tough!
-- _Late 1980's Barbie_
+=======
+ Math class is tough! -- Teen Talk Barbie, July 1992
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
This minor node provides a high level overview of the issues involved
when doing lots of floating-point arithmetic.(1) The discussion applies
@@ -21838,10 +23071,17 @@ on arithmetic operations:
constant.
If you need to represent a floating-point constant at a higher
+<<<<<<< HEAD
precision than the default and cannot use a command line assignment
to 'PREC', you should either specify the constant as a string, or
as a rational number, whenever possible. The following example
illustrates the differences among various ways to print a
+=======
+ precision than the default and cannot use a command-line
+ assignment to `PREC', you should either specify the constant as a
+ string, or as a rational number, whenever possible. The following
+ example illustrates the differences among various ways to print a
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
floating-point constant:
$ gawk -M 'BEGIN { PREC = 113; printf("%0.25f\n", 0.1) }'
@@ -21950,6 +23190,7 @@ File: gawk.info, Node: Arbitrary Precision Integers, Next: POSIX Floating Poin
15.5 Arbitrary Precision Integer Arithmetic with 'gawk'
=======================================================
+<<<<<<< HEAD
When given one of the options '--bignum' or '-M', 'gawk' performs all
integer arithmetic using GMP arbitrary precision integers. Any number
that looks like an integer in a source or data file is stored as an
@@ -21957,6 +23198,15 @@ arbitrary precision integer. The size of the integer is limited only by
the available memory. For example, the following computes 5^4^3^2, the
result of which is beyond the limits of ordinary hardware
double-precision floating point values:
+=======
+When given the `-M' option, `gawk' performs all integer arithmetic
+using GMP arbitrary precision integers. Any number that looks like an
+integer in a source or data file is stored as an arbitrary precision
+integer. The size of the integer is limited only by the available
+memory. For example, the following computes 5^4^3^2, the result of
+which is beyond the limits of ordinary hardware double-precision
+floating point values:
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
$ gawk -M 'BEGIN {
> x = 5^4^3^2
@@ -22138,9 +23388,15 @@ File: gawk.info, Node: Floating point summary, Prev: POSIX Floating Point Prob
floating-point values. The default for 'awk' is to use
double-precision floating-point values.
+<<<<<<< HEAD
* In the 1980's, Barbie mistakenly said "Math class is tough!" While
math isn't tough, floating-point arithmetic isn't the same as
pencil and paper math, and care must be taken:
+=======
+ * In the early 1990's, Barbie mistakenly said "Math class is tough!"
+ While math isn't tough, floating-point arithmetic isn't the same
+ as pencil and paper math, and care must be taken:
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
- Not all numbers can be represented exactly.
@@ -22156,6 +23412,7 @@ File: gawk.info, Node: Floating point summary, Prev: POSIX Floating Point Prob
* Often, increasing the accuracy and then rounding to the desired
number of digits produces reasonable results.
+<<<<<<< HEAD
* Use either '-M' or '--bignum' to enable MPFR arithmetic. Use
'PREC' to set the precision in bits, and 'ROUNDMODE' to set the
IEEE 754 rounding mode.
@@ -22163,6 +23420,15 @@ File: gawk.info, Node: Floating point summary, Prev: POSIX Floating Point Prob
* With '-M' or '--bignum', 'gawk' performs arbitrary precision
integer arithmetic using the GMP library. This is faster and more
space efficient than using MPFR for the same calculations.
+=======
+ * Use `-M' (or `--bignum') to enable MPFR arithmetic. Use `PREC' to
+ set the precision in bits, and `ROUNDMODE' to set the IEEE 754
+ rounding mode.
+
+ * With `-M', `gawk' performs arbitrary precision integer arithmetic
+ using the GMP library. This is faster and more space efficient
+ than using MPFR for the same calculations.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* There are several "dark corners" with respect to floating-point
numbers where 'gawk' disagrees with the POSIX standard. It pays to
@@ -22356,8 +23622,13 @@ Example::) and also the 'testext.c' code for testing the APIs.
Some other bits and pieces:
+<<<<<<< HEAD
* The API provides access to 'gawk''s 'do_XXX' values, reflecting
command line options, like 'do_lint', 'do_profiling' and so on
+=======
+ * The API provides access to `gawk''s `do_XXX' values, reflecting
+ command-line options, like `do_lint', `do_profiling' and so on
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(*note Extension API Variables::). These are informational: an
extension cannot affect their values inside 'gawk'. In addition,
attempting to assign to them produces a compile-time error.
@@ -22479,7 +23750,11 @@ operations:
place '-Dinline=''' on your command line, or use the GNU Autotools
and include a 'config.h' file in your extensions.
+<<<<<<< HEAD
* All pointers filled in by 'gawk' are to memory managed by 'gawk'
+=======
+ * All pointers filled in by `gawk' point to memory managed by `gawk'
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
and should be treated by the extension as read-only. Memory for
_all_ strings passed into 'gawk' from the extension _must_ come
from calling the API-provided function pointers 'api_malloc()',
@@ -22885,7 +24160,7 @@ File: gawk.info, Node: Exit Callback Functions, Next: Extension Version String
An "exit callback" function is a function that 'gawk' calls before it
exits. Such functions are useful if you have general "cleanup" tasks
-that should be performed in your extension (such as closing data base
+that should be performed in your extension (such as closing database
connections or other resource deallocations). You can register such a
function with 'gawk' using the following function.
@@ -25930,7 +27205,7 @@ current version of 'gawk'.
- Indirect function calls (*note Indirect Calls::).
- Directories on the command line produce a warning and are
- skipped (*note Command line directories::).
+ skipped (*note Command-line directories::).
* New keywords:
@@ -25979,8 +27254,13 @@ current version of 'gawk'.
- The 'bindtextdomain()', 'dcgettext()' and 'dcngettext()'
functions for internationalization (*note Programmer i18n::).
+<<<<<<< HEAD
- The 'fflush()' function from Brian Kernighan's version of
'awk' (*note I/O Functions::).
+=======
+ - The `fflush()' function from BWK `awk' (*note I/O
+ Functions::).
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
- The 'gensub()', 'patsplit()', and 'strtonum()' functions for
more powerful text manipulation (*note String Functions::).
@@ -25990,6 +27270,7 @@ current version of 'gawk'.
* Changes and/or additions in the command-line options:
+<<<<<<< HEAD
- The 'AWKPATH' environment variable for specifying a path
search for the '-f' command-line option (*note Options::).
@@ -26008,6 +27289,26 @@ current version of 'gawk'.
'--pretty-print', '--profile', '--re-interval', '--sandbox',
'--source', '--traditional', '--use-lc-numeric', and
'--version' long options (*note Options::).
+=======
+ - The `AWKPATH' environment variable for specifying a path
+ search for the `-f' command-line option (*note Options::).
+
+ - The `AWKLIBPATH' environment variable for specifying a path
+ search for the `-l' command-line option (*note Options::).
+
+ - The `-b', `-c', `-C', `-d', `-D', `-e', `-E', `-g', `-h',
+ `-i', `-l', `-L', `-M', `-n', `-N', `-o', `-O', `-p', `-P',
+ `-r', `-S', `-t', and `-V' short options. Also, the ability
+ to use GNU-style long-named options that start with `--' and
+ the `--assign', `--bignum', `--characters-as-bytes',
+ `--copyright', `--debug', `--dump-variables', `--exec',
+ `--field-separator', `--file', `--gen-pot', `--help',
+ `--include', `--lint', `--lint-old', `--load',
+ `--non-decimal-data', `--optimize', `--posix',
+ `--pretty-print', `--profile', `--re-interval', `--sandbox',
+ `--source', `--traditional', `--use-lc-numeric', and
+ `--version' long options (*note Options::).
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Support for the following obsolete systems was removed from the
code and the documentation for 'gawk' version 4.0:
@@ -26041,6 +27342,12 @@ current version of 'gawk'.
- Ultrix
+<<<<<<< HEAD
+=======
+ * Support for MirBSD was removed at `gawk' version 4.2.
+
+
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

File: gawk.info, Node: Feature History, Next: Common Extensions, Prev: POSIX/GNU, Up: Language History
@@ -26098,7 +27405,7 @@ POSIX 'awk', in the order they were added to 'gawk'.
* The ability to delete all of an array at once with 'delete ARRAY'
(*note Delete::).
- * Command line option changes (*note Options::):
+ * Command-line option changes (*note Options::):
- The ability to use GNU-style long-named options that start
with '--'.
@@ -26132,18 +27439,29 @@ POSIX 'awk', in the order they were added to 'gawk'.
* The 'next file' statement became 'nextfile' (*note Nextfile
Statement::).
+<<<<<<< HEAD
* 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::).
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
- * New command line options:
+ * New command-line options:
- The '--lint-old' option to warn about constructs that are not
available in the original Version 7 Unix version of 'awk'
(*note V7/SVR3.1::).
+<<<<<<< HEAD
- 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'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
- The '--re-interval' option to provide interval expressions in
regexps (*note Regexp Operators::).
@@ -26302,9 +27620,15 @@ 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::).
+<<<<<<< HEAD
* 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::).
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* The 'isarray()' function which distinguishes if an item is an array
or not, to make it possible to traverse arrays of arrays (*note
@@ -26327,7 +27651,7 @@ POSIX 'awk', in the order they were added to 'gawk'.
* 'switch' / 'case' are enabled by default (*note Switch
Statement::).
- * Command line option changes (*note Options::):
+ * Command-line option changes (*note Options::):
- The '-b' and '--characters-as-bytes' options which prevent
'gawk' from treating input as a multibyte string.
@@ -26344,8 +27668,13 @@ POSIX 'awk', in the order they were added to 'gawk'.
in '#!' scripts.
* Directories named on the command line now produce a warning, not a
+<<<<<<< HEAD
fatal error, unless '--posix' or '--traditional' are used (*note
Command line directories::).
+=======
+ fatal error, unless `--posix' or `--traditional' are used (*note
+ Command-line directories::).
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* The 'gawk' internals were rewritten, bringing the 'dgawk' debugger
and possibly improved performance (*note Debugger::).
@@ -26393,11 +27722,16 @@ POSIX 'awk', in the order they were added to 'gawk'.
* Three new arrays: 'SYMTAB', 'FUNCTAB', and
'PROCINFO["identifiers"]' (*note Auto-set::).
+<<<<<<< HEAD
* The three executables 'gawk', 'pgawk', and 'dgawk', were merged
into one, named just 'gawk'. As a result the command line options
+=======
+ * The three executables `gawk', `pgawk', and `dgawk', were merged
+ into one, named just `gawk'. As a result the command-line options
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
changed.
- * Command line option changes (*note Options::):
+ * Command-line option changes (*note Options::):
- The '-D' option invokes the debugger.
@@ -27442,7 +28776,7 @@ These give the same result as the '-W BINMODE=2' option in 'mawk'. The
following changes the record separator to '"\r\n"' and sets binary mode
on reads, but does not affect the mode on standard input:
- gawk -v RS="\r\n" --source "BEGIN { BINMODE = 1 }" ...
+ gawk -v RS="\r\n" -e "BEGIN { BINMODE = 1 }" ...
or:
@@ -27909,6 +29243,7 @@ Unix 'awk'
The project seems to be frozen; no new code changes have been made
since approximately 2003.
+<<<<<<< HEAD
'pawk'
Nelson H.F. Beebe at the University of Utah has modified Brian
Kernighan's 'awk' to provide timing and profiling information. It
@@ -27917,6 +29252,16 @@ Unix 'awk'
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>.
+=======
+`pawk'
+ 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'.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
Busybox Awk
Busybox is a GPL-licensed program providing small versions of many
@@ -27955,11 +29300,19 @@ Libmawk
This is an embeddable 'awk' interpreter derived from 'mawk'. For
more information see <http://repo.hu/projects/libmawk/>.
+<<<<<<< HEAD
'pawk'
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.)
+=======
+`pawk'
+ 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 BWK `awk', described earlier.)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
QSE Awk
This is an embeddable 'awk' interpreter. For more information see
@@ -28779,8 +30132,13 @@ C.7 Summary
option or with the '--posix' option. The '--parsedebug' option is
available if 'gawk' is compiled with '-DDEBUG'.
+<<<<<<< HEAD
* The source code for 'gawk' is maintained in a publicly accessable
Git repository. Anyone may check it out and view the source.
+=======
+ * The source code for `gawk' is maintained in a publicly accessible
+ Git repository. Anyone may check it out and view the source.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Contributions to 'gawk' are welcome. Following the steps outlined
in this major node will make it easier to integrate your
@@ -30831,6 +32189,7 @@ Index
(line 6)
* '!' (exclamation point), '!~' operator <4>: Comparison Operators.
(line 11)
+<<<<<<< HEAD
* '!' (exclamation point), '!~' operator <5>: Comparison Operators.
(line 98)
* '!' (exclamation point), '!~' operator <6>: Precedence. (line 79)
@@ -30840,6 +32199,15 @@ Index
* '"' (double quote), in regexp constants: Computed Regexps. (line 29)
* '"' (double quote), in shell commands: Quoting. (line 54)
* '#' (number sign), '#!' (executable scripts): Executable Scripts.
+=======
+* ! (exclamation point), !~ operator <4>: Regexp Constants. (line 6)
+* ! (exclamation point), !~ operator <5>: Case-sensitivity. (line 26)
+* ! (exclamation point), !~ operator <6>: Computed Regexps. (line 6)
+* ! (exclamation point), !~ operator: Regexp Usage. (line 19)
+* " (double quote), in regexp constants: Computed Regexps. (line 29)
+* " (double quote), in shell commands: Quoting. (line 54)
+* # (number sign), #! (executable scripts): Executable Scripts.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 6)
* '#' (number sign), commenting: Comments. (line 6)
* '$' (dollar sign), '$' field operator: Fields. (line 19)
@@ -30854,6 +32222,7 @@ Index
* '&' (ampersand), '&&' operator <1>: Precedence. (line 85)
* '&' (ampersand), 'gsub()'/'gensub()'/'sub()' functions and: Gory Details.
(line 6)
+<<<<<<< HEAD
* ''' (single quote): One-shot. (line 15)
* ''' (single quote) in 'gawk' command lines: Long. (line 33)
* ''' (single quote), in shell commands: Quoting. (line 48)
@@ -30896,6 +32265,47 @@ Index
* '--copyright' option: Options. (line 89)
* '--debug' option: Options. (line 108)
* '--disable-extensions' configuration option: Additional Configuration Options.
+=======
+* ' (single quote): One-shot. (line 15)
+* ' (single quote) in gawk command lines: Long. (line 33)
+* ' (single quote), in shell commands: Quoting. (line 48)
+* ' (single quote), vs. apostrophe: Comments. (line 27)
+* ' (single quote), with double quotes: Quoting. (line 70)
+* () (parentheses), in a profile: Profiling. (line 146)
+* () (parentheses), regexp operator: Regexp Operators. (line 81)
+* * (asterisk), * operator, as multiplication operator: Precedence.
+ (line 55)
+* * (asterisk), * operator, as regexp operator: Regexp Operators.
+ (line 89)
+* * (asterisk), * operator, null strings, matching: Gory Details.
+ (line 143)
+* * (asterisk), ** operator <1>: Precedence. (line 49)
+* * (asterisk), ** operator: Arithmetic Ops. (line 81)
+* * (asterisk), **= operator <1>: Precedence. (line 95)
+* * (asterisk), **= operator: Assignment Ops. (line 130)
+* * (asterisk), *= operator <1>: Precedence. (line 95)
+* * (asterisk), *= operator: Assignment Ops. (line 130)
+* + (plus sign), + operator: Precedence. (line 52)
+* + (plus sign), ++ operator <1>: Precedence. (line 46)
+* + (plus sign), ++ operator: Increment Ops. (line 11)
+* + (plus sign), += operator <1>: Precedence. (line 95)
+* + (plus sign), += operator: Assignment Ops. (line 82)
+* + (plus sign), regexp operator: Regexp Operators. (line 105)
+* , (comma), in range patterns: Ranges. (line 6)
+* - (hyphen), - operator: Precedence. (line 52)
+* - (hyphen), -- operator <1>: Precedence. (line 46)
+* - (hyphen), -- operator: Increment Ops. (line 48)
+* - (hyphen), -= operator <1>: Precedence. (line 95)
+* - (hyphen), -= operator: Assignment Ops. (line 130)
+* - (hyphen), filenames beginning with: Options. (line 59)
+* - (hyphen), in bracket expressions: Bracket Expressions. (line 17)
+* --assign option: Options. (line 32)
+* --bignum option: Options. (line 205)
+* --characters-as-bytes option: Options. (line 68)
+* --copyright option: Options. (line 88)
+* --debug option: Options. (line 108)
+* --disable-extensions configuration option: Additional Configuration Options.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 9)
* '--disable-lint' configuration option: Additional Configuration Options.
(line 15)
@@ -30942,6 +32352,7 @@ Index
* '--version' option: Options. (line 295)
* '--with-whiny-user-strftime' configuration option: Additional Configuration Options.
(line 35)
+<<<<<<< HEAD
* '-b' option: Options. (line 69)
* '-c' option: Options. (line 82)
* '-C' option: Options. (line 89)
@@ -30954,6 +32365,21 @@ Index
* '-f' option <1>: Options. (line 25)
* '-F' option, '-Ft' sets 'FS' to TAB: Options. (line 303)
* '-F' option, command line: Command Line Field Separator.
+=======
+* -b option: Options. (line 68)
+* -C option: Options. (line 88)
+* -c option: Options. (line 81)
+* -D option: Options. (line 108)
+* -d option: Options. (line 93)
+* -e option: Options. (line 333)
+* -E option: Options. (line 125)
+* -e option: Options. (line 117)
+* -f option: Options. (line 25)
+* -F option: Options. (line 21)
+* -f option: Long. (line 12)
+* -F option, -Ft sets FS to TAB: Options. (line 306)
+* -F option, command-line: Command Line Field Separator.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 6)
* '-f' option, multiple uses: Options. (line 308)
* '-g' option: Options. (line 147)
@@ -31021,6 +32447,7 @@ Index
* '>' (right angle bracket), '>' operator (I/O): Redirection. (line 22)
* '>' (right angle bracket), '>=' operator: Comparison Operators.
(line 11)
+<<<<<<< HEAD
* '>' (right angle bracket), '>=' operator <1>: Precedence. (line 64)
* '>' (right angle bracket), '>>' operator (I/O): Redirection.
(line 50)
@@ -31054,6 +32481,72 @@ Index
* '\' (backslash), regexp operator: Regexp Operators. (line 18)
* '\' (backslash), '\"' escape sequence: Escape Sequences. (line 76)
* '\' (backslash), '\'' operator ('gawk'): GNU Regexp Operators.
+=======
+* > (right angle bracket), >> operator (I/O) <1>: Precedence. (line 65)
+* > (right angle bracket), >> operator (I/O): Redirection. (line 50)
+* ? (question mark), ?: operator: Precedence. (line 92)
+* ? (question mark), regexp operator <1>: GNU Regexp Operators.
+ (line 59)
+* ? (question mark), regexp operator: Regexp Operators. (line 111)
+* @-notation for indirect function calls: Indirect Calls. (line 47)
+* @include directive: Include Files. (line 8)
+* @load directive: Loading Shared Libraries.
+ (line 8)
+* [] (square brackets), regexp operator: Regexp Operators. (line 56)
+* \ (backslash): Comments. (line 50)
+* \ (backslash), \" escape sequence: Escape Sequences. (line 84)
+* \ (backslash), \' operator (gawk): GNU Regexp Operators.
+ (line 56)
+* \ (backslash), \/ escape sequence: Escape Sequences. (line 75)
+* \ (backslash), \< operator (gawk): GNU Regexp Operators.
+ (line 30)
+* \ (backslash), \> operator (gawk): GNU Regexp Operators.
+ (line 34)
+* \ (backslash), \` operator (gawk): GNU Regexp Operators.
+ (line 54)
+* \ (backslash), \a escape sequence: Escape Sequences. (line 34)
+* \ (backslash), \b escape sequence: Escape Sequences. (line 38)
+* \ (backslash), \B operator (gawk): GNU Regexp Operators.
+ (line 43)
+* \ (backslash), \f escape sequence: Escape Sequences. (line 41)
+* \ (backslash), \n escape sequence: Escape Sequences. (line 44)
+* \ (backslash), \NNN escape sequence: Escape Sequences. (line 56)
+* \ (backslash), \r escape sequence: Escape Sequences. (line 47)
+* \ (backslash), \S operator (gawk): GNU Regexp Operators.
+ (line 17)
+* \ (backslash), \s operator (gawk): GNU Regexp Operators.
+ (line 13)
+* \ (backslash), \t escape sequence: Escape Sequences. (line 50)
+* \ (backslash), \v escape sequence: Escape Sequences. (line 53)
+* \ (backslash), \W operator (gawk): GNU Regexp Operators.
+ (line 26)
+* \ (backslash), \w operator (gawk): GNU Regexp Operators.
+ (line 21)
+* \ (backslash), \x escape sequence: Escape Sequences. (line 61)
+* \ (backslash), \y operator (gawk): GNU Regexp Operators.
+ (line 38)
+* \ (backslash), as field separator: Command Line Field Separator.
+ (line 27)
+* \ (backslash), continuing lines and: Statements/Lines. (line 19)
+* \ (backslash), continuing lines and, comments and: Statements/Lines.
+ (line 76)
+* \ (backslash), continuing lines and, in csh: Statements/Lines.
+ (line 44)
+* \ (backslash), gsub()/gensub()/sub() functions and: Gory Details.
+ (line 6)
+* \ (backslash), in bracket expressions: Bracket Expressions. (line 17)
+* \ (backslash), in escape sequences: Escape Sequences. (line 6)
+* \ (backslash), in escape sequences, POSIX and: Escape Sequences.
+ (line 120)
+* \ (backslash), in regexp constants: Computed Regexps. (line 29)
+* \ (backslash), in shell commands: Quoting. (line 48)
+* \ (backslash), regexp operator: Regexp Operators. (line 18)
+* ^ (caret), ^ operator: Precedence. (line 49)
+* ^ (caret), ^= operator <1>: Precedence. (line 95)
+* ^ (caret), ^= operator: Assignment Ops. (line 130)
+* ^ (caret), in bracket expressions: Bracket Expressions. (line 17)
+* ^ (caret), in FS: Regexp Field Splitting.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 59)
* '\' (backslash), '\/' escape sequence: Escape Sequences. (line 69)
* '\' (backslash), '\<' operator ('gawk'): GNU Regexp Operators.
@@ -31141,7 +32634,7 @@ Index
* advanced features, network programming: TCP/IP Networking. (line 6)
* advanced features, nondecimal input data: Nondecimal Data. (line 6)
* advanced features, processes, communicating with: Two-way I/O.
- (line 23)
+ (line 6)
* advanced features, specifying field content: Splitting By Content.
(line 10)
* Aho, Alfred: History. (line 17)
@@ -31151,6 +32644,7 @@ Index
* algorithms: Basic High Level. (line 57)
* allocating memory for extensions: Memory Allocation Functions.
(line 6)
+<<<<<<< HEAD
* Alpha (DEC): Manual History. (line 28)
* amazing 'awk' assembler ('aaa'): Glossary. (line 11)
* amazingly workable formatter ('awf'): Glossary. (line 24)
@@ -31159,6 +32653,15 @@ Index
* ampersand ('&'), '&&' operator: Boolean Ops. (line 57)
* ampersand ('&'), '&&' operator <1>: Precedence. (line 85)
* ampersand ('&'), 'gsub()'/'gensub()'/'sub()' functions and: Gory Details.
+=======
+* amazing awk assembler (aaa): Glossary. (line 11)
+* amazingly workable formatter (awf): Glossary. (line 24)
+* ambiguity, syntactic: /= operator vs. /=.../ regexp constant: Assignment Ops.
+ (line 148)
+* ampersand (&), && operator <1>: Precedence. (line 86)
+* ampersand (&), && operator: Boolean Ops. (line 57)
+* ampersand (&), gsub()/gensub()/sub() functions and: Gory Details.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 6)
* 'anagram.awk' program: Anagram Program. (line 22)
* anagrams, finding: Anagram Program. (line 6)
@@ -31179,11 +32682,20 @@ Index
* 'ARGC'/'ARGV' variables: Auto-set. (line 15)
* 'ARGC'/'ARGV' variables, command-line arguments: Other Arguments.
(line 12)
+<<<<<<< HEAD
* 'ARGC'/'ARGV' variables, how to use: ARGC and ARGV. (line 6)
* 'ARGC'/'ARGV' variables, portability and: Executable Scripts.
(line 42)
* 'ARGIND' variable: Auto-set. (line 44)
* 'ARGIND' variable, command-line arguments: Other Arguments. (line 12)
+=======
+* ARGC/ARGV variables, how to use: ARGC and ARGV. (line 6)
+* ARGC/ARGV variables, portability and: Executable Scripts. (line 59)
+* ARGIND variable: Auto-set. (line 44)
+* ARGIND variable, command-line arguments: Other Arguments. (line 12)
+* arguments, command-line <1>: ARGC and ARGV. (line 6)
+* arguments, command-line <2>: Auto-set. (line 15)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* arguments, command-line: Other Arguments. (line 6)
* arguments, command-line <1>: Auto-set. (line 15)
* arguments, command-line <2>: ARGC and ARGV. (line 6)
@@ -31201,7 +32713,11 @@ Index
* arrays: Arrays. (line 6)
* arrays of arrays: Arrays of Arrays. (line 6)
* arrays, an example of using: Array Example. (line 6)
+<<<<<<< HEAD
* arrays, and 'IGNORECASE' variable: Array Intro. (line 91)
+=======
+* arrays, and IGNORECASE variable: Array Intro. (line 94)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* arrays, as parameters to functions: Pass By Value/Reference.
(line 46)
* arrays, associative: Array Intro. (line 48)
@@ -31229,7 +32745,11 @@ Index
(line 6)
* arrays, sorting, and 'IGNORECASE' variable: Array Sorting Functions.
(line 83)
+<<<<<<< HEAD
* arrays, sparse: Array Intro. (line 70)
+=======
+* arrays, sparse: Array Intro. (line 72)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* arrays, subscripts, uninitialized variables as: Uninitialized Subscripts.
(line 6)
* arrays, unassigned elements: Reference to Elements.
@@ -31257,6 +32777,7 @@ Index
* assignment operators, evaluation order: Assignment Ops. (line 110)
* assignment operators, lvalues/rvalues: Assignment Ops. (line 31)
* assignments as filenames: Ignoring Assigns. (line 6)
+<<<<<<< HEAD
* associative arrays: Array Intro. (line 48)
* asterisk ('*'), '*' operator, as multiplication operator: Precedence.
(line 54)
@@ -31323,12 +32844,77 @@ Index
* 'awk', versions of <1>: V7/SVR3.1. (line 6)
* 'awk', versions of, changes between SVR3.1 and SVR4: SVR4. (line 6)
* 'awk', versions of, changes between SVR4 and POSIX 'awk': POSIX.
+=======
+* associative arrays: Array Intro. (line 50)
+* asterisk (*), * operator, as multiplication operator: Precedence.
+ (line 55)
+* asterisk (*), * operator, as regexp operator: Regexp Operators.
+ (line 89)
+* asterisk (*), * operator, null strings, matching: Gory Details.
+ (line 143)
+* asterisk (*), ** operator <1>: Precedence. (line 49)
+* asterisk (*), ** operator: Arithmetic Ops. (line 81)
+* asterisk (*), **= operator <1>: Precedence. (line 95)
+* asterisk (*), **= operator: Assignment Ops. (line 130)
+* asterisk (*), *= operator <1>: Precedence. (line 95)
+* asterisk (*), *= operator: Assignment Ops. (line 130)
+* atan2: Numeric Functions. (line 11)
+* automatic displays, in debugger: Debugger Info. (line 24)
+* awf (amazingly workable formatter) program: Glossary. (line 24)
+* awk debugging, enabling: Options. (line 108)
+* awk language, POSIX version: Assignment Ops. (line 137)
+* awk profiling, enabling: Options. (line 240)
+* awk programs <1>: Two Rules. (line 6)
+* awk programs <2>: Executable Scripts. (line 6)
+* awk programs: Getting Started. (line 12)
+* awk programs, complex: When. (line 27)
+* awk programs, documenting <1>: Library Names. (line 6)
+* awk programs, documenting: Comments. (line 6)
+* awk programs, examples of: Sample Programs. (line 6)
+* awk programs, execution of: Next Statement. (line 16)
+* awk programs, internationalizing <1>: Programmer i18n. (line 6)
+* awk programs, internationalizing: I18N Functions. (line 6)
+* awk programs, lengthy: Long. (line 6)
+* awk programs, lengthy, assertions: Assert Function. (line 6)
+* awk programs, location of: Options. (line 25)
+* awk programs, one-line examples: Very Simple. (line 45)
+* awk programs, profiling: Profiling. (line 6)
+* awk programs, running <1>: Long. (line 6)
+* awk programs, running: Running gawk. (line 6)
+* awk programs, running, from shell scripts: One-shot. (line 22)
+* awk programs, running, without input files: Read Terminal. (line 17)
+* awk programs, shell variables in: Using Shell Variables.
+ (line 6)
+* awk, function of: Getting Started. (line 6)
+* awk, gawk and <1>: This Manual. (line 14)
+* awk, gawk and: Preface. (line 21)
+* awk, history of: History. (line 17)
+* awk, implementation issues, pipes: Redirection. (line 135)
+* awk, implementations: Other Versions. (line 6)
+* awk, implementations, limits: Getline Notes. (line 14)
+* awk, invoking: Command Line. (line 6)
+* awk, new vs. old: Names. (line 6)
+* awk, new vs. old, OFMT variable: Strings And Numbers. (line 57)
+* awk, POSIX and: Preface. (line 21)
+* awk, POSIX and, See Also POSIX awk: Preface. (line 21)
+* awk, regexp constants and: Comparison Operators.
+ (line 102)
+* awk, See Also gawk: Preface. (line 34)
+* awk, terms describing: This Manual. (line 6)
+* awk, uses for <1>: When. (line 6)
+* awk, uses for <2>: Getting Started. (line 12)
+* awk, uses for: Preface. (line 21)
+* awk, versions of: V7/SVR3.1. (line 6)
+* awk, versions of, changes between SVR3.1 and SVR4: SVR4. (line 6)
+* awk, versions of, changes between SVR4 and POSIX awk: POSIX.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 6)
* 'awk', versions of, changes between V7 and SVR3.1: V7/SVR3.1.
(line 6)
* 'awk', versions of, See Also Brian Kernighan's 'awk': BTL. (line 6)
* 'awk', versions of, See Also Brian Kernighan's 'awk' <1>: Other Versions.
(line 13)
+<<<<<<< HEAD
* 'awka' compiler for 'awk': Other Versions. (line 64)
* 'AWKLIBPATH' environment variable: AWKLIBPATH Variable. (line 6)
* 'AWKPATH' environment variable: AWKPATH Variable. (line 6)
@@ -31347,6 +32933,31 @@ Index
* backslash ('\'), continuing lines and, comments and: Statements/Lines.
(line 75)
* backslash ('\'), continuing lines and, in 'csh': Statements/Lines.
+=======
+* awk, versions of, See Also Brian Kernighan's awk: BTL. (line 6)
+* awka compiler for awk: Other Versions. (line 64)
+* AWKLIBPATH environment variable: AWKLIBPATH Variable. (line 6)
+* AWKPATH environment variable <1>: PC Using. (line 10)
+* AWKPATH environment variable: AWKPATH Variable. (line 6)
+* awkprof.out file: Profiling. (line 6)
+* awksed.awk program: Simple Sed. (line 25)
+* awkvars.out file: Options. (line 93)
+* b debugger command (alias for break): Breakpoint Control. (line 11)
+* backslash (\): Comments. (line 50)
+* backslash (\), \" escape sequence: Escape Sequences. (line 84)
+* backslash (\), \' operator (gawk): GNU Regexp Operators.
+ (line 56)
+* backslash (\), \/ escape sequence: Escape Sequences. (line 75)
+* backslash (\), \< operator (gawk): GNU Regexp Operators.
+ (line 30)
+* backslash (\), \> operator (gawk): GNU Regexp Operators.
+ (line 34)
+* backslash (\), \` operator (gawk): GNU Regexp Operators.
+ (line 54)
+* backslash (\), \a escape sequence: Escape Sequences. (line 34)
+* backslash (\), \b escape sequence: Escape Sequences. (line 38)
+* backslash (\), \B operator (gawk): GNU Regexp Operators.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 43)
* backslash ('\'), 'gsub()'/'gensub()'/'sub()' functions and: Gory Details.
(line 6)
@@ -31377,6 +32988,7 @@ Index
* backslash ('\'), '\r' escape sequence: Escape Sequences. (line 47)
* backslash ('\'), '\s' operator ('gawk'): GNU Regexp Operators.
(line 13)
+<<<<<<< HEAD
* backslash ('\'), '\S' operator ('gawk'): GNU Regexp Operators.
(line 17)
* backslash ('\'), '\t' escape sequence: Escape Sequences. (line 50)
@@ -31391,6 +33003,35 @@ Index
* backslash ('\'), '\`' operator ('gawk'): GNU Regexp Operators.
(line 57)
* 'backtrace' debugger command: Execution Stack. (line 13)
+=======
+* backslash (\), \t escape sequence: Escape Sequences. (line 50)
+* backslash (\), \v escape sequence: Escape Sequences. (line 53)
+* backslash (\), \W operator (gawk): GNU Regexp Operators.
+ (line 26)
+* backslash (\), \w operator (gawk): GNU Regexp Operators.
+ (line 21)
+* backslash (\), \x escape sequence: Escape Sequences. (line 61)
+* backslash (\), \y operator (gawk): GNU Regexp Operators.
+ (line 38)
+* backslash (\), as field separator: Command Line Field Separator.
+ (line 27)
+* backslash (\), continuing lines and: Statements/Lines. (line 19)
+* backslash (\), continuing lines and, comments and: Statements/Lines.
+ (line 76)
+* backslash (\), continuing lines and, in csh: Statements/Lines.
+ (line 44)
+* backslash (\), gsub()/gensub()/sub() functions and: Gory Details.
+ (line 6)
+* backslash (\), in bracket expressions: Bracket Expressions. (line 17)
+* backslash (\), in escape sequences: Escape Sequences. (line 6)
+* backslash (\), in escape sequences, POSIX and: Escape Sequences.
+ (line 120)
+* backslash (\), in regexp constants: Computed Regexps. (line 29)
+* backslash (\), in shell commands: Quoting. (line 48)
+* backslash (\), regexp operator: Regexp Operators. (line 18)
+* backtrace debugger command: Execution Stack. (line 13)
+* Beebe, Nelson H.F. <1>: Other Versions. (line 78)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Beebe, Nelson H.F.: Acknowledgments. (line 60)
* Beebe, Nelson H.F. <1>: Other Versions. (line 78)
* 'BEGIN' pattern: Field Separators. (line 44)
@@ -31407,7 +33048,13 @@ Index
(line 36)
* 'BEGIN' pattern, 'next'/'nextfile' statements and <1>: Next Statement.
(line 45)
+<<<<<<< HEAD
* 'BEGIN' pattern, 'OFS'/'ORS' variables, assigning values to: Output Separators.
+=======
+* BEGIN pattern, next/nextfile statements and: I/O And BEGIN/END.
+ (line 36)
+* BEGIN pattern, OFS/ORS variables, assigning values to: Output Separators.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 20)
* 'BEGIN' pattern, operators and: Using BEGIN/END. (line 17)
* 'BEGIN' pattern, 'print' statement and: I/O And BEGIN/END. (line 15)
@@ -31453,8 +33100,9 @@ Index
* bracket expressions: Regexp Operators. (line 56)
* bracket expressions <1>: Bracket Expressions. (line 6)
* bracket expressions, character classes: Bracket Expressions.
- (line 30)
+ (line 32)
* bracket expressions, collating elements: Bracket Expressions.
+<<<<<<< HEAD
(line 76)
* bracket expressions, collating symbols: Bracket Expressions.
(line 83)
@@ -31462,6 +33110,15 @@ Index
* bracket expressions, equivalence classes: Bracket Expressions.
(line 89)
* bracket expressions, non-ASCII: Bracket Expressions. (line 76)
+=======
+ (line 79)
+* bracket expressions, collating symbols: Bracket Expressions.
+ (line 86)
+* bracket expressions, complemented: Regexp Operators. (line 64)
+* bracket expressions, equivalence classes: Bracket Expressions.
+ (line 92)
+* bracket expressions, non-ASCII: Bracket Expressions. (line 79)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* bracket expressions, range expressions: Bracket Expressions.
(line 6)
* 'break' debugger command: Breakpoint Control. (line 11)
@@ -31474,6 +33131,7 @@ Index
* breakpoint, delete by number: Breakpoint Control. (line 64)
* breakpoint, how to disable or enable: Breakpoint Control. (line 69)
* breakpoint, setting: Breakpoint Control. (line 11)
+<<<<<<< HEAD
* Brennan, Michael: Foreword. (line 83)
* Brennan, Michael <1>: Delete. (line 56)
* Brennan, Michael <2>: Simple Sed. (line 25)
@@ -31499,6 +33157,31 @@ Index
* Brian Kernighan's 'awk' <14>: I/O Functions. (line 43)
* Brian Kernighan's 'awk', extensions: BTL. (line 6)
* Brian Kernighan's 'awk', source code: Other Versions. (line 13)
+=======
+* 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)
+* Brian Kernighan's awk <3>: String Functions. (line 490)
+* Brian Kernighan's awk <4>: Delete. (line 48)
+* Brian Kernighan's awk <5>: Nextfile Statement. (line 47)
+* Brian Kernighan's awk <6>: Continue Statement. (line 44)
+* Brian Kernighan's awk <7>: Break Statement. (line 51)
+* Brian Kernighan's awk <8>: I/O And BEGIN/END. (line 16)
+* Brian Kernighan's awk <9>: Concatenation. (line 36)
+* Brian Kernighan's awk <10>: Getline/Pipe. (line 62)
+* Brian Kernighan's awk <11>: Regexp Field Splitting.
+ (line 67)
+* Brian Kernighan's awk <12>: GNU Regexp Operators.
+ (line 83)
+* Brian Kernighan's awk <13>: Escape Sequences. (line 124)
+* 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)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Brini, Davide: Signature Program. (line 6)
* Brink, Jeroen: DOS Quoting. (line 10)
* Broder, Alan J.: Contributors. (line 89)
@@ -31507,11 +33190,17 @@ Index
* 'bt' debugger command (alias for 'backtrace'): Execution Stack.
(line 13)
* Buening, Andreas: Acknowledgments. (line 60)
+<<<<<<< HEAD
* Buening, Andreas <1>: Contributors. (line 93)
* Buening, Andreas <2>: Bugs. (line 71)
* buffering, input/output: I/O Functions. (line 139)
* buffering, input/output <1>: Two-way I/O. (line 70)
* buffering, interactive vs. noninteractive: I/O Functions. (line 108)
+=======
+* buffering, input/output <1>: Two-way I/O. (line 52)
+* buffering, input/output: I/O Functions. (line 140)
+* buffering, interactive vs. noninteractive: I/O Functions. (line 109)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* buffers, flushing: I/O Functions. (line 32)
* buffers, flushing <1>: I/O Functions. (line 139)
* buffers, operators for: GNU Regexp Operators.
@@ -31525,6 +33214,7 @@ Index
* built-in variables, conveying information: Auto-set. (line 6)
* built-in variables, user-modifiable: User-modified. (line 6)
* Busybox Awk: Other Versions. (line 88)
+* c.e., See common extensions: Conventions. (line 51)
* call by reference: Pass By Value/Reference.
(line 46)
* call by value: Pass By Value/Reference.
@@ -31540,8 +33230,13 @@ Index
* 'case' keyword: Switch Statement. (line 6)
* case sensitivity, and regexps: User-modified. (line 76)
* case sensitivity, and string comparisons: User-modified. (line 76)
+<<<<<<< HEAD
* case sensitivity, array indices and: Array Intro. (line 91)
* case sensitivity, converting case: String Functions. (line 519)
+=======
+* case sensitivity, array indices and: Array Intro. (line 94)
+* case sensitivity, converting case: String Functions. (line 520)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* case sensitivity, example programs: Library Functions. (line 53)
* case sensitivity, 'gawk': Case-sensitivity. (line 26)
* case sensitivity, regexps and: Case-sensitivity. (line 6)
@@ -31578,12 +33273,22 @@ Index
(line 81)
* 'close()' function, return value: Close Files And Pipes.
(line 131)
+<<<<<<< HEAD
* 'close()' function, two-way pipes and: Two-way I/O. (line 77)
* Close, Diane: Manual History. (line 41)
* Close, Diane <1>: Contributors. (line 21)
* Collado, Manuel: Acknowledgments. (line 60)
* collating elements: Bracket Expressions. (line 76)
* collating symbols: Bracket Expressions. (line 83)
+=======
+* close() function, two-way pipes and: Two-way I/O. (line 59)
+* Close, Diane <1>: Contributors. (line 20)
+* Close, Diane: Manual History. (line 34)
+* Collado, Manuel: Acknowledgments. (line 60)
+* collating elements: Bracket Expressions. (line 79)
+* collating symbols: Bracket Expressions. (line 86)
+* Colombo, Antonio <1>: Contributors. (line 137)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Colombo, Antonio: Acknowledgments. (line 60)
* Colombo, Antonio <1>: Contributors. (line 138)
* columns, aligning: Print Examples. (line 69)
@@ -31591,9 +33296,13 @@ Index
* comma (','), in range patterns: Ranges. (line 6)
* command completion, in debugger: Readline Support. (line 6)
* command line, arguments: Other Arguments. (line 6)
+<<<<<<< HEAD
* command line, arguments <1>: Auto-set. (line 15)
* command line, arguments <2>: ARGC and ARGV. (line 6)
* command line, directories on: Command line directories.
+=======
+* command line, directories on: Command-line directories.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 6)
* command line, formats: Running gawk. (line 12)
* command line, 'FS' on, setting: Command Line Field Separator.
@@ -31610,6 +33319,7 @@ Index
* commands to execute at breakpoint: Debugger Execution Control.
(line 10)
* commenting: Comments. (line 6)
+<<<<<<< HEAD
* commenting, backslash continuation and: Statements/Lines. (line 75)
* common extensions, '**' operator: Arithmetic Ops. (line 30)
* common extensions, '**=' operator: Assignment Ops. (line 138)
@@ -31621,6 +33331,19 @@ Index
(line 39)
* common extensions, 'func' keyword: Definition Syntax. (line 89)
* common extensions, 'length()' applied to an array: String Functions.
+=======
+* commenting, backslash continuation and: Statements/Lines. (line 76)
+* common extensions, ** operator: Arithmetic Ops. (line 30)
+* common extensions, **= operator: Assignment Ops. (line 137)
+* common extensions, /dev/stderr special file: Special FD. (line 46)
+* common extensions, /dev/stdin special file: Special FD. (line 46)
+* common extensions, /dev/stdout special file: Special FD. (line 46)
+* common extensions, \x escape sequence: Escape Sequences. (line 61)
+* common extensions, BINMODE variable: PC Using. (line 33)
+* common extensions, delete to delete entire arrays: Delete. (line 39)
+* common extensions, func keyword: Definition Syntax. (line 92)
+* common extensions, length() applied to an array: String Functions.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 197)
* common extensions, 'RS' as a regexp: gawk split records. (line 6)
* common extensions, single character fields: Single Character Fields.
@@ -31686,6 +33409,10 @@ Index
* 'CONVFMT' variable, and array subscripts: Numeric Array Subscripts.
(line 6)
* cookie: Glossary. (line 149)
+<<<<<<< HEAD
+=======
+* coprocesses <1>: Two-way I/O. (line 25)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* coprocesses: Redirection. (line 102)
* coprocesses <1>: Two-way I/O. (line 44)
* coprocesses, closing: Close Files And Pipes.
@@ -31694,11 +33421,18 @@ Index
* 'cos': Numeric Functions. (line 14)
* cosine: Numeric Functions. (line 14)
* counting: Wc Program. (line 6)
+<<<<<<< HEAD
* 'csh' utility: Statements/Lines. (line 43)
* 'csh' utility, 'POSIXLY_CORRECT' environment variable: Options.
(line 350)
* 'csh' utility, '|&' operator, comparison with: Two-way I/O. (line 44)
* 'ctime()' user-defined function: Function Example. (line 73)
+=======
+* csh utility: Statements/Lines. (line 44)
+* csh utility, POSIXLY_CORRECT environment variable: Options. (line 351)
+* csh utility, |& operator, comparison with: Two-way I/O. (line 25)
+* ctime() user-defined function: Function Example. (line 74)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* currency symbols, localization: Explaining gettext. (line 104)
* current system time: Time Functions. (line 65)
* 'custom.h' file: Configuration Philosophy.
@@ -31706,6 +33440,7 @@ Index
* customized input parser: Input Parsers. (line 6)
* customized output wrapper: Output Wrappers. (line 6)
* customized two-way processor: Two-way processors. (line 6)
+<<<<<<< HEAD
* 'cut' utility: Cut Program. (line 6)
* 'cut' utility <1>: Cut Program. (line 6)
* 'cut.awk' program: Cut Program. (line 45)
@@ -31717,12 +33452,26 @@ Index
* dark corner, '"0"' is actually true: Truth Values. (line 24)
* dark corner, '/=' operator vs. '/=.../' regexp constant: Assignment Ops.
(line 149)
+=======
+* 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 42)
+* dark corner <1>: Glossary. (line 188)
+* 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)
+* dark corner, ^, in FS: Regexp Field Splitting.
+ (line 59)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* dark corner, array subscripts: Uninitialized Subscripts.
(line 43)
* dark corner, 'break' statement: Break Statement. (line 51)
* dark corner, 'close()' function: Close Files And Pipes.
(line 131)
* dark corner, command-line arguments: Assignment Options. (line 43)
+<<<<<<< HEAD
* dark corner, 'continue' statement: Continue Statement. (line 43)
* dark corner, 'CONVFMT' variable: Strings And Numbers. (line 39)
* dark corner, escape sequences: Other Arguments. (line 31)
@@ -31734,6 +33483,19 @@ Index
* dark corner, 'FILENAME' variable: Getline Notes. (line 19)
* dark corner, 'FILENAME' variable <1>: Auto-set. (line 98)
* dark corner, 'FNR'/'NR' variables: Auto-set. (line 309)
+=======
+* dark corner, continue statement: Continue Statement. (line 44)
+* dark corner, CONVFMT variable: Strings And Numbers. (line 40)
+* dark corner, escape sequences: Other Arguments. (line 35)
+* dark corner, escape sequences, for metacharacters: Escape Sequences.
+ (line 142)
+* dark corner, exit statement: Exit Statement. (line 30)
+* dark corner, field separators: Field Splitting Summary.
+ (line 46)
+* dark corner, FILENAME variable <1>: Auto-set. (line 98)
+* dark corner, FILENAME variable: Getline Notes. (line 19)
+* dark corner, FNR/NR variables: Auto-set. (line 313)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* dark corner, format-control characters: Control Letters. (line 18)
* dark corner, format-control characters <1>: Control Letters.
(line 93)
@@ -31766,23 +33528,42 @@ Index
* 'date' utility, POSIX: Time Functions. (line 252)
* dates, converting to timestamps: Time Functions. (line 75)
* dates, information related to, localization: Explaining gettext.
+<<<<<<< HEAD
(line 116)
* Davies, Stephen: Acknowledgments. (line 60)
* Davies, Stephen <1>: Contributors. (line 75)
* 'dcgettext': I18N Functions. (line 21)
* 'dcgettext' <1>: Programmer i18n. (line 19)
* 'dcgettext()' function ('gawk'), portability and: I18N Portability.
+=======
+ (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.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 33)
* 'dcngettext': I18N Functions. (line 27)
* 'dcngettext' <1>: Programmer i18n. (line 36)
* 'dcngettext()' function ('gawk'), portability and: I18N Portability.
(line 33)
+<<<<<<< HEAD
* deadlocks: Two-way I/O. (line 70)
* debugger commands, 'b' ('break'): Breakpoint Control. (line 11)
* debugger commands, 'backtrace': Execution Stack. (line 13)
* debugger commands, 'break': Breakpoint Control. (line 11)
* debugger commands, 'bt' ('backtrace'): Execution Stack. (line 13)
* debugger commands, 'c' ('continue'): Debugger Execution Control.
+=======
+* deadlocks: Two-way I/O. (line 52)
+* debugger commands, b (break): Breakpoint Control. (line 11)
+* debugger commands, backtrace: Execution Stack. (line 13)
+* debugger commands, break: Breakpoint Control. (line 11)
+* debugger commands, bt (backtrace): Execution Stack. (line 13)
+* debugger commands, c (continue): Debugger Execution Control.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 33)
* debugger commands, 'clear': Breakpoint Control. (line 36)
* debugger commands, 'commands': Debugger Execution Control.
@@ -31900,12 +33681,20 @@ Index
* deleting entire arrays: Delete. (line 39)
* Demaille, Akim: Acknowledgments. (line 60)
* describe call stack frame, in debugger: Debugger Info. (line 27)
+<<<<<<< HEAD
* differences between 'gawk' and 'awk': String Functions. (line 197)
* differences in 'awk' and 'gawk', 'ARGC'/'ARGV' variables: ARGC and ARGV.
(line 88)
* differences in 'awk' and 'gawk', 'ARGIND' variable: Auto-set.
(line 44)
* differences in 'awk' and 'gawk', array elements, deleting: Delete.
+=======
+* differences between gawk and awk: String Functions. (line 197)
+* differences in awk and gawk, ARGC/ARGV variables: ARGC and ARGV.
+ (line 90)
+* differences in awk and gawk, ARGIND variable: Auto-set. (line 44)
+* differences in awk and gawk, array elements, deleting: Delete.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 39)
* differences in 'awk' and 'gawk', 'AWKLIBPATH' environment variable: AWKLIBPATH Variable.
(line 6)
@@ -31921,9 +33710,13 @@ Index
(line 33)
* differences in 'awk' and 'gawk', 'close()' function: Close Files And Pipes.
(line 81)
+<<<<<<< HEAD
* differences in 'awk' and 'gawk', 'close()' function <1>: Close Files And Pipes.
(line 131)
* differences in 'awk' and 'gawk', command line directories: Command line directories.
+=======
+* differences in awk and gawk, command-line directories: Command-line directories.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 6)
* differences in 'awk' and 'gawk', 'ERRNO' variable: Auto-set.
(line 82)
@@ -31959,6 +33752,7 @@ Index
(line 260)
* differences in 'awk' and 'gawk', 'print'/'printf' statements: Format Modifiers.
(line 13)
+<<<<<<< HEAD
* differences in 'awk' and 'gawk', 'PROCINFO' array: Auto-set.
(line 136)
* differences in 'awk' and 'gawk', read timeouts: Read Timeout.
@@ -31966,11 +33760,19 @@ Index
* differences in 'awk' and 'gawk', record separators: awk split records.
(line 123)
* differences in 'awk' and 'gawk', regexp constants: Using Constant Regexps.
+=======
+* differences in awk and gawk, PROCINFO array: Auto-set. (line 137)
+* differences in awk and gawk, read timeouts: Read Timeout. (line 6)
+* differences in awk and gawk, record separators: awk split records.
+ (line 124)
+* differences in awk and gawk, regexp constants: Using Constant Regexps.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 43)
* differences in 'awk' and 'gawk', regular expressions: Case-sensitivity.
(line 26)
* differences in 'awk' and 'gawk', 'RS'/'RT' variables: gawk split records.
(line 58)
+<<<<<<< HEAD
* differences in 'awk' and 'gawk', 'RT' variable: Auto-set. (line 265)
* differences in 'awk' and 'gawk', single-character fields: Single Character Fields.
(line 6)
@@ -31982,12 +33784,24 @@ Index
* differences in 'awk' and 'gawk', 'SYMTAB' variable: Auto-set.
(line 269)
* differences in 'awk' and 'gawk', 'TEXTDOMAIN' variable: User-modified.
+=======
+* differences in awk and gawk, RT variable: Auto-set. (line 269)
+* differences in awk and gawk, single-character fields: Single Character Fields.
+ (line 6)
+* differences in awk and gawk, split() function: String Functions.
+ (line 347)
+* differences in awk and gawk, strings: Scalar Constants. (line 20)
+* differences in awk and gawk, strings, storing: gawk split records.
+ (line 77)
+* differences in awk and gawk, SYMTAB variable: Auto-set. (line 273)
+* differences in awk and gawk, TEXTDOMAIN variable: User-modified.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 152)
* differences in 'awk' and 'gawk', trunc-mod operation: Arithmetic Ops.
(line 66)
-* directories, command line: Command line directories.
+* directories, command-line: Command-line directories.
(line 6)
-* directories, searching: Programs Exercises. (line 63)
+* directories, searching: Programs Exercises. (line 70)
* directories, searching for loadable extensions: AWKLIBPATH Variable.
(line 6)
* directories, searching for source files: AWKPATH Variable. (line 6)
@@ -32008,11 +33822,18 @@ Index
* dollar sign ('$'), '$' field operator <1>: Precedence. (line 42)
* dollar sign ('$'), incrementing fields and arrays: Increment Ops.
(line 30)
+<<<<<<< HEAD
* dollar sign ('$'), regexp operator: Regexp Operators. (line 35)
* double quote ('"') in shell commands: Read Terminal. (line 25)
* double quote ('"'), in regexp constants: Computed Regexps. (line 29)
* double quote ('"'), in shell commands: Quoting. (line 54)
* 'down' debugger command: Execution Stack. (line 20)
+=======
+* dollar sign ($), regexp operator: Regexp Operators. (line 35)
+* double quote ("), in regexp constants: Computed Regexps. (line 29)
+* double quote ("), in shell commands: Quoting. (line 54)
+* down debugger command: Execution Stack. (line 21)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Drepper, Ulrich: Acknowledgments. (line 52)
* dump all variables of a program: Options. (line 94)
* 'dump' debugger command: Miscellaneous Debugger Commands.
@@ -32023,11 +33844,19 @@ Index
* 'e' debugger command (alias for 'enable'): Breakpoint Control.
(line 73)
* EBCDIC: Ordinal Functions. (line 45)
+<<<<<<< HEAD
* effective group ID of 'gawk' user: Auto-set. (line 141)
* effective user ID of 'gawk' user: Auto-set. (line 145)
* 'egrep' utility: Bracket Expressions. (line 24)
* 'egrep' utility <1>: Egrep Program. (line 6)
* 'egrep.awk' program: Egrep Program. (line 53)
+=======
+* effective group ID of gawk user: Auto-set. (line 142)
+* effective user ID of gawk user: Auto-set. (line 146)
+* egrep utility <1>: Egrep Program. (line 6)
+* egrep utility: Bracket Expressions. (line 26)
+* egrep.awk program: Egrep Program. (line 54)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* elements in arrays, assigning values: Assigning Elements. (line 6)
* elements in arrays, deleting: Delete. (line 6)
* elements in arrays, order of access by 'in' operator: Scanning an Array.
@@ -32052,6 +33881,7 @@ Index
* 'END' pattern, and profiling: Profiling. (line 62)
* 'END' pattern, 'assert()' user-defined function and: Assert Function.
(line 75)
+<<<<<<< HEAD
* 'END' pattern, backslash continuation and: Egrep Program. (line 222)
* 'END' pattern, Boolean patterns and: Expression Patterns. (line 70)
* 'END' pattern, 'exit' statement and: Exit Statement. (line 12)
@@ -32069,6 +33899,23 @@ Index
* 'endgrent()' user-defined function: Group Functions. (line 216)
* 'endpwent()' function (C library): Passwd Functions. (line 210)
* 'endpwent()' user-defined function: Passwd Functions. (line 213)
+=======
+* END pattern, Boolean patterns and: Expression Patterns. (line 70)
+* END pattern, exit statement and: Exit Statement. (line 12)
+* END pattern, next/nextfile statements and <1>: Next Statement.
+ (line 45)
+* END pattern, next/nextfile statements and: I/O And BEGIN/END.
+ (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)
+* ENDFILE pattern, Boolean patterns and: Expression Patterns. (line 70)
+* endfile() user-defined function: Filetrans Function. (line 62)
+* endgrent() function (C library): Group Functions. (line 212)
+* endgrent() user-defined function: Group Functions. (line 215)
+* endpwent() function (C library): Passwd Functions. (line 210)
+* endpwent() user-defined function: Passwd Functions. (line 213)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* English, Steve: Advanced Features. (line 6)
* 'ENVIRON' array: Auto-set. (line 59)
* environment variables used by 'gawk': Environment Variables.
@@ -32078,6 +33925,7 @@ Index
* equals sign ('='), '=' operator: Assignment Ops. (line 6)
* equals sign ('='), '==' operator: Comparison Operators.
(line 11)
+<<<<<<< HEAD
* equals sign ('='), '==' operator <1>: Precedence. (line 64)
* EREs (Extended Regular Expressions): Bracket Expressions. (line 24)
* 'ERRNO' variable: Auto-set. (line 82)
@@ -32085,6 +33933,13 @@ Index
* 'ERRNO' variable, with 'BEGINFILE' pattern: BEGINFILE/ENDFILE.
(line 26)
* 'ERRNO' variable, with 'close()' function: Close Files And Pipes.
+=======
+* EREs (Extended Regular Expressions): Bracket Expressions. (line 26)
+* ERRNO variable <1>: TCP/IP Networking. (line 54)
+* ERRNO variable: Auto-set. (line 82)
+* ERRNO variable, with BEGINFILE pattern: BEGINFILE/ENDFILE. (line 26)
+* ERRNO variable, with close() function: Close Files And Pipes.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 139)
* 'ERRNO' variable, with 'getline' command: Getline. (line 19)
* error handling: Special FD. (line 16)
@@ -32116,6 +33971,7 @@ Index
(line 6)
* exclamation point ('!'), '!~' operator <4>: Comparison Operators.
(line 11)
+<<<<<<< HEAD
* exclamation point ('!'), '!~' operator <5>: Comparison Operators.
(line 98)
* exclamation point ('!'), '!~' operator <6>: Precedence. (line 79)
@@ -32128,6 +33984,19 @@ Index
(line 99)
* 'exp': Numeric Functions. (line 32)
* 'expand' utility: Very Simple. (line 69)
+=======
+* exclamation point (!), !~ operator <4>: Regexp Constants. (line 6)
+* exclamation point (!), !~ operator <5>: Case-sensitivity. (line 26)
+* exclamation point (!), !~ operator <6>: Computed Regexps. (line 6)
+* exclamation point (!), !~ operator: Regexp Usage. (line 19)
+* exit statement: Exit Statement. (line 6)
+* exit status, of gawk: Exit Status. (line 6)
+* exit status, of VMS: VMS Running. (line 29)
+* exit the debugger: Miscellaneous Debugger Commands.
+ (line 99)
+* exp: Numeric Functions. (line 33)
+* expand utility: Very Simple. (line 72)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Expat XML parser library: gawkextlib. (line 35)
* exponent: Numeric Functions. (line 32)
* expressions: Expressions. (line 6)
@@ -32140,14 +34009,14 @@ Index
* expressions, matching, See comparison expressions: Typing and Comparison.
(line 9)
* expressions, selecting: Conditional Exp. (line 6)
-* Extended Regular Expressions (EREs): Bracket Expressions. (line 24)
+* Extended Regular Expressions (EREs): Bracket Expressions. (line 26)
* extension API: Extension API Description.
(line 6)
* extension API informational variables: Extension API Informational Variables.
(line 6)
* extension API version: Extension Versioning.
(line 6)
-* extension API, version number: Auto-set. (line 232)
+* extension API, version number: Auto-set. (line 236)
* extension example: Extension Example. (line 6)
* extension registration: Registration Functions.
(line 6)
@@ -32155,6 +34024,7 @@ Index
* extensions distributed with 'gawk': Extension Samples. (line 6)
* extensions, allocating memory: Memory Allocation Functions.
(line 6)
+<<<<<<< HEAD
* extensions, Brian Kernighan's 'awk': BTL. (line 6)
* extensions, Brian Kernighan's 'awk' <1>: Common Extensions. (line 6)
* extensions, common, '**' operator: Arithmetic Ops. (line 30)
@@ -32168,13 +34038,35 @@ Index
* extensions, common, 'fflush()' function: I/O Functions. (line 43)
* extensions, common, 'func' keyword: Definition Syntax. (line 89)
* extensions, common, 'length()' applied to an array: String Functions.
+=======
+* extensions, Brian Kernighan's awk <1>: Common Extensions. (line 6)
+* extensions, Brian Kernighan's awk: BTL. (line 6)
+* extensions, common, ** operator: Arithmetic Ops. (line 30)
+* extensions, common, **= operator: Assignment Ops. (line 137)
+* extensions, common, /dev/stderr special file: Special FD. (line 46)
+* extensions, common, /dev/stdin special file: Special FD. (line 46)
+* extensions, common, /dev/stdout special file: Special FD. (line 46)
+* extensions, common, \x escape sequence: Escape Sequences. (line 61)
+* extensions, common, BINMODE variable: PC Using. (line 33)
+* extensions, common, delete to delete entire arrays: Delete. (line 39)
+* extensions, common, fflush() function: I/O Functions. (line 43)
+* extensions, common, func keyword: Definition Syntax. (line 92)
+* extensions, common, length() applied to an array: String Functions.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 197)
* extensions, common, 'RS' as a regexp: gawk split records. (line 6)
* extensions, common, single character fields: Single Character Fields.
(line 6)
+<<<<<<< HEAD
* extensions, common, '\x' escape sequence: Escape Sequences. (line 61)
* extensions, in 'gawk', not in POSIX 'awk': POSIX/GNU. (line 6)
* extensions, 'mawk': Common Extensions. (line 6)
+=======
+* extensions, in gawk, not in POSIX awk: POSIX/GNU. (line 6)
+* extensions, loading, @load directive: Loading Shared Libraries.
+ (line 8)
+* extensions, mawk: Common Extensions. (line 6)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* extensions, where to find: gawkextlib. (line 6)
* 'extract.awk' program: Extract Program. (line 79)
* extraction, of marked strings (internationalization): String Extraction.
@@ -32208,8 +34100,16 @@ Index
* field separators, regular expressions as: Field Separators. (line 50)
* field separators, regular expressions as <1>: Regexp Field Splitting.
(line 6)
+<<<<<<< HEAD
* field separators, See Also 'OFS': Changing Fields. (line 64)
* field separators, spaces as: Cut Program. (line 109)
+=======
+* field separators, regular expressions as: Field Separators. (line 51)
+* field separators, See Also OFS: Changing Fields. (line 64)
+* field separators, spaces as: Cut Program. (line 108)
+* fields <1>: Basic High Level. (line 73)
+* fields <2>: Fields. (line 6)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* fields: Reading Files. (line 14)
* fields <1>: Fields. (line 6)
* fields <2>: Basic High Level. (line 62)
@@ -32227,7 +34127,12 @@ Index
* 'FIELDWIDTHS' variable: Constant Size. (line 23)
* 'FIELDWIDTHS' variable <1>: User-modified. (line 37)
* file descriptors: Special FD. (line 6)
+<<<<<<< HEAD
* file names, distinguishing: Auto-set. (line 55)
+=======
+* file inclusion, @include directive: Include Files. (line 8)
+* file names, distinguishing: Auto-set. (line 56)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* file names, in compatibility mode: Special Caveats. (line 9)
* file names, standard streams in 'gawk': Special FD. (line 46)
* 'FILENAME' variable: Reading Files. (line 6)
@@ -32265,9 +34170,13 @@ Index
(line 63)
* files, message object, specifying directory of: Explaining gettext.
(line 54)
+<<<<<<< HEAD
* files, message object, specifying directory of <1>: Programmer i18n.
(line 47)
* files, multiple passes over: Other Arguments. (line 49)
+=======
+* files, multiple passes over: Other Arguments. (line 53)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* files, multiple, duplicating output into: Tee Program. (line 6)
* files, output, See output files: Close Files And Pipes.
(line 6)
@@ -32283,7 +34192,7 @@ Index
* files, reading, multiline records: Multiple Line. (line 6)
* files, searching for regular expressions: Egrep Program. (line 6)
* files, skipping: File Checking. (line 6)
-* files, source, search path for: Programs Exercises. (line 63)
+* files, source, search path for: Programs Exercises. (line 70)
* files, splitting: Split Program. (line 6)
* files, Texinfo, extracting programs from: Extract Program. (line 6)
* find substring in string: String Functions. (line 155)
@@ -32300,12 +34209,21 @@ Index
* flush buffered output: I/O Functions. (line 28)
* 'fnmatch()' extension function: Extension Sample Fnmatch.
(line 12)
+<<<<<<< HEAD
* 'FNR' variable: Records. (line 6)
* 'FNR' variable <1>: Auto-set. (line 108)
* 'FNR' variable, changing: Auto-set. (line 309)
* 'for' statement: For Statement. (line 6)
* 'for' statement, looping over arrays: Scanning an Array. (line 20)
* 'fork()' extension function: Extension Sample Fork.
+=======
+* FNR variable <1>: Auto-set. (line 107)
+* FNR variable: Records. (line 6)
+* FNR variable, changing: Auto-set. (line 313)
+* for statement: For Statement. (line 6)
+* for statement, looping over arrays: Scanning an Array. (line 20)
+* fork() extension function: Extension Sample Fork.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 11)
* format specifiers: Basic Printf. (line 15)
* format specifiers, mixing regular with positional specifiers: Printf Ordering.
@@ -32357,6 +34275,7 @@ Index
* 'FUNCTAB' array: Auto-set. (line 123)
* function calls: Function Calls. (line 6)
* function calls, indirect: Indirect Calls. (line 6)
+* function calls, indirect, @-notation for: Indirect Calls. (line 47)
* function definition example: Function Example. (line 6)
* function pointers: Indirect Calls. (line 6)
* functions, arrays as parameters to: Pass By Value/Reference.
@@ -32364,7 +34283,7 @@ Index
* functions, built-in: Function Calls. (line 10)
* functions, built-in <1>: Functions. (line 6)
* functions, built-in, evaluation order: Calling Built-in. (line 30)
-* functions, defining: Definition Syntax. (line 6)
+* functions, defining: Definition Syntax. (line 9)
* functions, library: Library Functions. (line 6)
* functions, library, assertions: Assert Function. (line 6)
* functions, library, associative arrays and: Library Names. (line 57)
@@ -32387,9 +34306,15 @@ Index
* functions, library, rounding numbers: Round Function. (line 6)
* functions, library, user database, reading: Passwd Functions.
(line 6)
+<<<<<<< HEAD
* functions, names of: Arrays. (line 18)
* functions, names of <1>: Definition Syntax. (line 20)
* functions, recursive: Definition Syntax. (line 79)
+=======
+* functions, names of <1>: Definition Syntax. (line 23)
+* functions, names of: Arrays. (line 18)
+* functions, recursive: Definition Syntax. (line 82)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* functions, string-translation: I18N Functions. (line 6)
* functions, undefined: Pass By Value/Reference.
(line 70)
@@ -32399,6 +34324,7 @@ Index
* functions, user-defined, library of: Library Functions. (line 6)
* functions, user-defined, 'next'/'nextfile' statements and: Next Statement.
(line 45)
+<<<<<<< HEAD
* functions, user-defined, 'next'/'nextfile' statements and <1>: Nextfile Statement.
(line 46)
* G-d: Acknowledgments. (line 82)
@@ -32418,15 +34344,40 @@ Index
* 'gawk', comparison operators and: Comparison Operators.
(line 51)
* 'gawk', configuring: Configuration Philosophy.
+=======
+* G-d: Acknowledgments. (line 92)
+* Garfinkle, Scott: Contributors. (line 34)
+* gawk program, dynamic profiling: Profiling. (line 179)
+* gawk version: Auto-set. (line 211)
+* gawk, ARGIND variable in: Other Arguments. (line 12)
+* gawk, awk and <1>: This Manual. (line 14)
+* gawk, awk and: Preface. (line 21)
+* gawk, bitwise operations in: Bitwise Functions. (line 39)
+* gawk, break statement in: Break Statement. (line 51)
+* gawk, built-in variables and: Built-in Variables. (line 14)
+* gawk, character classes and: Bracket Expressions. (line 100)
+* gawk, coding style in: Adding Code. (line 39)
+* gawk, command-line options, and regular expressions: GNU Regexp Operators.
+ (line 70)
+* gawk, comparison operators and: Comparison Operators.
+ (line 50)
+* gawk, configuring: Configuration Philosophy.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 6)
* 'gawk', configuring, options: Additional Configuration Options.
(line 6)
+<<<<<<< HEAD
* 'gawk', 'continue' statement in: Continue Statement. (line 43)
* 'gawk', distribution: Distribution contents.
+=======
+* gawk, continue statement in: Continue Statement. (line 44)
+* gawk, distribution: Distribution contents.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 6)
* 'gawk', 'ERRNO' variable in: Getline. (line 19)
* 'gawk', 'ERRNO' variable in <1>: Close Files And Pipes.
(line 139)
+<<<<<<< HEAD
* 'gawk', 'ERRNO' variable in <2>: BEGINFILE/ENDFILE. (line 26)
* 'gawk', 'ERRNO' variable in <3>: Auto-set. (line 82)
* 'gawk', 'ERRNO' variable in <4>: TCP/IP Networking. (line 53)
@@ -32441,6 +34392,20 @@ Index
* 'gawk', format-control characters: Control Letters. (line 18)
* 'gawk', format-control characters <1>: Control Letters. (line 93)
* 'gawk', 'FPAT' variable in: Splitting By Content.
+=======
+* gawk, ERRNO variable in: Getline. (line 19)
+* gawk, escape sequences: Escape Sequences. (line 132)
+* gawk, extensions, disabling: Options. (line 252)
+* gawk, features, adding: Adding Code. (line 6)
+* gawk, features, advanced: Advanced Features. (line 6)
+* gawk, field separators and: User-modified. (line 71)
+* gawk, FIELDWIDTHS variable in <1>: User-modified. (line 37)
+* gawk, FIELDWIDTHS variable in: Constant Size. (line 23)
+* gawk, file names in: Special Files. (line 6)
+* gawk, format-control characters: Control Letters. (line 18)
+* gawk, FPAT variable in <1>: User-modified. (line 43)
+* gawk, FPAT variable in: Splitting By Content.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 27)
* 'gawk', 'FPAT' variable in <1>: User-modified. (line 43)
* 'gawk', 'FUNCTAB' array in: Auto-set. (line 123)
@@ -32452,10 +34417,20 @@ Index
* 'gawk', 'IGNORECASE' variable in <3>: String Functions. (line 58)
* 'gawk', 'IGNORECASE' variable in <4>: Array Sorting Functions.
(line 83)
+<<<<<<< HEAD
* 'gawk', implementation issues: Notes. (line 6)
* 'gawk', implementation issues, debugging: Compatibility Mode.
(line 6)
* 'gawk', implementation issues, downward compatibility: Compatibility Mode.
+=======
+* gawk, IGNORECASE variable in <2>: String Functions. (line 58)
+* gawk, IGNORECASE variable in <3>: Array Intro. (line 94)
+* gawk, IGNORECASE variable in <4>: User-modified. (line 76)
+* gawk, IGNORECASE variable in: Case-sensitivity. (line 26)
+* gawk, implementation issues: Notes. (line 6)
+* gawk, implementation issues, debugging: Compatibility Mode. (line 6)
+* gawk, implementation issues, downward compatibility: Compatibility Mode.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 6)
* 'gawk', implementation issues, limits: Getline Notes. (line 14)
* 'gawk', implementation issues, pipes: Redirection. (line 134)
@@ -32464,6 +34439,7 @@ Index
(line 13)
* 'gawk', interpreter, adding code to: Using Internal File Ops.
(line 6)
+<<<<<<< HEAD
* 'gawk', interval expressions and: Regexp Operators. (line 140)
* 'gawk', line continuation in: Conditional Exp. (line 34)
* 'gawk', 'LINT' variable in: User-modified. (line 88)
@@ -32478,11 +34454,27 @@ Index
* 'gawk', 'PROCINFO' array in <2>: Time Functions. (line 47)
* 'gawk', 'PROCINFO' array in <3>: Two-way I/O. (line 116)
* 'gawk', regexp constants and: Using Constant Regexps.
+=======
+* gawk, interval expressions and: Regexp Operators. (line 139)
+* gawk, line continuation in: Conditional Exp. (line 34)
+* gawk, LINT variable in: User-modified. (line 88)
+* gawk, list of contributors to: Contributors. (line 6)
+* gawk, MS-DOS version of: PC Using. (line 10)
+* gawk, MS-Windows version of: PC Using. (line 10)
+* gawk, newlines in: Statements/Lines. (line 12)
+* gawk, octal numbers and: Nondecimal-numbers. (line 42)
+* gawk, OS/2 version of: PC Using. (line 16)
+* gawk, PROCINFO array in <1>: Two-way I/O. (line 99)
+* gawk, PROCINFO array in <2>: Time Functions. (line 47)
+* gawk, PROCINFO array in: Auto-set. (line 137)
+* gawk, regexp constants and: Using Constant Regexps.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 28)
* 'gawk', regular expressions, case sensitivity: Case-sensitivity.
(line 26)
* 'gawk', regular expressions, operators: GNU Regexp Operators.
(line 6)
+<<<<<<< HEAD
* 'gawk', regular expressions, precedence: Regexp Operators. (line 162)
* 'gawk', 'RT' variable in: awk split records. (line 123)
* 'gawk', 'RT' variable in <1>: Multiple Line. (line 129)
@@ -32502,10 +34494,32 @@ Index
* 'gawkextlib': gawkextlib. (line 6)
* 'gawkextlib' project: gawkextlib. (line 6)
* General Public License (GPL): Glossary. (line 303)
+=======
+* gawk, regular expressions, precedence: Regexp Operators. (line 161)
+* gawk, RT variable in <1>: Auto-set. (line 269)
+* gawk, RT variable in <2>: Multiple Line. (line 129)
+* gawk, RT variable in: awk split records. (line 124)
+* gawk, See Also awk: Preface. (line 34)
+* gawk, source code, obtaining: Getting. (line 6)
+* gawk, splitting fields and: Constant Size. (line 88)
+* gawk, string-translation functions: I18N Functions. (line 6)
+* gawk, SYMTAB array in: Auto-set. (line 273)
+* gawk, TEXTDOMAIN variable in: User-modified. (line 152)
+* gawk, timestamps: Time Functions. (line 6)
+* gawk, uses for: Preface. (line 34)
+* gawk, versions of, information about, printing: Options. (line 298)
+* gawk, VMS version of: VMS Installation. (line 6)
+* gawk, word-boundary operator: GNU Regexp Operators.
+ (line 63)
+* gawkextlib: gawkextlib. (line 6)
+* gawkextlib project: gawkextlib. (line 6)
+* General Public License (GPL): Glossary. (line 305)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* General Public License, See GPL: Manual History. (line 11)
* generate time values: Time Functions. (line 25)
* 'gensub': Using Constant Regexps.
(line 43)
+<<<<<<< HEAD
* 'gensub' <1>: String Functions. (line 89)
* 'gensub()' function ('gawk'), escape processing: Gory Details.
(line 6)
@@ -32522,9 +34536,27 @@ Index
* 'getgruser()' function, user-defined: Group Functions. (line 196)
* 'getline' command: Reading Files. (line 20)
* 'getline' command, coprocesses, using from: Getline/Coprocess.
+=======
+* gensub() function (gawk), escape processing: Gory Details. (line 6)
+* getaddrinfo() function (C library): TCP/IP Networking. (line 38)
+* getgrent() function (C library): Group Functions. (line 6)
+* getgrent() user-defined function: Group Functions. (line 6)
+* getgrgid() function (C library): Group Functions. (line 183)
+* getgrgid() user-defined function: Group Functions. (line 186)
+* getgrnam() function (C library): Group Functions. (line 172)
+* getgrnam() user-defined function: Group Functions. (line 177)
+* getgruser() function (C library): Group Functions. (line 192)
+* getgruser() function, user-defined: Group Functions. (line 195)
+* getline command: Reading Files. (line 20)
+* getline command, _gr_init() user-defined function: Group Functions.
+ (line 83)
+* getline command, _pw_init() function: Passwd Functions. (line 154)
+* getline command, coprocesses, using from <1>: Close Files And Pipes.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 6)
* 'getline' command, coprocesses, using from <1>: Close Files And Pipes.
(line 6)
+<<<<<<< HEAD
* 'getline' command, deadlock and: Two-way I/O. (line 70)
* 'getline' command, explicit input with: Getline. (line 6)
* 'getline' command, 'FILENAME' variable and: Getline Notes. (line 19)
@@ -32536,6 +34568,16 @@ Index
* 'getline' from a file: Getline/File. (line 6)
* 'getline' into a variable: Getline/Variable. (line 6)
* 'getline' statement, 'BEGINFILE'/'ENDFILE' patterns and: BEGINFILE/ENDFILE.
+=======
+* getline command, deadlock and: Two-way I/O. (line 52)
+* getline command, explicit input with: Getline. (line 6)
+* getline command, FILENAME variable and: Getline Notes. (line 19)
+* getline command, return values: Getline. (line 19)
+* getline command, variants: Getline Summary. (line 6)
+* getline from a file: Getline/File. (line 6)
+* getline into a variable: Getline/Variable. (line 6)
+* getline statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 54)
* 'getlocaltime()' user-defined function: Getlocaltime Function.
(line 16)
@@ -32562,7 +34604,11 @@ Index
* 'git' utility <3>: Adding Code. (line 112)
* Git, use of for 'gawk' source code: Derived Files. (line 6)
* GNITS mailing list: Acknowledgments. (line 52)
+<<<<<<< HEAD
* GNU 'awk', See 'gawk': Preface. (line 53)
+=======
+* GNU awk, See gawk: Preface. (line 51)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* GNU Free Documentation License: GNU Free Documentation License.
(line 8)
* GNU General Public License: Glossary. (line 303)
@@ -32583,7 +34629,11 @@ Index
* Grigera, Juan: Contributors. (line 58)
* group database, reading: Group Functions. (line 6)
* group file: Group Functions. (line 6)
+<<<<<<< HEAD
* group ID of 'gawk' user: Auto-set. (line 180)
+=======
+* group ID of gawk user: Auto-set. (line 184)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* groups, information about: Group Functions. (line 6)
* 'gsub': Using Constant Regexps.
(line 43)
@@ -32622,10 +34672,17 @@ Index
* 'if' statement, use of regexps in: Regexp Usage. (line 19)
* 'igawk.sh' program: Igawk Program. (line 124)
* ignore breakpoint: Breakpoint Control. (line 87)
+<<<<<<< HEAD
* 'ignore' debugger command: Breakpoint Control. (line 87)
* 'IGNORECASE' variable: User-modified. (line 76)
* 'IGNORECASE' variable, and array indices: Array Intro. (line 91)
* 'IGNORECASE' variable, and array sorting functions: Array Sorting Functions.
+=======
+* ignore debugger command: Breakpoint Control. (line 87)
+* IGNORECASE variable: User-modified. (line 76)
+* IGNORECASE variable, and array indices: Array Intro. (line 94)
+* IGNORECASE variable, and array sorting functions: Array Sorting Functions.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 83)
* 'IGNORECASE' variable, in example programs: Library Functions.
(line 53)
@@ -32640,6 +34697,7 @@ Index
* implementation issues, 'gawk', limits <1>: Redirection. (line 134)
* 'in' operator: Comparison Operators.
(line 11)
+<<<<<<< HEAD
* 'in' operator <1>: Precedence. (line 82)
* 'in' operator <2>: For Statement. (line 75)
* 'in' operator, index existence in multidimensional arrays: Multidimensional.
@@ -32648,10 +34706,20 @@ Index
* 'in' operator, testing if array element exists: Reference to Elements.
(line 37)
* 'in' operator, use in loops: Scanning an Array. (line 17)
+=======
+* in operator, index existence in multidimensional arrays: Multidimensional.
+ (line 43)
+* in operator, order of array access: Scanning an Array. (line 48)
+* in operator, testing if array element exists: Reference to Elements.
+ (line 38)
+* in operator, use in loops: Scanning an Array. (line 17)
+* including files, @include directive: Include Files. (line 8)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* increment operators: Increment Ops. (line 6)
* 'index': String Functions. (line 155)
* indexing arrays: Array Intro. (line 48)
* indirect function calls: Indirect Calls. (line 6)
+* indirect function calls, @-notation: Indirect Calls. (line 47)
* infinite precision: Arbitrary Precision Arithmetic.
(line 6)
* 'info' debugger command: Debugger Info. (line 13)
@@ -32664,10 +34732,16 @@ Index
* input files, counting elements in: Wc Program. (line 6)
* input files, examples: Sample Data Files. (line 6)
* input files, reading: Reading Files. (line 6)
+<<<<<<< HEAD
* input files, running 'awk' without: Read Terminal. (line 6)
* input files, running 'awk' without <1>: Read Terminal. (line 17)
* input files, variable assignments and: Other Arguments. (line 19)
* input pipeline: Getline/Pipe. (line 10)
+=======
+* input files, running awk without: Read Terminal. (line 6)
+* input files, variable assignments and: Other Arguments. (line 23)
+* input pipeline: Getline/Pipe. (line 9)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* input record, length of: String Functions. (line 174)
* input redirection: Getline/File. (line 6)
* input, data, nondecimal: Nondecimal Data. (line 6)
@@ -32679,8 +34753,13 @@ Index
* input, standard <1>: Special FD. (line 6)
* input/output functions: I/O Functions. (line 6)
* input/output, binary: User-modified. (line 15)
+<<<<<<< HEAD
* input/output, from 'BEGIN' and 'END': I/O And BEGIN/END. (line 6)
* input/output, two-way: Two-way I/O. (line 44)
+=======
+* input/output, from BEGIN and END: I/O And BEGIN/END. (line 6)
+* input/output, two-way: Two-way I/O. (line 25)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* insomnia, cure for: Alarm Program. (line 6)
* installation, VMS: VMS Installation. (line 6)
* installing 'gawk': Installation. (line 6)
@@ -32699,8 +34778,13 @@ Index
* internationalization, localization <1>: Internationalization.
(line 13)
* internationalization, localization, character classes: Bracket Expressions.
+<<<<<<< HEAD
(line 97)
* internationalization, localization, 'gawk' and: Internationalization.
+=======
+ (line 100)
+* internationalization, localization, gawk and: Internationalization.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 13)
* internationalization, localization, locale categories: Explaining gettext.
(line 81)
@@ -32709,6 +34793,7 @@ Index
* internationalization, localization, portability and: I18N Portability.
(line 6)
* internationalizing a program: Explaining gettext. (line 6)
+<<<<<<< HEAD
* interpreted programs: Basic High Level. (line 13)
* interpreted programs <1>: Glossary. (line 352)
* interval expressions, regexp operator: Regexp Operators. (line 117)
@@ -32716,6 +34801,15 @@ Index
* invoke shell command: I/O Functions. (line 76)
* 'isarray': Type Functions. (line 11)
* ISO: Glossary. (line 363)
+=======
+* interpreted programs <1>: Glossary. (line 356)
+* interpreted programs: Basic High Level. (line 15)
+* interval expressions, regexp operator: Regexp Operators. (line 116)
+* inventory-shipped file: Sample Data Files. (line 32)
+* invoke shell command: I/O Functions. (line 75)
+* isarray: Type Functions. (line 11)
+* ISO: Glossary. (line 367)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* ISO 8859-1: Glossary. (line 133)
* ISO Latin-1: Glossary. (line 133)
* Jacobs, Andrew: Passwd Functions. (line 90)
@@ -32731,6 +34825,19 @@ Index
* Kahrs, Ju"rgen <1>: Contributors. (line 71)
* Kasal, Stepan: Acknowledgments. (line 60)
* Kenobi, Obi-Wan: Undocumented. (line 6)
+<<<<<<< HEAD
+=======
+* Kernighan, Brian <1>: Glossary. (line 143)
+* Kernighan, Brian <2>: Basic Data Typing. (line 54)
+* Kernighan, Brian <3>: Other Versions. (line 13)
+* Kernighan, Brian <4>: Contributors. (line 11)
+* Kernighan, Brian <5>: BTL. (line 6)
+* Kernighan, Brian <6>: Library Functions. (line 12)
+* Kernighan, Brian <7>: Concatenation. (line 6)
+* Kernighan, Brian <8>: Getline/Pipe. (line 6)
+* Kernighan, Brian <9>: Acknowledgments. (line 76)
+* Kernighan, Brian <10>: Conventions. (line 38)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Kernighan, Brian: History. (line 17)
* Kernighan, Brian <1>: Conventions. (line 34)
* Kernighan, Brian <2>: Acknowledgments. (line 76)
@@ -32749,6 +34856,7 @@ Index
(line 72)
* 'labels.awk' program: Labels Program. (line 51)
* Langston, Peter: Advanced Features. (line 6)
+<<<<<<< HEAD
* languages, data-driven: Basic High Level. (line 74)
* 'LC_ALL' locale category: Explaining gettext. (line 121)
* 'LC_COLLATE' locale category: Explaining gettext. (line 94)
@@ -32761,6 +34869,20 @@ Index
* 'LC_RESPONSE' locale category: Explaining gettext. (line 112)
* 'LC_TIME' locale category: Explaining gettext. (line 116)
* left angle bracket ('<'), '<' operator: Comparison Operators.
+=======
+* languages, data-driven: Basic High Level. (line 85)
+* 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 99)
+* LC_MONETARY locale category: Explaining gettext. (line 104)
+* LC_NUMERIC locale category: Explaining gettext. (line 108)
+* LC_TIME locale category: Explaining gettext. (line 112)
+* left angle bracket (<), < operator <1>: Precedence. (line 65)
+* left angle bracket (<), < operator: Comparison Operators.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 11)
* left angle bracket ('<'), '<' operator <1>: Precedence. (line 64)
* left angle bracket ('<'), '<' operator (I/O): Getline/File. (line 6)
@@ -32813,9 +34935,15 @@ Index
* lint checking, array subscripts: Uninitialized Subscripts.
(line 43)
* lint checking, empty programs: Command Line. (line 16)
+<<<<<<< HEAD
* lint checking, issuing warnings: Options. (line 184)
* lint checking, 'POSIXLY_CORRECT' environment variable: Options.
(line 335)
+=======
+* lint checking, issuing warnings: Options. (line 185)
+* lint checking, POSIXLY_CORRECT environment variable: Options.
+ (line 336)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* lint checking, undefined functions: Pass By Value/Reference.
(line 87)
* 'LINT' variable: User-modified. (line 88)
@@ -32826,7 +34954,13 @@ Index
* 'list' debugger command: Miscellaneous Debugger Commands.
(line 72)
* list function definitions, in debugger: Debugger Info. (line 30)
+<<<<<<< HEAD
* loading, extensions: Options. (line 172)
+=======
+* loading extensions, @load directive: Loading Shared Libraries.
+ (line 8)
+* loading, extensions: Options. (line 173)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* local variables, in a function: Variable Scope. (line 6)
* locale categories: Explaining gettext. (line 81)
* locale decimal point character: Options. (line 265)
@@ -32871,6 +35005,7 @@ Index
* matching, expressions, See comparison expressions: Typing and Comparison.
(line 9)
* matching, leftmost longest: Multiple Line. (line 26)
+<<<<<<< HEAD
* matching, null strings: Gory Details. (line 164)
* 'mawk' utility: Escape Sequences. (line 123)
* 'mawk' utility <1>: Getline/Pipe. (line 62)
@@ -32878,6 +35013,15 @@ Index
* 'mawk' utility <3>: Nextfile Statement. (line 46)
* 'mawk' utility <4>: Other Versions. (line 44)
* maximum precision supported by MPFR library: Auto-set. (line 221)
+=======
+* matching, null strings: Gory Details. (line 143)
+* mawk utility <1>: Other Versions. (line 44)
+* mawk utility <2>: Nextfile Statement. (line 47)
+* mawk utility <3>: Concatenation. (line 36)
+* mawk utility <4>: Getline/Pipe. (line 62)
+* mawk utility: Escape Sequences. (line 132)
+* maximum precision supported by MPFR library: Auto-set. (line 225)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* McIlroy, Doug: Glossary. (line 149)
* McPhee, Patrick: Contributors. (line 101)
* message object files: Explaining gettext. (line 42)
@@ -32889,9 +35033,15 @@ Index
(line 47)
* messages from extensions: Printing Messages. (line 6)
* metacharacters in regular expressions: Regexp Operators. (line 6)
+<<<<<<< HEAD
* metacharacters, escape sequences for: Escape Sequences. (line 129)
* minimum precision supported by MPFR library: Auto-set. (line 224)
* 'mktime': Time Functions. (line 25)
+=======
+* metacharacters, escape sequences for: Escape Sequences. (line 138)
+* minimum precision supported by MPFR library: Auto-set. (line 228)
+* mktime: Time Functions. (line 25)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* modifiers, in format specifiers: Format Modifiers. (line 6)
* monetary information, localization: Explaining gettext. (line 104)
* Moore, Duncan: Getline Notes. (line 40)
@@ -32902,6 +35052,7 @@ Index
* 'n' debugger command (alias for 'next'): Debugger Execution Control.
(line 43)
* names, arrays/variables: Arrays. (line 18)
+<<<<<<< HEAD
* names, arrays/variables <1>: Library Names. (line 6)
* names, functions: Definition Syntax. (line 20)
* names, functions <1>: Library Names. (line 6)
@@ -32910,6 +35061,14 @@ Index
* namespace issues, functions: Definition Syntax. (line 20)
* 'nawk' utility: Names. (line 10)
* NetBSD: Glossary. (line 607)
+=======
+* names, functions <1>: Library Names. (line 6)
+* names, functions: Definition Syntax. (line 23)
+* namespace issues <1>: Library Names. (line 6)
+* namespace issues: Arrays. (line 18)
+* namespace issues, functions: Definition Syntax. (line 23)
+* NetBSD: Glossary. (line 611)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* networks, programming: TCP/IP Networking. (line 6)
* networks, support for: Special Network. (line 6)
* newlines: Statements/Lines. (line 6)
@@ -32926,6 +35085,7 @@ Index
* newlines, separating statements in actions <1>: Statements. (line 10)
* 'next' debugger command: Debugger Execution Control.
(line 43)
+<<<<<<< HEAD
* 'next file' statement: Feature History. (line 168)
* 'next' statement: Boolean Ops. (line 85)
* 'next' statement <1>: Next Statement. (line 6)
@@ -32939,6 +35099,19 @@ Index
* 'nextfile' statement, 'BEGIN'/'END' patterns and: I/O And BEGIN/END.
(line 36)
* 'nextfile' statement, 'BEGINFILE'/'ENDFILE' patterns and: BEGINFILE/ENDFILE.
+=======
+* next file statement: Feature History. (line 169)
+* next statement <1>: Next Statement. (line 6)
+* next statement: Boolean Ops. (line 93)
+* next statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 36)
+* next statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE.
+ (line 49)
+* 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 36)
+* nextfile statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 26)
* 'nextfile' statement, user-defined functions and: Nextfile Statement.
(line 46)
@@ -32953,11 +35126,20 @@ Index
* non-existent array elements: Reference to Elements.
(line 23)
* not Boolean-logic operator: Boolean Ops. (line 6)
+<<<<<<< HEAD
* 'NR' variable: Records. (line 6)
* 'NR' variable <1>: Auto-set. (line 131)
* 'NR' variable, changing: Auto-set. (line 309)
* null strings: awk split records. (line 113)
* null strings <1>: Regexp Field Splitting.
+=======
+* NR variable <1>: Auto-set. (line 132)
+* NR variable: Records. (line 6)
+* NR variable, changing: Auto-set. (line 313)
+* null strings <1>: Basic Data Typing. (line 26)
+* null strings <2>: Truth Values. (line 6)
+* null strings <3>: Regexp Field Splitting.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 43)
* null strings <2>: Truth Values. (line 6)
* null strings <3>: Basic Data Typing. (line 26)
@@ -32967,8 +35149,13 @@ Index
(line 43)
* null strings, converting numbers to strings: Strings And Numbers.
(line 21)
+<<<<<<< HEAD
* null strings, matching: Gory Details. (line 164)
* number as string of bits: Bitwise Functions. (line 110)
+=======
+* null strings, matching: Gory Details. (line 143)
+* number as string of bits: Bitwise Functions. (line 109)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* number of array elements: String Functions. (line 197)
* number sign ('#'), '#!' (executable scripts): Executable Scripts.
(line 6)
@@ -32989,8 +35176,12 @@ Index
* numeric functions: Numeric Functions. (line 6)
* numeric, output format: OFMT. (line 6)
* numeric, strings: Variable Typing. (line 6)
+<<<<<<< HEAD
* 'o' debugger command (alias for 'option'): Debugger Info. (line 57)
* 'oawk' utility: Names. (line 10)
+=======
+* o debugger command (alias for option): Debugger Info. (line 57)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* obsolete features: Obsolete. (line 6)
* octal numbers: Nondecimal-numbers. (line 6)
* octal values, enabling interpretation of: Options. (line 209)
@@ -33074,12 +35265,21 @@ Index
* output, printing, See printing: Printing. (line 6)
* output, records: Output Separators. (line 20)
* output, standard: Special FD. (line 6)
+<<<<<<< HEAD
* 'p' debugger command (alias for 'print'): Viewing And Changing Data.
(line 35)
* Papadopoulos, Panos: Contributors. (line 129)
* parent process ID of 'gawk' process: Auto-set. (line 189)
* parentheses '()', in a profile: Profiling. (line 146)
* parentheses '()', regexp operator: Regexp Operators. (line 80)
+=======
+* p debugger command (alias for print): Viewing And Changing Data.
+ (line 36)
+* Papadopoulos, Panos: Contributors. (line 128)
+* parent process ID of gawk process: Auto-set. (line 193)
+* parentheses (), in a profile: Profiling. (line 146)
+* parentheses (), regexp operator: Regexp Operators. (line 81)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* password file: Passwd Functions. (line 16)
* 'patsplit': String Functions. (line 294)
* patterns: Patterns and Actions.
@@ -33113,6 +35313,7 @@ Index
* Pitts, Dave <1>: Bugs. (line 71)
* Plauger, P.J.: Library Functions. (line 12)
* plug-in: Extension Intro. (line 6)
+<<<<<<< HEAD
* plus sign ('+'), '+' operator: Precedence. (line 51)
* plus sign ('+'), '+' operator <1>: Precedence. (line 57)
* plus sign ('+'), '++' operator: Increment Ops. (line 11)
@@ -33131,14 +35332,38 @@ Index
* portability, backslash in escape sequences: Escape Sequences.
(line 111)
* portability, 'close()' function and: Close Files And Pipes.
+=======
+* plus sign (+), + operator: Precedence. (line 52)
+* plus sign (+), ++ operator <1>: Precedence. (line 46)
+* plus sign (+), ++ operator: Increment Ops. (line 11)
+* plus sign (+), += operator <1>: Precedence. (line 95)
+* plus sign (+), += operator: Assignment Ops. (line 82)
+* plus sign (+), regexp operator: Regexp Operators. (line 105)
+* pointers to functions: Indirect Calls. (line 6)
+* portability: Escape Sequences. (line 102)
+* portability, #! (executable scripts): Executable Scripts. (line 33)
+* portability, ** operator and: Arithmetic Ops. (line 81)
+* portability, **= operator and: Assignment Ops. (line 143)
+* portability, ARGV variable: Executable Scripts. (line 59)
+* portability, backslash continuation and: Statements/Lines. (line 30)
+* portability, backslash in escape sequences: Escape Sequences.
+ (line 120)
+* portability, close() function and: Close Files And Pipes.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 81)
* portability, data files as single record: gawk split records.
(line 65)
* portability, deleting array elements: Delete. (line 56)
* portability, example programs: Library Functions. (line 42)
+<<<<<<< HEAD
* portability, functions, defining: Definition Syntax. (line 104)
* portability, 'gawk': New Ports. (line 6)
* portability, 'gettext' library and: Explaining gettext. (line 11)
+=======
+* portability, functions, defining: Definition Syntax. (line 108)
+* portability, gawk: New Ports. (line 6)
+* portability, gettext library and: Explaining gettext. (line 11)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* portability, internationalization and: I18N Portability. (line 6)
* portability, 'length()' function: String Functions. (line 176)
* portability, new 'awk' vs. old 'awk': Strings And Numbers. (line 56)
@@ -33146,10 +35371,17 @@ Index
(line 90)
* portability, 'NF' variable, decrementing: Changing Fields. (line 115)
* portability, operators: Increment Ops. (line 60)
+<<<<<<< HEAD
* portability, operators, not in POSIX 'awk': Precedence. (line 97)
* portability, 'POSIXLY_CORRECT' environment variable: Options.
(line 355)
* portability, 'substr()' function: String Functions. (line 509)
+=======
+* portability, operators, not in POSIX awk: Precedence. (line 98)
+* portability, POSIXLY_CORRECT environment variable: Options. (line 356)
+* portability, substr() function: String Functions. (line 510)
+* portable object files <1>: Translator i18n. (line 6)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* portable object files: Explaining gettext. (line 37)
* portable object files <1>: Translator i18n. (line 6)
* portable object files, converting to message object files: I18N Example.
@@ -33163,6 +35395,7 @@ Index
(line 6)
* positional specifiers, 'printf' statement, mixing with regular formats: Printf Ordering.
(line 57)
+<<<<<<< HEAD
* POSIX 'awk': This Manual. (line 14)
* POSIX 'awk' <1>: Assignment Ops. (line 138)
* POSIX 'awk', '**' operator and: Precedence. (line 97)
@@ -33221,6 +35454,61 @@ Index
* 'print' statement, line continuations and: Print Examples. (line 75)
* 'print' statement, 'OFMT' variable and: User-modified. (line 113)
* 'print' statement, See Also redirection, of output: Redirection.
+=======
+* POSIX awk <1>: Assignment Ops. (line 137)
+* POSIX awk: This Manual. (line 14)
+* POSIX awk, ** operator and: Precedence. (line 98)
+* POSIX awk, **= operator and: Assignment Ops. (line 143)
+* POSIX awk, < operator and: Getline/File. (line 26)
+* POSIX awk, arithmetic operators and: Arithmetic Ops. (line 30)
+* POSIX awk, backslashes in string constants: Escape Sequences.
+ (line 120)
+* POSIX awk, BEGIN/END patterns: I/O And BEGIN/END. (line 16)
+* POSIX awk, bracket expressions and: Bracket Expressions. (line 26)
+* POSIX awk, bracket expressions and, character classes: Bracket Expressions.
+ (line 32)
+* POSIX awk, break statement and: Break Statement. (line 51)
+* POSIX awk, changes in awk versions: POSIX. (line 6)
+* POSIX awk, continue statement and: Continue Statement. (line 44)
+* POSIX awk, CONVFMT variable and: User-modified. (line 30)
+* POSIX awk, date utility and: Time Functions. (line 254)
+* POSIX awk, field separators and <1>: Field Splitting Summary.
+ (line 40)
+* POSIX awk, field separators and: Fields. (line 6)
+* POSIX awk, FS variable and: User-modified. (line 60)
+* POSIX awk, function keyword in: Definition Syntax. (line 92)
+* POSIX awk, functions and, gsub()/sub(): Gory Details. (line 90)
+* POSIX awk, functions and, length(): String Functions. (line 176)
+* POSIX awk, GNU long options and: Options. (line 15)
+* POSIX awk, interval expressions in: Regexp Operators. (line 135)
+* POSIX awk, next/nextfile statements and: Next Statement. (line 45)
+* POSIX awk, numeric strings and: Variable Typing. (line 6)
+* POSIX awk, OFMT variable and <1>: Strings And Numbers. (line 57)
+* POSIX awk, OFMT variable and: OFMT. (line 27)
+* POSIX awk, period (.), using: Regexp Operators. (line 51)
+* POSIX awk, printf format strings and: Format Modifiers. (line 159)
+* POSIX awk, regular expressions and: Regexp Operators. (line 161)
+* POSIX awk, timestamps and: Time Functions. (line 6)
+* POSIX awk, | I/O operator and: Getline/Pipe. (line 55)
+* POSIX mode: Options. (line 252)
+* POSIX, awk and: Preface. (line 21)
+* POSIX, gawk extensions not included in: POSIX/GNU. (line 6)
+* POSIX, programs, implementing in awk: Clones. (line 6)
+* POSIXLY_CORRECT environment variable: Options. (line 336)
+* PREC variable: User-modified. (line 124)
+* precedence <1>: Precedence. (line 6)
+* precedence: Increment Ops. (line 60)
+* precedence, regexp operators: Regexp Operators. (line 156)
+* print debugger command: Viewing And Changing Data.
+ (line 36)
+* print statement: Printing. (line 16)
+* print statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 16)
+* print statement, commas, omitting: Print Examples. (line 31)
+* print statement, I/O operators in: Precedence. (line 71)
+* print statement, line continuations and: Print Examples. (line 76)
+* print statement, OFMT variable and: User-modified. (line 114)
+* print statement, See Also redirection, of output: Redirection.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 17)
* 'print' statement, 'sprintf()' function and: Round Function.
(line 6)
@@ -33253,6 +35541,7 @@ Index
* printing, unduplicated lines of text: Uniq Program. (line 6)
* printing, user information: Id Program. (line 6)
* private variables: Library Names. (line 11)
+<<<<<<< HEAD
* process group idIDof 'gawk' process: Auto-set. (line 183)
* process ID of 'gawk' process: Auto-set. (line 186)
* processes, two-way communications with: Two-way I/O. (line 23)
@@ -33275,6 +35564,28 @@ Index
* program, definition of: Getting Started. (line 21)
* programmers, attractiveness of: Two-way I/O. (line 6)
* programming conventions, '--non-decimal-data' option: Nondecimal Data.
+=======
+* process group idIDof gawk process: Auto-set. (line 187)
+* process ID of gawk process: Auto-set. (line 190)
+* processes, two-way communications with: Two-way I/O. (line 6)
+* processing data: Basic High Level. (line 6)
+* PROCINFO array <1>: Passwd Functions. (line 6)
+* PROCINFO array <2>: Time Functions. (line 47)
+* PROCINFO array: Auto-set. (line 137)
+* PROCINFO array, and communications via ptys: Two-way I/O. (line 99)
+* PROCINFO array, and group membership: Group Functions. (line 6)
+* PROCINFO array, and user and group ID numbers: Id Program. (line 15)
+* PROCINFO array, testing the field splitting: Passwd Functions.
+ (line 161)
+* PROCINFO array, uses: Auto-set. (line 246)
+* PROCINFO, values of sorted_in: Controlling Scanning.
+ (line 26)
+* profiling awk programs: Profiling. (line 6)
+* profiling awk programs, dynamically: Profiling. (line 179)
+* program identifiers: Auto-set. (line 155)
+* program, definition of: Getting Started. (line 21)
+* programming conventions, --non-decimal-data option: Nondecimal Data.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 36)
* programming conventions, 'ARGC'/'ARGV' variables: Auto-set. (line 35)
* programming conventions, 'exit' statement: Exit Statement. (line 38)
@@ -33283,9 +35594,15 @@ Index
* programming conventions, functions, calling: Calling Built-in.
(line 10)
* programming conventions, functions, writing: Definition Syntax.
+<<<<<<< HEAD
(line 61)
* programming conventions, 'gawk' extensions: Internal File Ops.
(line 44)
+=======
+ (line 64)
+* programming conventions, gawk extensions: Internal File Ops.
+ (line 45)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* programming conventions, private variable names: Library Names.
(line 23)
* programming language, recipe for: History. (line 6)
@@ -33301,10 +35618,17 @@ Index
(line 99)
* QSE Awk: Other Versions. (line 131)
* Quanstrom, Erik: Alarm Program. (line 8)
+<<<<<<< HEAD
* question mark ('?'), '?:' operator: Precedence. (line 91)
* question mark ('?'), regexp operator: Regexp Operators. (line 112)
* question mark ('?'), regexp operator <1>: GNU Regexp Operators.
(line 62)
+=======
+* question mark (?), ?: operator: Precedence. (line 92)
+* question mark (?), regexp operator <1>: GNU Regexp Operators.
+ (line 59)
+* question mark (?), regexp operator: Regexp Operators. (line 111)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* QuikTrim Awk: Other Versions. (line 135)
* 'quit' debugger command: Miscellaneous Debugger Commands.
(line 99)
@@ -33316,6 +35640,7 @@ Index
(line 62)
* Rakitzis, Byron: History Sorting. (line 25)
* Ramey, Chet: Acknowledgments. (line 60)
+<<<<<<< HEAD
* Ramey, Chet <1>: General Data Types. (line 6)
* 'rand': Numeric Functions. (line 48)
* random numbers, Cliff: Cliff Random Function.
@@ -33323,6 +35648,14 @@ Index
* random numbers, 'rand()'/'srand()' functions: Numeric Functions.
(line 48)
* random numbers, seed of: Numeric Functions. (line 78)
+=======
+* rand: Numeric Functions. (line 50)
+* random numbers, Cliff: Cliff Random Function.
+ (line 6)
+* random numbers, rand()/srand() functions: Numeric Functions.
+ (line 50)
+* random numbers, seed of: Numeric Functions. (line 80)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* range expressions (regexps): Bracket Expressions. (line 6)
* range patterns: Ranges. (line 6)
* range patterns, line continuation and: Ranges. (line 64)
@@ -33352,10 +35685,17 @@ Index
* records, multiline: Multiple Line. (line 6)
* records, printing: Print. (line 22)
* records, splitting input into: Records. (line 6)
+<<<<<<< HEAD
* records, terminating: awk split records. (line 123)
* records, treating files as: gawk split records. (line 91)
* recursive functions: Definition Syntax. (line 79)
* redirect 'gawk' output, in debugger: Debugger Info. (line 72)
+=======
+* records, terminating: awk split records. (line 124)
+* records, treating files as: gawk split records. (line 92)
+* recursive functions: Definition Syntax. (line 82)
+* redirect gawk output, in debugger: Debugger Info. (line 72)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* redirection of input: Getline/File. (line 6)
* redirection of output: Redirection. (line 6)
* reference counting, sorting arrays: Array Sorting Functions.
@@ -33405,7 +35745,7 @@ Index
* regular expressions, operators, 'gawk': GNU Regexp Operators.
(line 6)
* regular expressions, operators, precedence of: Regexp Operators.
- (line 157)
+ (line 156)
* regular expressions, searching for: Egrep Program. (line 6)
* relational operators, See comparison operators: Typing and Comparison.
(line 9)
@@ -33416,8 +35756,13 @@ Index
(line 6)
* return value, 'close()' function: Close Files And Pipes.
(line 131)
+<<<<<<< HEAD
* 'rev()' user-defined function: Function Example. (line 53)
* 'revoutput' extension: Extension Sample Revout.
+=======
+* rev() user-defined function: Function Example. (line 54)
+* revoutput extension: Extension Sample Revout.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 11)
* 'revtwoway' extension: Extension Sample Rev2way.
(line 12)
@@ -33436,6 +35781,7 @@ Index
* right shift: Bitwise Functions. (line 53)
* right shift, bitwise: Bitwise Functions. (line 32)
* Ritchie, Dennis: Basic Data Typing. (line 54)
+<<<<<<< HEAD
* 'RLENGTH' variable: Auto-set. (line 252)
* 'RLENGTH' variable, 'match()' function and: String Functions.
(line 224)
@@ -33469,6 +35815,40 @@ Index
* 'RT' variable: awk split records. (line 123)
* 'RT' variable <1>: Multiple Line. (line 129)
* 'RT' variable <2>: Auto-set. (line 265)
+=======
+* RLENGTH variable: Auto-set. (line 256)
+* RLENGTH variable, match() function and: String Functions. (line 224)
+* Robbins, Arnold <1>: Future Extensions. (line 6)
+* Robbins, Arnold <2>: Bugs. (line 32)
+* Robbins, Arnold <3>: Contributors. (line 141)
+* Robbins, Arnold <4>: General Data Types. (line 6)
+* Robbins, Arnold <5>: Alarm Program. (line 6)
+* Robbins, Arnold <6>: Passwd Functions. (line 90)
+* Robbins, Arnold <7>: Getline/Pipe. (line 39)
+* Robbins, Arnold: Command Line Field Separator.
+ (line 74)
+* Robbins, Bill: Getline/Pipe. (line 39)
+* Robbins, Harry: Acknowledgments. (line 92)
+* Robbins, Jean: Acknowledgments. (line 92)
+* Robbins, Miriam <1>: Passwd Functions. (line 90)
+* Robbins, Miriam <2>: Getline/Pipe. (line 39)
+* Robbins, Miriam: Acknowledgments. (line 92)
+* Rommel, Kai Uwe: Contributors. (line 42)
+* round to nearest integer: Numeric Functions. (line 38)
+* round() user-defined function: Round Function. (line 16)
+* rounding numbers: Round Function. (line 6)
+* ROUNDMODE variable: User-modified. (line 128)
+* RS variable <1>: User-modified. (line 133)
+* RS variable: awk split records. (line 12)
+* RS variable, multiline records and: Multiple Line. (line 17)
+* rshift: Bitwise Functions. (line 52)
+* RSTART variable: Auto-set. (line 262)
+* RSTART variable, match() function and: String Functions. (line 224)
+* RT variable <1>: Auto-set. (line 269)
+* RT variable <2>: Multiple Line. (line 129)
+* RT variable: awk split records. (line 124)
+* Rubin, Paul <1>: Contributors. (line 15)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Rubin, Paul: History. (line 30)
* Rubin, Paul <1>: Contributors. (line 16)
* rule, definition of: Getting Started. (line 21)
@@ -33485,6 +35865,11 @@ Index
* scalar values: Basic Data Typing. (line 13)
* scanning arrays: Scanning an Array. (line 6)
* scanning multidimensional arrays: Multiscanning. (line 11)
+<<<<<<< HEAD
+=======
+* Schorr, Andrew <1>: Contributors. (line 133)
+* Schorr, Andrew <2>: Auto-set. (line 296)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Schorr, Andrew: Acknowledgments. (line 60)
* Schorr, Andrew <1>: Auto-set. (line 292)
* Schorr, Andrew <2>: Contributors. (line 134)
@@ -33492,16 +35877,27 @@ Index
* Schreiber, Rita: Acknowledgments. (line 38)
* search and replace in strings: String Functions. (line 89)
* search in string: String Functions. (line 155)
+<<<<<<< HEAD
* search paths: Programs Exercises. (line 63)
* search paths <1>: PC Using. (line 10)
* search paths <2>: VMS Running. (line 57)
* search paths, for loadable extensions: AWKLIBPATH Variable. (line 6)
+=======
+* search paths <1>: VMS Running. (line 58)
+* search paths <2>: PC Using. (line 10)
+* search paths: Programs Exercises. (line 70)
+* search paths, for loadable extensions: AWKLIBPATH Variable. (line 6)
+* search paths, for source files <1>: VMS Running. (line 58)
+* search paths, for source files <2>: PC Using. (line 10)
+* search paths, for source files <3>: Programs Exercises. (line 70)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* search paths, for source files: AWKPATH Variable. (line 6)
* search paths, for source files <1>: Programs Exercises. (line 63)
* search paths, for source files <2>: PC Using. (line 10)
* search paths, for source files <3>: VMS Running. (line 57)
* searching, files for regular expressions: Egrep Program. (line 6)
* searching, for words: Dupword Program. (line 6)
+<<<<<<< HEAD
* 'sed' utility: Field Splitting Summary.
(line 45)
* 'sed' utility <1>: Simple Sed. (line 6)
@@ -33511,6 +35907,17 @@ Index
* semicolon (';'), separating statements in actions: Statements/Lines.
(line 90)
* semicolon (';'), separating statements in actions <1>: Action Overview.
+=======
+* sed utility <1>: Glossary. (line 11)
+* sed utility <2>: Simple Sed. (line 6)
+* sed utility: Field Splitting Summary.
+ (line 46)
+* seeding random number generator: Numeric Functions. (line 80)
+* semicolon (;), AWKPATH variable and: PC Using. (line 10)
+* semicolon (;), separating statements in actions <1>: Statements.
+ (line 10)
+* semicolon (;), separating statements in actions <2>: Action Overview.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 19)
* semicolon (';'), separating statements in actions <2>: Statements.
(line 10)
@@ -33532,9 +35939,14 @@ Index
(line 58)
* set directory of message catalogs: I18N Functions. (line 11)
* set watchpoint: Viewing And Changing Data.
+<<<<<<< HEAD
(line 66)
* shadowing of variable values: Definition Syntax. (line 67)
* shell quoting, double quote: Read Terminal. (line 25)
+=======
+ (line 67)
+* shadowing of variable values: Definition Syntax. (line 70)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* shell quoting, rules for: Quoting. (line 6)
* shells, piping commands into: Redirection. (line 141)
* shells, quoting: Using Shell Variables.
@@ -33559,8 +35971,13 @@ Index
* side effects <1>: Increment Ops. (line 11)
* side effects <2>: Increment Ops. (line 75)
* side effects, array indexing: Reference to Elements.
+<<<<<<< HEAD
(line 42)
* side effects, 'asort()' function: Array Sorting Functions.
+=======
+ (line 43)
+* side effects, asort() function: Array Sorting Functions.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 24)
* side effects, assignment expressions: Assignment Ops. (line 22)
* side effects, Boolean operators: Boolean Ops. (line 30)
@@ -33572,6 +35989,7 @@ Index
* sidebar, A Constant's Base Does Not Affect Its Value: Nondecimal-numbers.
(line 63)
* sidebar, Backslash Before Regular Characters: Escape Sequences.
+<<<<<<< HEAD
(line 109)
* sidebar, Changing 'FS' Does Not Affect the Fields: Field Splitting Summary.
(line 37)
@@ -33590,14 +36008,43 @@ Index
* sidebar, Portability Issues with '#!': Executable Scripts. (line 31)
* sidebar, Pre-POSIX 'awk' Used 'OFMT' For String Conversion: Strings And Numbers.
(line 54)
+=======
+ (line 118)
+* sidebar, Changing FS Does Not Affect the Fields: Field Splitting Summary.
+ (line 38)
+* sidebar, Changing NR and FNR: Auto-set. (line 311)
+* sidebar, Controlling Output Buffering with system(): I/O Functions.
+ (line 138)
+* sidebar, Escape Sequences for Metacharacters: Escape Sequences.
+ (line 136)
+* sidebar, FS and IGNORECASE: Field Splitting Summary.
+ (line 64)
+* sidebar, Interactive Versus Noninteractive Buffering: I/O Functions.
+ (line 107)
+* sidebar, Matching the Null String: Gory Details. (line 141)
+* sidebar, Operator Evaluation Order: Increment Ops. (line 58)
+* sidebar, Piping into sh: Redirection. (line 140)
+* sidebar, Pre-POSIX awk Used OFMT For String Conversion: Strings And Numbers.
+ (line 55)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* sidebar, Recipe For A Programming Language: History. (line 6)
* sidebar, 'RS = "\0"' Is Not Portable: gawk split records. (line 63)
* sidebar, So Why Does 'gawk' have 'BEGINFILE' and 'ENDFILE'?: Filetrans Function.
(line 83)
+<<<<<<< HEAD
* sidebar, Syntactic Ambiguities Between '/=' and Regular Expressions: Assignment Ops.
(line 147)
* sidebar, Understanding '$0': Changing Fields. (line 134)
* sidebar, Using 'close()''s Return Value: Close Files And Pipes.
+=======
+* sidebar, Syntactic Ambiguities Between /= and Regular Expressions: Assignment Ops.
+ (line 146)
+* sidebar, Understanding #!: Executable Scripts. (line 31)
+* sidebar, Understanding $0: Changing Fields. (line 134)
+* sidebar, Using \n in Bracket Expressions of Dynamic Regexps: Computed Regexps.
+ (line 57)
+* sidebar, Using close()'s Return Value: Close Files And Pipes.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 129)
* sidebar, Using '\n' in Bracket Expressions of Dynamic Regexps: Computed Regexps.
(line 57)
@@ -33612,6 +36059,7 @@ Index
* 'SIGUSR1' signal, for dynamic profiling: Profiling. (line 187)
* 'silent' debugger command: Debugger Execution Control.
(line 10)
+<<<<<<< HEAD
* 'sin': Numeric Functions. (line 89)
* sine: Numeric Functions. (line 89)
* single quote ('''): One-shot. (line 15)
@@ -33619,21 +36067,40 @@ Index
* single quote ('''), in shell commands: Quoting. (line 48)
* single quote ('''), vs. apostrophe: Comments. (line 27)
* single quote ('''), with double quotes: Quoting. (line 70)
+=======
+* sin: Numeric Functions. (line 91)
+* sine: Numeric Functions. (line 91)
+* single quote ('): One-shot. (line 15)
+* single quote (') in gawk command lines: Long. (line 33)
+* single quote ('), in shell commands: Quoting. (line 48)
+* single quote ('), vs. apostrophe: Comments. (line 27)
+* single quote ('), with double quotes: Quoting. (line 70)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* single-character fields: Single Character Fields.
(line 6)
* single-step execution, in the debugger: Debugger Execution Control.
(line 43)
* Skywalker, Luke: Undocumented. (line 6)
+<<<<<<< HEAD
* 'sleep' utility: Alarm Program. (line 110)
* 'sleep()' extension function: Extension Sample Time.
+=======
+* sleep utility: Alarm Program. (line 110)
+* sleep() extension function: Extension Sample Time.
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
(line 22)
* Solaris, POSIX-compliant 'awk': Other Versions. (line 96)
* sort array: String Functions. (line 42)
* sort array indices: String Functions. (line 42)
* sort function, arrays, sorting: Array Sorting Functions.
(line 6)
+<<<<<<< HEAD
* 'sort' utility: Word Sorting. (line 50)
* 'sort' utility, coprocesses and: Two-way I/O. (line 83)
+=======
+* sort utility: Word Sorting. (line 50)
+* sort utility, coprocesses and: Two-way I/O. (line 65)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* sorting characters in different languages: Explaining gettext.
(line 94)
* source code, 'awka': Other Versions. (line 64)
@@ -33649,9 +36116,15 @@ Index
* source code, 'pawk' (Python version): Other Versions. (line 125)
* source code, QSE Awk: Other Versions. (line 131)
* source code, QuikTrim Awk: Other Versions. (line 135)
+<<<<<<< HEAD
* source code, Solaris 'awk': Other Versions. (line 96)
* source files, search path for: Programs Exercises. (line 63)
* sparse arrays: Array Intro. (line 70)
+=======
+* source code, Solaris awk: Other Versions. (line 96)
+* source files, search path for: Programs Exercises. (line 70)
+* sparse arrays: Array Intro. (line 72)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Spencer, Henry: Glossary. (line 11)
* 'split': String Functions. (line 313)
* split string into array: String Functions. (line 294)
@@ -33663,10 +36136,17 @@ Index
* 'sprintf()' function, 'OFMT' variable and: User-modified. (line 113)
* 'sprintf()' function, 'print'/'printf' statements and: Round Function.
(line 6)
+<<<<<<< HEAD
* 'sqrt': Numeric Functions. (line 92)
* square brackets ('[]'), regexp operator: Regexp Operators. (line 56)
* square root: Numeric Functions. (line 92)
* 'srand': Numeric Functions. (line 96)
+=======
+* sqrt: Numeric Functions. (line 94)
+* square brackets ([]), regexp operator: Regexp Operators. (line 56)
+* square root: Numeric Functions. (line 94)
+* srand: Numeric Functions. (line 98)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* stack frame: Debugging Terms. (line 10)
* Stallman, Richard: Manual History. (line 6)
* Stallman, Richard <1>: Acknowledgments. (line 18)
@@ -33739,6 +36219,7 @@ Index
* 'substr': String Functions. (line 478)
* substring: String Functions. (line 478)
* Sumner, Andrew: Other Versions. (line 64)
+<<<<<<< HEAD
* supplementary groups of 'gawk' process: Auto-set. (line 237)
* 'switch' statement: Switch Statement. (line 6)
* 'SYMTAB' array: Auto-set. (line 269)
@@ -33749,6 +36230,17 @@ Index
* 't' debugger command (alias for 'tbreak'): Breakpoint Control.
(line 90)
* 'tbreak' debugger command: Breakpoint Control. (line 90)
+=======
+* supplementary groups of gawk process: Auto-set. (line 241)
+* switch statement: Switch Statement. (line 6)
+* SYMTAB array: Auto-set. (line 273)
+* syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops.
+ (line 148)
+* system: I/O Functions. (line 75)
+* systime: Time Functions. (line 66)
+* t debugger command (alias for tbreak): Breakpoint Control. (line 90)
+* tbreak debugger command: Breakpoint Control. (line 90)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Tcl: Library Names. (line 57)
* TCP/IP: TCP/IP Networking. (line 6)
* TCP/IP, support for: Special Network. (line 6)
@@ -33783,13 +36275,20 @@ Index
* tilde ('~'), '~' operator <3>: Regexp Constants. (line 6)
* tilde ('~'), '~' operator <4>: Comparison Operators.
(line 11)
+<<<<<<< HEAD
* tilde ('~'), '~' operator <5>: Comparison Operators.
(line 98)
* tilde ('~'), '~' operator <6>: Precedence. (line 79)
* tilde ('~'), '~' operator <7>: Expression Patterns. (line 24)
+=======
+* tilde (~), ~ operator <4>: Regexp Constants. (line 6)
+* tilde (~), ~ operator <5>: Case-sensitivity. (line 26)
+* tilde (~), ~ operator <6>: Computed Regexps. (line 6)
+* tilde (~), ~ operator: Regexp Usage. (line 19)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* 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)
@@ -33814,7 +36313,11 @@ Index
* troubleshooting, 'awk' uses 'FS' not 'IFS': Field Separators.
(line 29)
* troubleshooting, backslash before nonspecial character: Escape Sequences.
+<<<<<<< HEAD
(line 111)
+=======
+ (line 120)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* troubleshooting, division: Arithmetic Ops. (line 44)
* troubleshooting, fatal errors, field widths, specifying: Constant Size.
(line 23)
@@ -33867,6 +36370,7 @@ Index
* Unicode <2>: Glossary. (line 133)
* uninitialized variables, as array subscripts: Uninitialized Subscripts.
(line 6)
+<<<<<<< HEAD
* 'uniq' utility: Uniq Program. (line 6)
* 'uniq.awk' program: Uniq Program. (line 65)
* Unix: Glossary. (line 607)
@@ -33878,6 +36382,19 @@ Index
(line 64)
* Unix, 'awk' scripts and: Executable Scripts. (line 6)
* 'UNIXROOT' variable, on OS/2 systems: PC Using. (line 16)
+=======
+* uniq utility: Uniq Program. (line 6)
+* uniq.awk program: Uniq Program. (line 65)
+* Unix: Glossary. (line 611)
+* Unix awk, backslashes in escape sequences: Escape Sequences.
+ (line 132)
+* Unix awk, close() function and: Close Files And Pipes.
+ (line 131)
+* Unix awk, password files, field separators and: Command Line Field Separator.
+ (line 65)
+* Unix, awk scripts and: Executable Scripts. (line 6)
+* UNIXROOT variable, on OS/2 systems: PC Using. (line 16)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* unsigned integers: Computer Arithmetic. (line 41)
* 'until' debugger command: Debugger Execution Control.
(line 83)
@@ -33894,7 +36411,7 @@ Index
* 'USR1' signal, for dynamic profiling: Profiling. (line 187)
* values, numeric: Basic Data Typing. (line 13)
* values, string: Basic Data Typing. (line 13)
-* variable assignments and input files: Other Arguments. (line 19)
+* variable assignments and input files: Other Arguments. (line 23)
* variable typing: Typing and Comparison.
(line 9)
* variables: Other Features. (line 6)
@@ -33919,13 +36436,19 @@ Index
* variables, names of: Arrays. (line 18)
* variables, private: Library Names. (line 11)
* variables, setting: Options. (line 32)
+<<<<<<< HEAD
* variables, shadowing: Definition Syntax. (line 67)
* variables, types of: Assignment Ops. (line 39)
+=======
+* variables, shadowing: Definition Syntax. (line 70)
+* variables, types of: Assignment Ops. (line 40)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* variables, types of, comparison expressions and: Typing and Comparison.
(line 9)
* variables, uninitialized, as array subscripts: Uninitialized Subscripts.
(line 6)
* variables, user-defined: Variables. (line 6)
+<<<<<<< HEAD
* version of 'gawk': Auto-set. (line 207)
* version of 'gawk' extension API: Auto-set. (line 232)
* version of GNU MP library: Auto-set. (line 218)
@@ -33938,6 +36461,20 @@ Index
* vertical bar ('|'), '|&' operator (I/O) <2>: Two-way I/O. (line 44)
* vertical bar ('|'), '||' operator: Boolean Ops. (line 57)
* vertical bar ('|'), '||' operator <1>: Precedence. (line 88)
+=======
+* version of gawk: Auto-set. (line 211)
+* version of gawk extension API: Auto-set. (line 236)
+* version of GNU MP library: Auto-set. (line 222)
+* version of GNU MPFR library: Auto-set. (line 218)
+* vertical bar (|): Regexp Operators. (line 70)
+* vertical bar (|), | operator (I/O) <1>: Precedence. (line 65)
+* vertical bar (|), | operator (I/O): Getline/Pipe. (line 9)
+* vertical bar (|), |& operator (I/O) <1>: Two-way I/O. (line 25)
+* vertical bar (|), |& operator (I/O) <2>: Precedence. (line 65)
+* vertical bar (|), |& operator (I/O): Getline/Coprocess. (line 6)
+* vertical bar (|), || operator <1>: Precedence. (line 89)
+* vertical bar (|), || operator: Boolean Ops. (line 57)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac
* Vinschen, Corinna: Acknowledgments. (line 60)
* 'w' debugger command (alias for 'watch'): Viewing And Changing Data.
(line 66)
@@ -33984,14 +36521,43 @@ Index
* XOR bitwise operation: Bitwise Functions. (line 6)
* Yawitz, Efraim: Contributors. (line 132)
* Zaretskii, Eli: Acknowledgments. (line 60)
+<<<<<<< HEAD
* Zaretskii, Eli <1>: Contributors. (line 56)
* Zaretskii, Eli <2>: Bugs. (line 71)
* 'zerofile.awk' program: Empty Files. (line 20)
* Zoulas, Christos: Contributors. (line 67)
+=======
+* zerofile.awk program: Empty Files. (line 21)
+* Zoulas, Christos: Contributors. (line 66)
+* {} (braces): Profiling. (line 142)
+* {} (braces), actions and: Action Overview. (line 19)
+* {} (braces), statements, grouping: Statements. (line 10)
+* | (vertical bar): Regexp Operators. (line 70)
+* | (vertical bar), | operator (I/O) <1>: Precedence. (line 65)
+* | (vertical bar), | operator (I/O) <2>: Redirection. (line 57)
+* | (vertical bar), | operator (I/O): Getline/Pipe. (line 9)
+* | (vertical bar), |& operator (I/O) <1>: Two-way I/O. (line 25)
+* | (vertical bar), |& operator (I/O) <2>: Precedence. (line 65)
+* | (vertical bar), |& operator (I/O) <3>: Redirection. (line 102)
+* | (vertical bar), |& operator (I/O): Getline/Coprocess. (line 6)
+* | (vertical bar), |& operator (I/O), pipes, closing: Close Files And Pipes.
+ (line 119)
+* | (vertical bar), || operator <1>: Precedence. (line 89)
+* | (vertical bar), || operator: Boolean Ops. (line 57)
+* ~ (tilde), ~ operator <1>: Expression Patterns. (line 24)
+* ~ (tilde), ~ operator <2>: Precedence. (line 80)
+* ~ (tilde), ~ operator <3>: Comparison Operators.
+ (line 11)
+* ~ (tilde), ~ operator <4>: Regexp Constants. (line 6)
+* ~ (tilde), ~ operator <5>: Case-sensitivity. (line 26)
+* ~ (tilde), ~ operator <6>: Computed Regexps. (line 6)
+* ~ (tilde), ~ operator: Regexp Usage. (line 19)
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

Tag Table:
+<<<<<<< HEAD
Node: Top1200
Node: Foreword41842
Node: Preface46186
@@ -34540,5 +37106,556 @@ Node: Glossary1171890
Node: Copying1197041
Node: GNU Free Documentation License1234579
Node: Index1259696
+=======
+Node: Top1204
+Node: Foreword41858
+Node: Preface46203
+Ref: Preface-Footnote-149226
+Ref: Preface-Footnote-249333
+Node: History49565
+Node: Names51939
+Ref: Names-Footnote-153033
+Node: This Manual53179
+Ref: This Manual-Footnote-158958
+Node: Conventions59058
+Node: Manual History61403
+Ref: Manual History-Footnote-164479
+Ref: Manual History-Footnote-264520
+Node: How To Contribute64594
+Node: Acknowledgments65833
+Node: Getting Started70581
+Node: Running gawk73015
+Node: One-shot74205
+Node: Read Terminal75430
+Node: Long77455
+Node: Executable Scripts78849
+Ref: Executable Scripts-Footnote-181650
+Node: Comments81752
+Node: Quoting84225
+Node: DOS Quoting89538
+Node: Sample Data Files90213
+Node: Very Simple92820
+Node: Two Rules97705
+Node: More Complex99599
+Ref: More Complex-Footnote-1102513
+Node: Statements/Lines102598
+Ref: Statements/Lines-Footnote-1107054
+Node: Other Features107319
+Node: When108250
+Ref: When-Footnote-1110006
+Node: Intro Summary110071
+Node: Invoking Gawk110954
+Node: Command Line112469
+Node: Options113260
+Ref: Options-Footnote-1128907
+Node: Other Arguments128932
+Node: Naming Standard Input131760
+Node: Environment Variables132853
+Node: AWKPATH Variable133411
+Ref: AWKPATH Variable-Footnote-1136277
+Ref: AWKPATH Variable-Footnote-2136322
+Node: AWKLIBPATH Variable136582
+Node: Other Environment Variables137341
+Node: Exit Status140793
+Node: Include Files141468
+Node: Loading Shared Libraries145046
+Node: Obsolete146430
+Node: Undocumented147127
+Node: Invoking Summary147394
+Node: Regexp148994
+Node: Regexp Usage150453
+Node: Escape Sequences152486
+Node: Regexp Operators158557
+Ref: Regexp Operators-Footnote-1165988
+Ref: Regexp Operators-Footnote-2166135
+Node: Bracket Expressions166233
+Ref: table-char-classes168251
+Node: Leftmost Longest171191
+Node: Computed Regexps172395
+Node: GNU Regexp Operators175773
+Node: Case-sensitivity179479
+Ref: Case-sensitivity-Footnote-1182369
+Ref: Case-sensitivity-Footnote-2182604
+Node: Regexp Summary182712
+Node: Reading Files184181
+Node: Records186273
+Node: awk split records186995
+Node: gawk split records191853
+Ref: gawk split records-Footnote-1196374
+Node: Fields196411
+Ref: Fields-Footnote-1199375
+Node: Nonconstant Fields199461
+Ref: Nonconstant Fields-Footnote-1201691
+Node: Changing Fields201893
+Node: Field Separators207847
+Node: Default Field Splitting210549
+Node: Regexp Field Splitting211666
+Node: Single Character Fields214993
+Node: Command Line Field Separator216052
+Node: Full Line Fields219478
+Ref: Full Line Fields-Footnote-1219986
+Node: Field Splitting Summary220032
+Ref: Field Splitting Summary-Footnote-1223164
+Node: Constant Size223265
+Node: Splitting By Content227871
+Ref: Splitting By Content-Footnote-1231944
+Node: Multiple Line231984
+Ref: Multiple Line-Footnote-1237840
+Node: Getline238019
+Node: Plain Getline240230
+Node: Getline/Variable242936
+Node: Getline/File244083
+Node: Getline/Variable/File245467
+Ref: Getline/Variable/File-Footnote-1247066
+Node: Getline/Pipe247153
+Node: Getline/Variable/Pipe249839
+Node: Getline/Coprocess250946
+Node: Getline/Variable/Coprocess252198
+Node: Getline Notes252935
+Node: Getline Summary255739
+Ref: table-getline-variants256147
+Node: Read Timeout257059
+Ref: Read Timeout-Footnote-1260886
+Node: Command-line directories260944
+Node: Input Summary261848
+Node: Input Exercises264985
+Node: Printing265713
+Node: Print267435
+Node: Print Examples268928
+Node: Output Separators271707
+Node: OFMT273723
+Node: Printf275081
+Node: Basic Printf275987
+Node: Control Letters277526
+Node: Format Modifiers281517
+Node: Printf Examples287544
+Node: Redirection290008
+Node: Special Files296980
+Node: Special FD297513
+Ref: Special FD-Footnote-1301110
+Node: Special Network301184
+Node: Special Caveats302034
+Node: Close Files And Pipes302830
+Ref: Close Files And Pipes-Footnote-1309991
+Ref: Close Files And Pipes-Footnote-2310139
+Node: Output Summary310289
+Node: Output Exercises311286
+Node: Expressions311966
+Node: Values313151
+Node: Constants313827
+Node: Scalar Constants314507
+Ref: Scalar Constants-Footnote-1315366
+Node: Nondecimal-numbers315616
+Node: Regexp Constants318616
+Node: Using Constant Regexps319141
+Node: Variables322213
+Node: Using Variables322868
+Node: Assignment Options324592
+Node: Conversion326467
+Node: Strings And Numbers326991
+Ref: Strings And Numbers-Footnote-1330053
+Node: Locale influences conversions330162
+Ref: table-locale-affects332879
+Node: All Operators333467
+Node: Arithmetic Ops334097
+Node: Concatenation336602
+Ref: Concatenation-Footnote-1339421
+Node: Assignment Ops339527
+Ref: table-assign-ops344510
+Node: Increment Ops345813
+Node: Truth Values and Conditions349251
+Node: Truth Values350334
+Node: Typing and Comparison351383
+Node: Variable Typing352176
+Node: Comparison Operators355828
+Ref: table-relational-ops356238
+Node: POSIX String Comparison359788
+Ref: POSIX String Comparison-Footnote-1360872
+Node: Boolean Ops361010
+Ref: Boolean Ops-Footnote-1365349
+Node: Conditional Exp365440
+Node: Function Calls367167
+Node: Precedence371047
+Node: Locales374716
+Node: Expressions Summary376347
+Node: Patterns and Actions378888
+Node: Pattern Overview380004
+Node: Regexp Patterns381681
+Node: Expression Patterns382224
+Node: Ranges386004
+Node: BEGIN/END389110
+Node: Using BEGIN/END389872
+Ref: Using BEGIN/END-Footnote-1392608
+Node: I/O And BEGIN/END392714
+Node: BEGINFILE/ENDFILE394985
+Node: Empty397916
+Node: Using Shell Variables398233
+Node: Action Overview400516
+Node: Statements402843
+Node: If Statement404691
+Node: While Statement406189
+Node: Do Statement408233
+Node: For Statement409389
+Node: Switch Statement412541
+Node: Break Statement414929
+Node: Continue Statement416970
+Node: Next Statement418795
+Node: Nextfile Statement421185
+Node: Exit Statement423842
+Node: Built-in Variables426246
+Node: User-modified427373
+Ref: User-modified-Footnote-1435062
+Node: Auto-set435124
+Ref: Auto-set-Footnote-1448143
+Ref: Auto-set-Footnote-2448348
+Node: ARGC and ARGV448404
+Node: Pattern Action Summary452308
+Node: Arrays454531
+Node: Array Basics456080
+Node: Array Intro456906
+Ref: figure-array-elements458879
+Ref: Array Intro-Footnote-1461403
+Node: Reference to Elements461531
+Node: Assigning Elements463981
+Node: Array Example464472
+Node: Scanning an Array466204
+Node: Controlling Scanning469205
+Ref: Controlling Scanning-Footnote-1474378
+Node: Delete474694
+Ref: Delete-Footnote-1477445
+Node: Numeric Array Subscripts477502
+Node: Uninitialized Subscripts479685
+Node: Multidimensional481312
+Node: Multiscanning484425
+Node: Arrays of Arrays486014
+Node: Arrays Summary490677
+Node: Functions492782
+Node: Built-in493655
+Node: Calling Built-in494733
+Node: Numeric Functions496721
+Ref: Numeric Functions-Footnote-1501557
+Ref: Numeric Functions-Footnote-2501914
+Ref: Numeric Functions-Footnote-3501962
+Node: String Functions502231
+Ref: String Functions-Footnote-1525228
+Ref: String Functions-Footnote-2525357
+Ref: String Functions-Footnote-3525605
+Node: Gory Details525692
+Ref: table-sub-escapes527465
+Ref: table-sub-proposed528985
+Ref: table-posix-sub530349
+Ref: table-gensub-escapes531889
+Ref: Gory Details-Footnote-1533065
+Node: I/O Functions533216
+Ref: I/O Functions-Footnote-1540326
+Node: Time Functions540473
+Ref: Time Functions-Footnote-1550937
+Ref: Time Functions-Footnote-2551005
+Ref: Time Functions-Footnote-3551163
+Ref: Time Functions-Footnote-4551274
+Ref: Time Functions-Footnote-5551386
+Ref: Time Functions-Footnote-6551613
+Node: Bitwise Functions551879
+Ref: table-bitwise-ops552441
+Ref: Bitwise Functions-Footnote-1556686
+Node: Type Functions556870
+Node: I18N Functions558012
+Node: User-defined559657
+Node: Definition Syntax560461
+Ref: Definition Syntax-Footnote-1565774
+Node: Function Example565843
+Ref: Function Example-Footnote-1568483
+Node: Function Caveats568505
+Node: Calling A Function569023
+Node: Variable Scope569978
+Node: Pass By Value/Reference572966
+Node: Return Statement576476
+Node: Dynamic Typing579460
+Node: Indirect Calls580389
+Ref: Indirect Calls-Footnote-1590105
+Node: Functions Summary590233
+Node: Library Functions592883
+Ref: Library Functions-Footnote-1596501
+Ref: Library Functions-Footnote-2596644
+Node: Library Names596815
+Ref: Library Names-Footnote-1600288
+Ref: Library Names-Footnote-2600508
+Node: General Functions600594
+Node: Strtonum Function601622
+Node: Assert Function604496
+Node: Round Function607822
+Node: Cliff Random Function609363
+Node: Ordinal Functions610379
+Ref: Ordinal Functions-Footnote-1613444
+Ref: Ordinal Functions-Footnote-2613696
+Node: Join Function613907
+Ref: Join Function-Footnote-1615678
+Node: Getlocaltime Function615878
+Node: Readfile Function619614
+Node: Data File Management621453
+Node: Filetrans Function622085
+Node: Rewind Function626154
+Node: File Checking627712
+Ref: File Checking-Footnote-1628844
+Node: Empty Files629045
+Node: Ignoring Assigns631024
+Node: Getopt Function632578
+Ref: Getopt Function-Footnote-1643842
+Node: Passwd Functions644045
+Ref: Passwd Functions-Footnote-1653024
+Node: Group Functions653112
+Ref: Group Functions-Footnote-1661043
+Node: Walking Arrays661256
+Node: Library Functions Summary662859
+Node: Library Exercises664247
+Node: Sample Programs665527
+Node: Running Examples666297
+Node: Clones667025
+Node: Cut Program668249
+Node: Egrep Program678107
+Ref: Egrep Program-Footnote-1685694
+Node: Id Program685804
+Node: Split Program689458
+Ref: Split Program-Footnote-1692996
+Node: Tee Program693124
+Node: Uniq Program695911
+Node: Wc Program703334
+Ref: Wc Program-Footnote-1707599
+Node: Miscellaneous Programs707691
+Node: Dupword Program708904
+Node: Alarm Program710935
+Node: Translate Program715739
+Ref: Translate Program-Footnote-1720312
+Ref: Translate Program-Footnote-2720582
+Node: Labels Program720721
+Ref: Labels Program-Footnote-1724082
+Node: Word Sorting724166
+Node: History Sorting728209
+Node: Extract Program730045
+Node: Simple Sed737581
+Node: Igawk Program740643
+Ref: Igawk Program-Footnote-1754947
+Ref: Igawk Program-Footnote-2755148
+Node: Anagram Program755286
+Node: Signature Program758354
+Node: Programs Summary759601
+Node: Programs Exercises760816
+Ref: Programs Exercises-Footnote-1764947
+Node: Advanced Features765038
+Node: Nondecimal Data766986
+Node: Array Sorting768563
+Node: Controlling Array Traversal769260
+Node: Array Sorting Functions777540
+Ref: Array Sorting Functions-Footnote-1781447
+Node: Two-way I/O781641
+Ref: Two-way I/O-Footnote-1786585
+Ref: Two-way I/O-Footnote-2786764
+Node: TCP/IP Networking786846
+Node: Profiling789691
+Node: Advanced Features Summary797242
+Node: Internationalization799106
+Node: I18N and L10N800586
+Node: Explaining gettext801272
+Ref: Explaining gettext-Footnote-1806298
+Ref: Explaining gettext-Footnote-2806482
+Node: Programmer i18n806647
+Ref: Programmer i18n-Footnote-1811441
+Node: Translator i18n811490
+Node: String Extraction812284
+Ref: String Extraction-Footnote-1813417
+Node: Printf Ordering813503
+Ref: Printf Ordering-Footnote-1816285
+Node: I18N Portability816349
+Ref: I18N Portability-Footnote-1818798
+Node: I18N Example818861
+Ref: I18N Example-Footnote-1821567
+Node: Gawk I18N821639
+Node: I18N Summary822277
+Node: Debugger823616
+Node: Debugging824638
+Node: Debugging Concepts825079
+Node: Debugging Terms826935
+Node: Awk Debugging829532
+Node: Sample Debugging Session830424
+Node: Debugger Invocation830944
+Node: Finding The Bug832280
+Node: List of Debugger Commands838759
+Node: Breakpoint Control840091
+Node: Debugger Execution Control843755
+Node: Viewing And Changing Data847115
+Node: Execution Stack850473
+Node: Debugger Info851986
+Node: Miscellaneous Debugger Commands855980
+Node: Readline Support861164
+Node: Limitations862056
+Node: Debugging Summary864329
+Node: Arbitrary Precision Arithmetic865497
+Node: Computer Arithmetic866984
+Ref: Computer Arithmetic-Footnote-1871371
+Node: Math Definitions871428
+Ref: table-ieee-formats874717
+Ref: Math Definitions-Footnote-1875257
+Node: MPFR features875360
+Node: FP Math Caution876977
+Ref: FP Math Caution-Footnote-1878027
+Node: Inexactness of computations878396
+Node: Inexact representation879344
+Node: Comparing FP Values880699
+Node: Errors accumulate881663
+Node: Getting Accuracy883096
+Node: Try To Round885755
+Node: Setting precision886654
+Ref: table-predefined-precision-strings887336
+Node: Setting the rounding mode889129
+Ref: table-gawk-rounding-modes889493
+Ref: Setting the rounding mode-Footnote-1892947
+Node: Arbitrary Precision Integers893126
+Ref: Arbitrary Precision Integers-Footnote-1896899
+Node: POSIX Floating Point Problems897048
+Ref: POSIX Floating Point Problems-Footnote-1900924
+Node: Floating point summary900962
+Node: Dynamic Extensions903166
+Node: Extension Intro904718
+Node: Plugin License905983
+Node: Extension Mechanism Outline906668
+Ref: figure-load-extension907092
+Ref: figure-load-new-function908577
+Ref: figure-call-new-function909579
+Node: Extension API Description911563
+Node: Extension API Functions Introduction913013
+Node: General Data Types917880
+Ref: General Data Types-Footnote-1923573
+Node: Requesting Values923872
+Ref: table-value-types-returned924609
+Node: Memory Allocation Functions925567
+Ref: Memory Allocation Functions-Footnote-1928314
+Node: Constructor Functions928410
+Node: Registration Functions930168
+Node: Extension Functions930853
+Node: Exit Callback Functions933155
+Node: Extension Version String934403
+Node: Input Parsers935053
+Node: Output Wrappers944867
+Node: Two-way processors949383
+Node: Printing Messages951587
+Ref: Printing Messages-Footnote-1952664
+Node: Updating `ERRNO'952816
+Node: Accessing Parameters953555
+Node: Symbol Table Access954785
+Node: Symbol table by name955299
+Node: Symbol table by cookie957275
+Ref: Symbol table by cookie-Footnote-1961408
+Node: Cached values961471
+Ref: Cached values-Footnote-1964975
+Node: Array Manipulation965066
+Ref: Array Manipulation-Footnote-1966164
+Node: Array Data Types966203
+Ref: Array Data Types-Footnote-1968906
+Node: Array Functions968998
+Node: Flattening Arrays972872
+Node: Creating Arrays979724
+Node: Extension API Variables984455
+Node: Extension Versioning985091
+Node: Extension API Informational Variables986992
+Node: Extension API Boilerplate988078
+Node: Finding Extensions991882
+Node: Extension Example992442
+Node: Internal File Description993172
+Node: Internal File Ops997263
+Ref: Internal File Ops-Footnote-11008695
+Node: Using Internal File Ops1008835
+Ref: Using Internal File Ops-Footnote-11011182
+Node: Extension Samples1011450
+Node: Extension Sample File Functions1012974
+Node: Extension Sample Fnmatch1020542
+Node: Extension Sample Fork1022024
+Node: Extension Sample Inplace1023237
+Node: Extension Sample Ord1024912
+Node: Extension Sample Readdir1025748
+Ref: table-readdir-file-types1026604
+Node: Extension Sample Revout1027403
+Node: Extension Sample Rev2way1027994
+Node: Extension Sample Read write array1028735
+Node: Extension Sample Readfile1030614
+Node: Extension Sample API Tests1031714
+Node: Extension Sample Time1032239
+Node: gawkextlib1033554
+Node: Extension summary1036367
+Node: Extension Exercises1040060
+Node: Language History1040782
+Node: V7/SVR3.11042425
+Node: SVR41044745
+Node: POSIX1046187
+Node: BTL1047573
+Node: POSIX/GNU1048307
+Node: Feature History1054083
+Node: Common Extensions1067174
+Node: Ranges and Locales1068486
+Ref: Ranges and Locales-Footnote-11073103
+Ref: Ranges and Locales-Footnote-21073130
+Ref: Ranges and Locales-Footnote-31073364
+Node: Contributors1073585
+Node: History summary1079010
+Node: Installation1080379
+Node: Gawk Distribution1081330
+Node: Getting1081814
+Node: Extracting1082638
+Node: Distribution contents1084280
+Node: Unix Installation1090050
+Node: Quick Installation1090667
+Node: Additional Configuration Options1093109
+Node: Configuration Philosophy1094847
+Node: Non-Unix Installation1097198
+Node: PC Installation1097656
+Node: PC Binary Installation1098967
+Node: PC Compiling1100815
+Ref: PC Compiling-Footnote-11103814
+Node: PC Testing1103919
+Node: PC Using1105095
+Node: Cygwin1109247
+Node: MSYS1110056
+Node: VMS Installation1110570
+Node: VMS Compilation1111366
+Ref: VMS Compilation-Footnote-11112588
+Node: VMS Dynamic Extensions1112646
+Node: VMS Installation Details1114019
+Node: VMS Running1116271
+Node: VMS GNV1119105
+Node: VMS Old Gawk1119828
+Node: Bugs1120298
+Node: Other Versions1124302
+Node: Installation summary1130529
+Node: Notes1131585
+Node: Compatibility Mode1132450
+Node: Additions1133232
+Node: Accessing The Source1134157
+Node: Adding Code1135593
+Node: New Ports1141771
+Node: Derived Files1146252
+Ref: Derived Files-Footnote-11151333
+Ref: Derived Files-Footnote-21151367
+Ref: Derived Files-Footnote-31151963
+Node: Future Extensions1152077
+Node: Implementation Limitations1152683
+Node: Extension Design1153931
+Node: Old Extension Problems1155085
+Ref: Old Extension Problems-Footnote-11156602
+Node: Extension New Mechanism Goals1156659
+Ref: Extension New Mechanism Goals-Footnote-11160019
+Node: Extension Other Design Decisions1160208
+Node: Extension Future Growth1162314
+Node: Old Extension Mechanism1163150
+Node: Notes summary1164912
+Node: Basic Concepts1166098
+Node: Basic High Level1166779
+Ref: figure-general-flow1167051
+Ref: figure-process-flow1167650
+Ref: Basic High Level-Footnote-11170879
+Node: Basic Data Typing1171064
+Node: Glossary1174392
+Node: Copying1199544
+Node: GNU Free Documentation License1237100
+Node: Index1262236
+>>>>>>> ca9f23d6c33c4b5cb3786d480948a42988ca99ac

End Tag Table