aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawk.info
diff options
context:
space:
mode:
Diffstat (limited to 'doc/gawk.info')
-rw-r--r--doc/gawk.info5214
1 files changed, 2981 insertions, 2233 deletions
diff --git a/doc/gawk.info b/doc/gawk.info
index 075d4947..316b56c5 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -1,4 +1,4 @@
-This is gawk.info, produced by makeinfo version 4.0 from gawk.texi.
+This is gawk.info, produced by makeinfo version 4.2 from gawk.texi.
INFO-DIR-SECTION GNU Packages
START-INFO-DIR-ENTRY
@@ -9,15 +9,13 @@ START-INFO-DIR-ENTRY
* awk: (gawk)Invoking gawk. Text scanning and processing.
END-INFO-DIR-ENTRY
- This file documents `awk', a program that you can use to select
-particular records in a file and perform operations upon them.
+Copyright (C) 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000,
+2001, 2002 Free Software Foundation, Inc.
- This is Edition 3 of `GAWK: Effective AWK Programming: A User's
-Guide for GNU Awk', for the 3.1.0 version of the GNU implementation of
-AWK.
- Copyright (C) 1989, 1991, 1992, 1993, 1996-2001 Free Software
-Foundation, Inc.
+ This is Edition 3 of `GAWK: Effective AWK Programming: A User's
+Guide for GNU Awk', for the 3.1.1 (or later) version of the GNU
+implementation of AWK.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -32,7 +30,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
b. "You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development."
-
+

File: gawk.info, Node: Top, Next: Foreword, Prev: (dir), Up: (dir)
@@ -42,10 +40,28 @@ General Introduction
This file documents `awk', a program that you can use to select
particular records in a file and perform operations upon them.
+Copyright (C) 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000,
+2001, 2002 Free Software Foundation, Inc.
+
+
This is Edition 3 of `GAWK: Effective AWK Programming: A User's
-Guide for GNU Awk', for the 3.1.0 version of the GNU implementation of
-AWK.
+Guide for GNU Awk', for the 3.1.1 (or later) version of the GNU
+implementation of AWK.
+ Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation; with the
+Invariant Sections being "GNU General Public License", the Front-Cover
+texts being (a) (see below), and with the Back-Cover Texts being (b)
+(see below). A copy of the license is included in the section entitled
+"GNU Free Documentation License".
+
+ a. "A GNU Manual"
+
+ b. "You have freedom to copy and modify this GNU Manual, like GNU
+ software. Copies published by the Free Software Foundation raise
+ funds for GNU development."
+
* Menu:
* Foreword:: Some nice words about this
@@ -102,7 +118,7 @@ AWK.
* Acknowledgments:: Acknowledgments.
* Running gawk:: How to run `gawk' programs;
includes command-line syntax.
-* One-shot:: Running a short throw-away `awk'
+* One-shot:: Running a short throwaway `awk'
program.
* Read Terminal:: Using no input files (input from terminal
instead).
@@ -126,7 +142,7 @@ AWK.
* When:: When to use `gawk' and when to use
other things.
* Regexp Usage:: How to Use Regular Expressions.
-* Escape Sequences:: How to write non-printing characters.
+* Escape Sequences:: How to write nonprinting characters.
* Regexp Operators:: Regular Expression Operators.
* Character Lists:: What can go between `[...]'.
* GNU Regexp Operators:: Operators specific to GNU software.
@@ -135,7 +151,7 @@ AWK.
* Computed Regexps:: Using Dynamic Regexps.
* Records:: Controlling how data is split into records.
* Fields:: An introduction to fields.
-* Non-Constant Fields:: Non-constant Field Numbers.
+* Nonconstant Fields:: Nonconstant Field Numbers.
* Changing Fields:: Changing the Contents of a Field.
* Field Separators:: The field separator and how to change it.
* Regexp Field Splitting:: Using regexps as the field separator.
@@ -183,7 +199,7 @@ AWK.
* Close Files And Pipes:: Closing Input and Output Files and Pipes.
* Constants:: String, numeric and regexp constants.
* Scalar Constants:: Numeric and string constants.
-* Non-decimal-numbers:: What are octal and hex numbers.
+* Nondecimal-numbers:: What are octal and hex numbers.
* Regexp Constants:: Regular Expression constants.
* Using Constant Regexps:: When and how to use a regexp constant.
* Variables:: Variables give names to values for later
@@ -296,7 +312,7 @@ AWK.
* I18N Portability:: `awk'-level portability issues.
* I18N Example:: A simple i18n example.
* Gawk I18N:: `gawk' is also internationalized.
-* Non-decimal Data:: Allowing non-decimal input data.
+* Nondecimal Data:: Allowing nondecimal input data.
* Two-way I/O:: Two-way communications with another
process.
* TCP/IP Networking:: Using `gawk' for network
@@ -388,6 +404,8 @@ AWK.
and OS/2.
* PC Using:: Running `gawk' on MS-DOS, Win32 and
OS/2.
+* Cygwin:: Building and running `gawk' for
+ Cygwin.
* VMS Installation:: Installing `gawk' on VMS.
* VMS Compilation:: How to compile `gawk' under VMS.
* VMS Installation Details:: How to install `gawk' under VMS.
@@ -425,16 +443,12 @@ AWK.
To Miriam, for making me complete.
-
To Chana, for the joy you bring us.
-
To Rivka, for the exponential increase.
-
To Nachum, for the added dimension.
-
To Malka, for the new beginning.

@@ -533,7 +547,7 @@ Preface
You might want to extract certain lines and discard the rest. Or you
may need to make changes wherever certain patterns appear, but leave
the rest of the file alone. Writing single-use programs for these
-tasks in languages such as C, C++ or Pascal is time-consuming and
+tasks in languages such as C, C++, or Pascal is time-consuming and
inconvenient. Such jobs are often easier with `awk'. The `awk'
utility interprets a special-purpose programming language that makes it
easy to handle simple data-reformatting jobs.
@@ -556,7 +570,7 @@ This means that all properly written `awk' programs should work with
* Produce indexes and perform other document preparation tasks
* Experiment with algorithms that you can adapt later to other
- computer languages.
+ computer languages
In addition, `gawk' provides facilities that make it easy to:
@@ -564,21 +578,21 @@ This means that all properly written `awk' programs should work with
* Sort data
- * Perform simple network communications.
+ * Perform simple network communications
This Info file teaches you about the `awk' language and how you can
use it effectively. You should already be familiar with basic system
commands, such as `cat' and `ls',(1) as well as basic shell facilities,
-such as Input/Output (I/O) redirection and pipes.
+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
`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 80386 PC-based computers, up
+broad range of Unix systems, ranging from 80386 PC-based computers up
through large-scale systems, such as Crays. `gawk' has also been ported
-to Mac OS X, MS-DOS, Microsoft Windows (all versions) and OS/2 PC's,
-Atari and Amiga micro-computers, BeOS, Tandem D20, and VMS.
+to Mac OS X, MS-DOS, Microsoft Windows (all versions) and OS/2 PCs,
+Atari and Amiga microcomputers, BeOS, Tandem D20, and VMS.
* Menu:
@@ -596,7 +610,7 @@ Atari and Amiga micro-computers, BeOS, Tandem D20, and VMS.
---------- Footnotes ----------
(1) These commands are available on POSIX-compliant systems, as well
-as on traditional Unix based systems. If you are using some other
+as on traditional Unix-based systems. If you are using some other
operating system, you still need to be familiar with the ideas of I/O
redirection and pipes.
@@ -607,7 +621,6 @@ History of `awk' and `gawk'
===========================
Recipe For A Programming Language
-
1 part `egrep' 1 part `snobol'
2 parts `ed' 3 parts C
@@ -662,9 +675,9 @@ The language described in this Info file is often referred to as "new
Because of this, many systems have multiple versions of `awk'. Some
systems have an `awk' utility that implements the original version of
the `awk' language and a `nawk' utility for the new version. Others
-have an `oawk' for the "old `awk'" language and plain `awk' for the new
-one. Still others only have one version, which is usually the new
-one.(1)
+have an `oawk' version for the "old `awk'" language and plain `awk' for
+the new one. Still others only have one version, which is usually the
+new one.(1)
All in all, this makes it difficult for you to know which version of
`awk' you should run when writing your programs. The best advice I can
@@ -689,15 +702,11 @@ File: gawk.info, Node: This Manual, Next: Conventions, Prev: Names, Up: Pref
Using This Book
===============
- Documentation is like sex: when it is good, it is very, very good;
- and when it is bad, it is better than nothing.
- Dick Brandon
-
The term `awk' refers to a particular program as well as to the
language you use to tell this program what to do. When we need to be
-careful, we call the program "the `awk' utility" and the language "the
-`awk' language." This Info file explains both the `awk' language and
-how to run the `awk' utility. The term "`awk' program" refers to a
+careful, we call the language "the `awk' language," and the program
+"the `awk' utility." This Info file explains both the `awk' language
+and how to run the `awk' utility. The term "`awk' program" refers to a
program written by you in the `awk' programming language.
Primarily, this Info file explains the features of `awk', as defined
@@ -710,7 +719,8 @@ noted.
There are subsections labelled as *Advanced Notes* scattered
throughout the Info file. They add a more complete explanation of
points that are relevant, but not likely to be of interest on first
-reading. All appear in the index, under the heading "advanced notes."
+reading. All appear in the index, under the heading "advanced
+features."
Most of the time, the examples use complete `awk' programs. In some
of the more advanced sections, only the part of the `awk' program that
@@ -750,7 +760,7 @@ structure: associative arrays. Deleting array elements and whole
arrays is also described, as well as sorting arrays in `gawk'.
*Note Functions::, describes the built-in functions `awk' and `gawk'
-provide for you, as well as how to define your own functions.
+provide, as well as how to define your own functions.
*Note Internationalization with `gawk': Internationalization,
describes special features in `gawk' for translating program messages
@@ -767,13 +777,11 @@ program source files.
*Note A Library of `awk' Functions: Library Functions, and *Note
Practical `awk' Programs: Sample Programs, provide many sample `awk'
-programs. Reading them allows you to see `awk' being used for solving
-real problems.
+programs. Reading them allows you to see `awk' solving real problems.
*Note The Evolution of the `awk' Language: Language History,
-describes how the `awk' language has evolved since it was first
-released to present. It also describes how `gawk' has acquired
-features over time.
+describes how the `awk' language has evolved since first release to
+present. It also describes how `gawk' has acquired features over time.
*Note Installing `gawk': Installation, describes how to get `gawk',
how to compile it under Unix, and how to compile and use it on different
@@ -788,20 +796,20 @@ write extension libraries, and some possible future directions for
*Note Basic Programming Concepts: Basic Concepts, provides some very
cursory background material for those who are completely unfamiliar
with computer programming. Also centralized there is a discussion of
-some of the issues involved in using floating-point numbers.
+some of the issues surrounding floating-point numbers.
The *Note Glossary::, defines most, if not all, the significant
terms used throughout the book. If you find terms that you aren't
-familiar with, try looking them up.
+familiar with, try looking them up here.
*Note GNU General Public License: Copying, and *Note GNU Free
Documentation License::, present the licenses that cover the `gawk'
-source code, and this Info file, respectively.
+source code and this Info file, respectively.
---------- Footnotes ----------
- (1) All such differences appear in the index under the heading
-"differences between `gawk' and `awk'."
+ (1) All such differences appear in the index under the entry
+"differences in `awk' and `gawk'."

File: gawk.info, Node: Conventions, Next: Manual History, Prev: This Manual, Up: Preface
@@ -855,10 +863,7 @@ File: gawk.info, Node: Manual History, Next: How To Contribute, Prev: Convent
The GNU Project and This Book
=============================
- Software is like sex: it's better when it's free.
- Linus Torvalds
-
- The Free Software Foundation (FSF) is a non-profit organization
+ The Free Software Foundation (FSF) is a nonprofit organization
dedicated to the production and distribution of freely distributable
software. It was founded by Richard M. Stallman, the author of the
original Emacs editor. GNU Emacs is the most widely used version of
@@ -960,12 +965,12 @@ acknowledgments:
I would like to acknowledge Richard M. Stallman, for his vision of a
better world and for his courage in founding the FSF and starting the
-GNU project.
+GNU Project.
The following people (in alphabetical order) provided helpful
comments on various versions of this book, up to and including this
edition. Rick Adams, Nelson H.F. Beebe, Karl Berry, Dr. Michael
-Brennan, Rich Burridge, Claire Coutier, Diane Close, Scott Deifik,
+Brennan, Rich Burridge, Claire Cloutier, Diane Close, Scott Deifik,
Christopher ("Topher") Eliot, Jeffrey Friedl, Dr. Darrel Hankerson,
Michal Jaegermann, Dr. Richard J. LeBlanc, Michael Lijewski, Pat Rankin,
Miriam Robbins, Mary Sheehan, and Chuck Toporek.
@@ -993,12 +998,12 @@ a significant pleasure.
Ulrich Drepper, provided invaluable help and feedback for the design of
the internationalization features.
- Nelson Beebe, Martin Brown, Scott Deifik, Darrel Hankerson, Michal
-Jaegermann, Ju"rgen Kahrs, Pat Rankin, Kai Uwe Rommel, and Eli Zaretskii
-(in alphabetical order) are long-time members of the `gawk' "crack
-portability team." Without their hard work and help, `gawk' would not
-be nearly the fine program it is today. It has been and continues to
-be a pleasure working with this team of fine people.
+ Nelson Beebe, Martin Brown, Andreas Buening, Scott Deifik, Darrel
+Hankerson, Isamu Hasegawa, Michal Jaegermann, Ju"rgen Kahrs, Pat Rankin,
+Kai Uwe Rommel, and Eli Zaretskii (in alphabetical order) make up the
+`gawk' "crack portability team." Without their hard work and help,
+`gawk' would not be nearly the fine program it is today. It has been
+and continues to be a pleasure working with this team of fine people.
David and I would like to thank Brian Kernighan of Bell Laboratories
for invaluable assistance during the testing and debugging of `gawk',
@@ -1011,15 +1016,14 @@ Associates contributed significant editorial help for this Info file
for the 3.1 release of `gawk'.
I must thank my wonderful wife, Miriam, for her patience through the
-many versions of this project, for her proof-reading, and for sharing
-me with the computer. I would like to thank my parents for their love,
+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 for the grace with which they raised and educated me. Finally, I
also must acknowledge my gratitude to G-d, for the many opportunities
He has sent my way, as well as for the gifts He has given me with which
to take advantage of those opportunities.
-
Arnold Robbins
Nof Ayalon
ISRAEL
@@ -1044,7 +1048,7 @@ find it. Most other languages are "procedural"; you have to describe,
in great detail, every step the program is to take. When working with
procedural languages, it is usually much harder to clearly describe the
data your program will process. For this reason, `awk' programs are
-often refreshingly easy to write and read.
+often refreshingly easy to read and write.
When you run `awk', you specify an `awk' "program" that tells `awk'
what to do. The program consists of a series of "rules". (It may also
@@ -1100,7 +1104,7 @@ variations of each.
* Menu:
-* One-shot:: Running a short throw-away `awk'
+* One-shot:: Running a short throwaway `awk'
program.
* Read Terminal:: Using no input files (input from terminal
instead).
@@ -1114,8 +1118,8 @@ variations of each.

File: gawk.info, Node: One-shot, Next: Read Terminal, Prev: Running gawk, Up: Running gawk
-One-Shot Throw-Away `awk' Programs
-----------------------------------
+One-Shot Throwaway `awk' Programs
+---------------------------------
Once you are familiar with `awk', you will often type in simple
programs the moment you want to use them. Then you can write the
@@ -1160,8 +1164,8 @@ MS-DOS, it is `Ctrl-z'.)
As an example, the following program prints a friendly piece of
advice (from Douglas Adams's `The Hitchhiker's Guide to the Galaxy'),
-to keep you from worrying about the complexities of computer
-programming. (`BEGIN' is a feature we haven't discussed yet.):
+to keep you from worrying about the complexities of computer programming
+(`BEGIN' is a feature we haven't discussed yet):
$ awk "BEGIN { print \"Don't Panic!\" }"
-| Don't Panic!
@@ -1172,8 +1176,8 @@ rules--in particular because it mixes both single quotes and double
quotes.(1)
This next simple `awk' program emulates the `cat' utility; it copies
-whatever you type at the keyboard to its standard output. (Why this
-works is explained shortly.)
+whatever you type on the keyboard to its standard output (why this
+works is explained shortly).
$ awk '{ print }'
Now is the time for all good men
@@ -1287,8 +1291,8 @@ interpreter to run and an 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 is either options
-to `awk', or data files, or both.
+of the `awk' program. The rest of the argument list contains either
+options to `awk', or data files, or both.

File: gawk.info, Node: Comments, Next: Quoting, Prev: Executable Scripts, Up: Running gawk
@@ -1312,12 +1316,12 @@ put the following into `advice':
# keep novice users from being afraid of the computer.
BEGIN { print "Don't Panic!" }
- You can put comment lines into keyboard-composed throw-away `awk'
+ You can put comment lines into keyboard-composed throwaway `awk'
programs, but this usually isn't very useful; the purpose of a comment
is to help you or another person understand the program when reading it
at a later time.
- *Caution:* As mentioned in *Note One-Shot Throw-Away `awk' Programs:
+ *Caution:* As mentioned in *Note One-Shot Throwaway `awk' Programs:
One-shot, you can enclose small to medium programs in single quotes, in
order to keep your shell scripts self-contained. When doing so,
_don't_ put an apostrophe (i.e., a single quote) into a comment (or
@@ -1331,7 +1335,7 @@ example, look at the following:
>
The shell sees that the first two quotes match, and that a new
-quoted object begins at the end of the command-line. It therefore
+quoted object begins at the end of the command line. It therefore
prompts with the secondary prompt, waiting for more input. With Unix
`awk', closing the quoted string produces this result:
@@ -1347,7 +1351,7 @@ node describes the shell's quoting rules.

File: gawk.info, Node: Quoting, Prev: Comments, Up: Running gawk
-Shell Quoting Issues
+Shell-Quoting Issues
--------------------
For short to medium length `awk' programs, it is most convenient to
@@ -1375,8 +1379,8 @@ Bourne-Again Shell). If you use `csh', you're on your own.
quotes. The shell does no interpretation of the quoted text,
passing it on verbatim to the command. It is _impossible_ to
embed a single quote inside single-quoted text. Refer back to
- *Note Comments in `awk' Programs: Comments, for an example showing
- what happens if you try.
+ *Note Comments in `awk' Programs: Comments, for an example of what
+ happens if you try.
* Double quotes protect most things between the opening and closing
quotes. The shell does at least variable and command substitution
@@ -1385,7 +1389,7 @@ Bourne-Again Shell). If you use `csh', you're on your own.
Since certain characters within double-quoted text are processed
by the shell, they must be "escaped" within the text. Of note are
- the characters `$', ``', `\' and `"', all of which must be
+ the characters `$', ``', `\', and `"', all of which must be
preceded by a backslash within double-quoted text if they are to
be passed on literally to the program. (The leading backslash is
stripped first.) Thus, the example seen in *Note Running `awk'
@@ -1448,18 +1452,18 @@ Data Files for the Examples
===========================
Many of the examples in this Info file take their input from two
-sample data files. The first, called `BBS-list', represents a list of
+sample data files. The first, `BBS-list', represents a list of
computer bulletin board systems together with information about those
systems. The second data file, called `inventory-shipped', contains
information about monthly shipments. In both files, each line is
considered to be one "record".
- In the file `BBS-list', each record contains the name of a computer
-bulletin board, its phone number, the board's baud rate(s), and a code
-for the number of hours it is operational. An `A' in the last column
-means the board operates 24 hours a day. A `B' in the last column
-means the board only operates on evening and weekend hours. A `C'
-means the board operates only on weekends:
+ In the data file `BBS-list', each record contains the name of a
+computer bulletin board, its phone number, the board's baud rate(s),
+and a code for the number of hours it is operational. An `A' in the
+last column means the board operates 24 hours a day. A `B' in the last
+column means the board only operates on evening and weekend hours. A
+`C' means the board operates only on weekends:
aardvark 555-5553 1200/300 B
alpo-net 555-3412 2400/1200/300 A
@@ -1473,12 +1477,12 @@ means the board operates only on weekends:
sdace 555-3430 2400/1200/300 A
sabafoo 555-2127 1200/300 C
- The second data file, called `inventory-shipped', represents
-information about 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.
+ The data file `inventory-shipped' represents information about
+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.
Jan 13 25 15 115
Feb 15 32 24 226
@@ -1519,10 +1523,10 @@ Some Simple Examples
====================
The following command runs a simple `awk' program that searches the
-input file `BBS-list' for the character string `foo'. (A string of
-characters is usually called a "string". The term "string" is based on
-similar usage in English, such as "a string of pearls," or, "a string
-of cars in a train."):
+input file `BBS-list' for the character string `foo' (a grouping of
+characters is usually called a "string"; the term "string" is based on
+similar usage in English, such as "a string of pearls," or "a string of
+cars in a train"):
awk '/foo/ { print $0 }' BBS-list
@@ -1552,10 +1556,10 @@ for _every_ input line. If the action is omitted, the default action
is to print all lines that match the pattern.
Thus, we could leave out the action (the `print' statement and the
-curly braces) in the above example and the result would be the same: all
-lines matching the pattern `foo' are printed. By comparison, omitting
-the `print' statement but retaining the curly braces makes an empty
-action that does nothing (i.e., no lines are printed).
+curly braces) in the previous example and the result would be the same:
+all lines matching the pattern `foo' are printed. By comparison,
+omitting the `print' statement but retaining the curly braces makes an
+empty action that does nothing (i.e., no lines are printed).
Many practical `awk' programs are just a line or two. Following is a
collection of useful, short programs to get you started. Some of these
@@ -1617,7 +1621,7 @@ different ways to do the same things shown here:
awk -F: '{ print $1 }' /etc/passwd | sort
- * Count lines in a file:
+ * Count the lines in a file:
awk 'END { print NR }' data
@@ -1625,8 +1629,8 @@ different ways to do the same things shown here:
awk 'NR % 2 == 0' data
- If you use the expression `NR % 2 == 1' instead, it would print
- the odd-numbered lines.
+ If you use the expression `NR % 2 == 1' instead, the program would
+ print the odd-numbered lines.

File: gawk.info, Node: Two Rules, Next: More Complex, Prev: Very Simple, Up: Getting Started
@@ -1643,9 +1647,9 @@ run.
After processing all the rules that match the line (and perhaps
there are none), `awk' reads the next line. (However, *note The `next'
Statement: Next Statement., and also *note Using `gawk''s `nextfile'
-Statement: Nextfile Statement.). This continues until the end of the
-file is reached. For example, the following `awk' program contains two
-rules:
+Statement: Nextfile Statement.). This continues until the program
+reaches the end of the file. For example, the following `awk' program
+contains two rules:
/12/ { print $0 }
/21/ { print $0 }
@@ -1660,7 +1664,7 @@ the string `21'. If a line contains both strings, it is printed twice,
once by each rule.
This is what happens if we run this program on our two sample data
-files, `BBS-list' and `inventory-shipped', as shown here:
+files, `BBS-list' and `inventory-shipped':
$ awk '/12/ { print $0 }
> /21/ { print $0 }' BBS-list inventory-shipped
@@ -1715,7 +1719,7 @@ The first field contains read-write permissions, the second field
contains the number of links to the file, and the third field
identifies the owner of the file. The fourth field identifies the group
of the file. The fifth field contains the size of the file in bytes.
-The sixth, seventh and eighth fields contain the month, day, and time,
+The sixth, seventh, and eighth fields contain the month, day, and time,
respectively, that the file was last modified. Finally, the ninth field
contains the name of the file.(2)
@@ -1736,14 +1740,14 @@ the value of `sum' is 140963.
(*note Actions: Action Overview.). Before you can move on to more
advanced `awk' programming, you have to know how `awk' interprets your
input and displays your output. By manipulating fields and using
-`print' statements, you can produce some very useful and impressive
-looking reports.
+`print' statements, you can produce some very useful and
+impressive-looking reports.
---------- Footnotes ----------
(1) In the C shell (`csh'), you need to type a semicolon and then a
backslash at the end of the first line; see *Note `awk' Statements
-Versus Lines: Statements/Lines, for an explanation as to why. In a
+Versus Lines: Statements/Lines, for an explanation. In a
POSIX-compliant shell, such as the Bourne shell or `bash', you can type
the example as shown. If the command `echo $path' produces an empty
output line, you are most likely using a POSIX-compliant shell.
@@ -1797,13 +1801,13 @@ constant using backslash continuation. Thus, for maximum portability
of your `awk' programs, it is best not to split your lines in the
middle of a regular expression or a string.
- *Caution:* _Backslash continuation does not work as described above
-with the C shell._ It works for `awk' programs in files and for
-one-shot programs, _provided_ you are using a POSIX-compliant shell,
-such as the Unix Bourne shell or `bash'. But the C shell behaves
-differently! There, you must use two backslashes in a row, followed by
-a newline. Note also that when using the C shell, _every_ newline in
-your awk program must be escaped with a backslash. To illustrate:
+ *Caution:* _Backslash continuation does not work as described with
+the C shell._ It works for `awk' programs in files and for one-shot
+programs, _provided_ you are using a POSIX-compliant shell, such as the
+Unix Bourne shell or `bash'. But the C shell behaves differently!
+There, you must use two backslashes in a row, followed by a newline.
+Note also that when using the C shell, _every_ newline in your awk
+program must be escaped with a backslash. To illustrate:
% awk 'BEGIN { \
? print \\
@@ -1826,7 +1830,7 @@ POSIX-compliant shell:
`awk' is a line-oriented language. Each rule's action has to begin
on the same line as the pattern. To have the pattern and action on
separate lines, you _must_ use backslash continuation; there is no
-other way.
+other option.
Another thing to keep in mind is that backslash continuation and
comments do not mix. As soon as `awk' sees the `#' that starts a
@@ -1876,7 +1880,7 @@ There are other variables your program can set as well to control how
`awk' processes your data.
In addition, `awk' provides a number of built-in functions for doing
-common computational and string related operations. `gawk' provides
+common computational and string-related operations. `gawk' provides
built-in functions for working with timestamps, performing bit
manipulation, and for runtime string translation.
@@ -1908,7 +1912,7 @@ 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
+for more information), and a microcode assembler for a special-purpose
Prolog computer. However, `awk''s capabilities are strained by tasks of
such complexity.
@@ -1945,7 +1949,7 @@ you specify more complicated classes of strings.
* Menu:
* Regexp Usage:: How to Use Regular Expressions.
-* Escape Sequences:: How to write non-printing characters.
+* Escape Sequences:: How to write nonprinting characters.
* Regexp Operators:: Regular Expression Operators.
* Character Lists:: What can go between `[...]'.
* GNU Regexp Operators:: Operators specific to GNU software.
@@ -1972,13 +1976,13 @@ it:
-| 555-6480
-| 555-2127
- Regular expressions can also be used in matching expressions. These
-expressions allow you to specify the string to match against; it need
-not be the entire current input record. The two operators `~' and `!~'
-perform regular expression comparisons. Expressions using these
-operators can be used as patterns, or in `if', `while', `for', and `do'
-statements. (*Note Control Statements in Actions: Statements.) For
-example:
+ `~' (tilde), `~' operator Regular expressions can also be used in
+matching expressions. These expressions allow you to specify the
+string to match against; it need not be the entire current input
+record. The two operators `~' and `!~' perform regular expression
+comparisons. Expressions using these operators can be used as
+patterns, or in `if', `while', `for', and `do' statements. (*Note
+Control Statements in Actions: Statements.) For example:
EXP ~ /REGEXP/
@@ -2025,9 +2029,9 @@ Escape Sequences
(`"foo"') or regexp constants (`/foo/'). Instead, they should be
represented with "escape sequences", which are character sequences
beginning with a backslash (`\'). One use of an escape sequence is to
-include a double quote character in a string constant. Because a plain
+include a double-quote character in a string constant. Because a plain
double quote ends the string, you must use `\"' to represent an actual
-double quote character as a part of the string. For example:
+double-quote character as a part of the string. For example:
$ awk 'BEGIN { print "He said \"hi!\" to her." }'
-| He said "hi!" to her.
@@ -2037,10 +2041,10 @@ included normally; you must write `\\' to put one backslash in the
string or regexp. Thus, the string whose contents are the two
characters `"' and `\' must be written `"\"\\"'.
- Another use of backslash is to represent unprintable characters such
-as tab or newline. While there is nothing to stop you from entering
-most unprintable characters directly in a string constant or regexp
-constant, they may look ugly.
+ Backslash also represents unprintable characters such as TAB or
+newline. While there is nothing to stop you from entering most
+unprintable characters directly in a string constant or regexp constant,
+they may look ugly.
The following table lists all the escape sequences used in `awk' and
what they represent. Unless noted otherwise, all these escape sequences
@@ -2066,7 +2070,7 @@ apply to both string constants and regexp constants:
Carriage return, `Ctrl-m', ASCII code 13 (CR).
`\t'
- Horizontal tab, `Ctrl-i', ASCII code 9 (HT).
+ Horizontal TAB, `Ctrl-i', ASCII code 9 (HT).
`\v'
Vertical tab, `Ctrl-k', ASCII code 11 (VT).
@@ -2078,11 +2082,11 @@ apply to both string constants and regexp constants:
`\xHH...'
The hexadecimal value HH, where HH stands for a sequence of
- hexadecimal digits (`0' through `9', and either `A' through `F' or
- `a' through `f'). Like the same construct in ISO C, the escape
- sequence continues until the first non-hexadecimal digit is seen.
- 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'). Like
+ the same construct in ISO C, the escape sequence continues until
+ the first nonhexadecimal digit is seen. However, using more than
+ two hexadecimal digits produces undefined results. (The `\x'
+ escape sequence is not allowed in POSIX `awk'.)
`\/'
A literal slash (necessary for regexp constants only). This
@@ -2104,13 +2108,13 @@ with a backslash have special meaning in regexps. *Note
`gawk'-Specific Regexp Operators: GNU Regexp Operators.
In a regexp, a backslash before any character that is not in the
-above table and not listed in *Note `gawk'-Specific Regexp Operators:
+previous list and not listed in *Note `gawk'-Specific Regexp Operators:
GNU Regexp Operators, means that the next character should be taken
literally, even if it would normally be a regexp operator. For
example, `/a\+b/' matches the three characters `a+b'.
For complete portability, do not use a backslash before any
-character not shown in the table above.
+character not shown in the previous list.
To summarize:
@@ -2130,29 +2134,28 @@ Advanced Notes: Backslash Before Regular Characters
---------------------------------------------------
If you place a backslash in a string constant before something that
-is not one of the characters listed above, POSIX `awk' purposely leaves
-what happens as undefined. There are two choices:
+is not one of the characters previously listed, POSIX `awk' purposely
+leaves what happens as undefined. There are two choices:
Strip the backslash out
This is what Unix `awk' and `gawk' both do. For example, `"a\qc"'
- is the same as `"aqc"'. (Because this is such an easy bug to both
+ 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]+"'.)
+ the field separator. There should be two backslashes in the string
+ `FS = "[ \t]+\\|[ \t]+"'.)
Leave the backslash alone
Some other `awk' implementations do this. In such
- implementations, `"a\qc"' is the same as if you had typed
- `"a\\qc"'.
+ implementations, typing `"a\qc"' is the same as typing `"a\\qc"'.
Advanced Notes: Escape Sequences for Metacharacters
---------------------------------------------------
Suppose you use an octal or hexadecimal escape to represent a regexp
-metacharacter (*note Regular Expression Operators: Regexp Operators.).
-Does `awk' treat the character as a literal character or as a regexp
-operator?
+metacharacter. (See *Note Regular Expression Operators: Regexp
+Operators.) Does `awk' treat the character as a literal character or
+as a regexp operator?
Historically, such characters were taken literally. (d.c.)
However, the POSIX standard indicates that they should be treated as
@@ -2172,9 +2175,9 @@ Regular Expression Operators
power and versatility of regular expressions.
The escape sequences described in *Note Escape Sequences::, are
-valid inside a regexp. They are introduced by a `\', and are
-recognized and converted into the corresponding real characters as the
-very first step in processing regexps.
+valid inside a regexp. They are introduced by a `\' and are recognized
+and converted into corresponding real characters as the very first step
+in processing regexps.
Here is a list of metacharacters. All characters that are not escape
sequences and that are not listed in the table stand for themselves:
@@ -2185,10 +2188,10 @@ sequences and that are not listed in the table stand for themselves:
`^'
This matches the beginning of a string. For example, `^@chapter'
- matches `@chapter' at the beginning of a string, and can be used
- to identify chapter beginnings in Texinfo source files. The `^'
- is known as an "anchor", because it anchors the pattern to match
- only at the beginning of the string.
+ matches `@chapter' at the beginning of a string and can be used to
+ identify chapter beginnings in Texinfo source files. The `^' is
+ known as an "anchor", because it anchors the pattern to match only
+ at the beginning of the string.
It is important to realize that `^' does not match the beginning of
a line embedded in a string. The condition is not true in the
@@ -2197,10 +2200,10 @@ sequences and that are not listed in the table stand for themselves:
if ("line1\nLINE 2" ~ /^L/) ...
`$'
- This is similar to `^' but it matches only at the end of a string.
+ This is similar to `^', but it matches only at the end of a string.
For example, `p$' matches a record that ends with a `p'. The `$'
is an anchor and does not match the end of a line embedded in a
- string. The condition is not true in the following example:
+ string. The condition in the following example is not true:
if ("line1\nLINE 2" ~ /1$/) ...
@@ -2208,8 +2211,8 @@ sequences and that are not listed in the table stand for themselves:
This matches any single character, _including_ the newline
character. For example, `.P' matches any single character
followed by a `P' in a string. Using concatenation, we can make a
- regular expression such as `U.A', that matches any three-character
- sequence that begins with `U' and ends with `A'.
+ regular expression such as `U.A', which matches any
+ three-character sequence that begins with `U' and ends with `A'.
In strict POSIX mode (*note Command-Line Options: Options.), `.'
does not match the NUL character, which is a character with all
@@ -2219,7 +2222,7 @@ sequences and that are not listed in the table stand for themselves:
`[...]'
This is called a "character list".(1) It matches any _one_ of the
characters that are enclosed in the square brackets. For example,
- `[MVX]' matches any one of the characters `M', `V', or `X', in a
+ `[MVX]' matches any one of the characters `M', `V', or `X' in a
string. A full discussion of what can be inside the square
brackets of a character list is given in *Note Using Character
Lists: Character Lists.
@@ -2228,7 +2231,7 @@ sequences and that are not listed in the table stand for themselves:
This is a "complemented character list". The first character after
the `[' _must_ be a `^'. It matches any characters _except_ those
in the square brackets. For example, `[^awk]' matches any
- character that is not an `a', a `w', or a `k'.
+ character that is not an `a', `w', or `k'.
`|'
This is the "alternation operator" and it is used to specify
@@ -2241,8 +2244,8 @@ sequences and that are not listed in the table stand for themselves:
side.
`(...)'
- Parentheses are used for grouping in regular expressions, similar
- to arithmetic. They can be used to concatenate regular expressions
+ Parentheses are used for grouping in regular expressions, as in
+ arithmetic. They can be used to concatenate regular expressions
containing the alternation operator, `|'. For example,
`@(samp|code)\{[^}]+\}' matches both `@code{foo}' and `@samp{bar}'.
(These are Texinfo formatting control sequences.)
@@ -2263,18 +2266,18 @@ sequences and that are not listed in the table stand for themselves:
preceding them with backslashes.
`+'
- 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 of these strings. The following is a simpler way of writing
- the last `*' example:
+ 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 of these strings. The following is a simpler way
+ of writing the last `*' example:
awk '/\(c[ad]+r x\)/ { print }' sample
`?'
- This symbol is similar to `*' except that the preceding expression
- can be matched either once or not at all. For example, `fe?d'
- matches `fed' and `fd', but nothing else.
+ This symbol is similar to `*', except that the preceding
+ expression can be matched either once or not at all. For example,
+ `fe?d' matches `fed' and `fd', but nothing else.
`{N}'
`{N,}'
@@ -2327,7 +2330,8 @@ available in regular expressions.
---------- Footnotes ----------
(1) In other literature, you may see a character list referred to as
-either a "character set", a "character class" or a "bracket expression".
+either a "character set", a "character class", or a "bracket
+expression".
(2) Use two backslashes if you're using a string constant with a
regexp operator or function.
@@ -2372,11 +2376,11 @@ differs between the United States and France.
A character class is only valid in a regexp _inside_ the brackets of
a character list. Character classes consist of `[:', a keyword
denoting the class, and `:]'. Here are the character classes defined
-by the POSIX standard:
+by the POSIX standard.
`[:alnum:]' Alphanumeric characters.
`[:alpha:]' Alphabetic characters.
-`[:blank:]' Space and tab characters.
+`[:blank:]' Space and TAB characters.
`[:cntrl:]' Control characters.
`[:digit:]' Numeric characters.
`[:graph:]' Characters that are both printable and visible. (A space is
@@ -2386,7 +2390,7 @@ by the POSIX standard:
characters).
`[:punct:]' Punctuation characters (characters that are not letters,
digits, control characters, or space characters).
-`[:space:]' Space characters (such as space, tab, and formfeed, to name a
+`[:space:]' Space characters (such as space, TAB, and formfeed, to name a
few).
`[:upper:]' Uppercase alphabetic characters.
`[:xdigit:]' Characters that are hexadecimal digits.
@@ -2404,26 +2408,24 @@ These apply to non-ASCII character sets, which can have single symbols
(called "collating elements") that are represented with more than one
character. They can also have several characters that are equivalent for
"collating", or sorting, purposes. (For example, in French, a plain "e"
-and a grave-accented "e`" are equivalent.)
+and a grave-accented "e`" are equivalent.) These sequences are:
-Collating Symbols
- A "collating symbol" is a multicharacter collating element
- enclosed between `[.' and `.]'. For example, if `ch' is a
- collating element, then `[[.ch.]]' is a regexp that matches this
- collating element, whereas `[ch]' is a regexp that matches either
- `c' or `h'.
+Collating symbols
+ Multicharacter collating elements enclosed between `[.' and `.]'.
+ For example, if `ch' is a collating element, then `[[.ch.]]' is a
+ regexp that matches this collating element, whereas `[ch]' is a
+ regexp that matches either `c' or `h'.
-Equivalence Classes
- An "equivalence class" is a locale-specific name for a list of
- characters that are equal. The name is enclosed between `[=' and
- `=]'. For example, the name `e' might be used to represent all of
- "e," "e`," and "e'." In this case, `[[=e=]]' is a regexp that
- matches any of `e', `e'', or `e`'.
+Equivalence classes
+ Locale-specific names for a list of characters that are equal. The
+ name is enclosed between `[=' and `=]'. For example, the name `e'
+ might be used to represent all of "e," "e`," and "e'." In this
+ case, `[[=e=]]' is a regexp that matches any of `e', `e'', or `e`'.
- These features are very valuable in non-English speaking locales.
+ These features are very valuable in non-English-speaking locales.
*Caution:* The library functions that `gawk' uses for regular
-expression matching currently only recognize POSIX character classes;
+expression matching currently recognize only POSIX character classes;
they do not recognize collating symbols or equivalence classes.

@@ -2441,12 +2443,12 @@ letters, digits, or underscores (`_'):
`\w'
Matches any word-constituent character--that is, it matches any
- letter, digit, or underscore. Think of it as short-hand for
+ letter, digit, or underscore. Think of it as shorthand for
`[[:alnum:]_]'.
`\W'
Matches any character that is not word-constituent. Think of it
- as short-hand for `[^[:alnum:]_]'.
+ as shorthand for `[^[:alnum:]_]'.
`\<'
Matches the empty string at the beginning of a word. For example,
@@ -2469,7 +2471,7 @@ letters, digits, or underscores (`_'):
There are two other operators that work on buffers. In Emacs, a
"buffer" is, naturally, an Emacs buffer. For other programs, `gawk''s
regexp library routines consider the entire string to match as the
-buffer.
+buffer. The operators are:
`\`'
Matches the empty string at the beginning of a buffer (string).
@@ -2505,7 +2507,7 @@ No options
`--traditional'
Traditional Unix `awk' regexps are matched. The GNU operators are
not special, interval expressions are not available, nor are the
- POSIX character classes (`[[:alnum:]]' and so on). Characters
+ POSIX character classes (`[[:alnum:]]', etc.). Characters
described by octal and hexadecimal escape sequences are treated
literally, even if they represent regexp metacharacters.
@@ -2526,8 +2528,8 @@ lowercase `w' and not an uppercase `W'.
The simplest way to do a case-independent match is to use a character
list--for example, `[Ww]'. However, this can be cumbersome if you need
-to use it often and it can make the regular expressions harder to read.
-There are two alternatives that you might prefer.
+to use it often, and it can make the regular expressions harder to
+read. There are two alternatives that you might prefer.
One way to perform a case-insensitive match at a particular point in
the program is to convert the data to a single case, using the
@@ -2543,9 +2545,10 @@ works in any POSIX-compliant `awk'.
Another method, specific to `gawk', is to set the variable
`IGNORECASE' to a nonzero value (*note Built-in Variables::). When
`IGNORECASE' is not zero, _all_ regexp and string operations ignore
-case. Changing the value of `IGNORECASE' dynamically controls the case
-sensitivity of the program as it runs. Case is significant by default
-because `IGNORECASE' (like most variables) is initialized to zero:
+case. Changing the value of `IGNORECASE' dynamically controls the
+case-sensitivity of the program as it runs. Case is significant by
+default because `IGNORECASE' (like most variables) is initialized to
+zero:
x = "aB"
if (x ~ /ab/) ... # this test will fail
@@ -2574,7 +2577,7 @@ comparison operations are also affected by `IGNORECASE'.
Beginning with `gawk' 3.0, the equivalences between upper- and
lowercase characters are based on the ISO-8859-1 (ISO Latin-1)
character set. This character set is a superset of the traditional 128
-ASCII characters, that also provides a number of characters suitable
+ASCII characters, which also provides a number of characters suitable
for use with European languages.
The value of `IGNORECASE' has no effect if `gawk' is in
@@ -2645,7 +2648,7 @@ 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
+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
@@ -2668,7 +2671,7 @@ constants," for several reasons:
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
+ 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.
@@ -2706,8 +2709,8 @@ Reading Input Files
*******************
In the typical `awk' program, all input is read either from the
-standard input (by default, this is the keyboard but often it is a pipe
-from another command), or from files whose names you specify on the
+standard input (by default, this is the keyboard, but often it is a
+pipe from another command) or from files whose names you specify on the
`awk' command line. If you specify input files, `awk' reads them in
order, processing all the data from one before going on to the next.
The name of the current input file can be found in the built-in variable
@@ -2729,7 +2732,7 @@ have to be named on the `awk' command line (*note Explicit Input with
* Records:: Controlling how data is split into records.
* Fields:: An introduction to fields.
-* Non-Constant Fields:: Non-constant Field Numbers.
+* Nonconstant Fields:: Nonconstant Field Numbers.
* Changing Fields:: Changing the Contents of a Field.
* Field Separators:: The field separator and how to change it.
* Constant Size:: Reading constant width data.
@@ -2775,9 +2778,8 @@ a string whose first character is a slash; as a result, records are
separated by slashes. Then the input file is read, and the second rule
in the `awk' program (the action with no pattern) prints each record.
Because each `print' statement adds a newline at the end of its output,
-the effect of this `awk' program is to copy the input with each slash
-changed to a newline. Here are the results of running the program on
-`BBS-list':
+this `awk' program copies the input with each slash changed to a
+newline. Here are the results of running the program on `BBS-list':
$ awk 'BEGIN { RS = "/" }
> { print $0 }' BBS-list
@@ -2860,7 +2862,7 @@ general, each record ends at the next string that matches the regular
expression; the next record starts at the end of the matching string.
This general rule is actually at work in the usual case, where `RS'
contains just a newline: a record ends at the beginning of the next
-matching string (the next newline in the input) and the following
+matching string (the next newline in the input), and the following
record starts just after the end of this string (at the first character
of the following line). The newline, because it matches `RS', is not
part of either record.
@@ -2926,13 +2928,13 @@ the end of the previous ones.
(1) At least that we know about.

-File: gawk.info, Node: Fields, Next: Non-Constant Fields, Prev: Records, Up: Reading Files
+File: gawk.info, Node: Fields, Next: Nonconstant Fields, Prev: Records, Up: Reading Files
Examining Fields
================
When `awk' reads an input record, the record is automatically
-separated or "parsed" by the interpreter into chunks called "fields".
+"parsed" or separated by the interpreter into chunks called "fields".
By default, fields are separated by "whitespace", like words in a line.
Whitespace in `awk' means any string of one or more spaces, tabs, or
newlines;(1) other characters, such as formfeed, vertical tab, etc.
@@ -2948,8 +2950,8 @@ simple `awk' programs so powerful.
followed by the number of the field you want. Thus, `$1' refers to the
first field, `$2' to the second, and so on. (Unlike the Unix shells,
the field numbers are not limited to single digits. `$127' is the one
-hundred and twenty-seventh field in the record.) For example, suppose
-the following is a line of input:
+hundred twenty-seventh field in the record.) For example, suppose the
+following is a line of input:
This seems like a pretty nice example.
@@ -2966,9 +2968,9 @@ as `$7', which is `example.'. If you try to reference a field beyond
the last one (such as `$8' when the record has only seven fields), you
get the empty string. (If used in a numeric operation, you get zero.)
- The use of `$0', which looks like a reference to the "zeroth" field,
-is a special case: it represents the whole input record when you are
-not interested in specific fields. Here are some more examples:
+ The use of `$0', which looks like a reference to the "zero-th"
+field, is a special case: it represents the whole input record when you
+are not interested in specific fields. Here are some more examples:
$ awk '$1 ~ /foo/ { print $0 }' BBS-list
-| fooey 555-1234 2400/1200/300 B
@@ -2998,10 +3000,10 @@ input record:
separating fields.

-File: gawk.info, Node: Non-Constant Fields, Next: Changing Fields, Prev: Fields, Up: Reading Files
+File: gawk.info, Node: Nonconstant Fields, Next: Changing Fields, Prev: Fields, Up: Reading Files
-Non-Constant Field Numbers
-==========================
+Nonconstant Field Numbers
+=========================
The number of a field does not need to be a constant. Any
expression in the `awk' language can be used after a `$' to refer to a
@@ -3044,7 +3046,7 @@ feature--it is the direct consequence of evaluating `NF' and using its
value as a field number.

-File: gawk.info, Node: Changing Fields, Next: Field Separators, Prev: Non-Constant Fields, Up: Reading Files
+File: gawk.info, Node: Changing Fields, Next: Field Separators, Prev: Nonconstant Fields, Up: Reading Files
Changing the Contents of a Field
================================
@@ -3052,7 +3054,7 @@ Changing the Contents of a Field
The contents of a field, as seen by `awk', can be changed within an
`awk' program; this changes what `awk' perceives as the current input
record. (The actual input is untouched; `awk' _never_ modifies the
-input file.) Consider this example and its output:
+input file.) Consider the following example and its output:
$ awk '{ nboxes = $3 ; $3 = $3 - 10
> print nboxes, $3 }' inventory-shipped
@@ -3259,8 +3261,8 @@ example, the assignment:
FS = ", \t"
makes every area of an input line that consists of a comma followed by a
-space and a tab into a field separator. (`\t' is an "escape sequence"
-that stands for a tab; *note Escape Sequences::, for the complete list
+space and a TAB into a field separator. (`\t' is an "escape sequence"
+that stands for a TAB; *note Escape Sequences::, for the complete list
of similar escape sequences.)
For a less trivial example of a regular expression, try using single
@@ -3341,12 +3343,12 @@ For example:
awk -F, 'PROGRAM' INPUT-FILES
-sets `FS' to the `,' character. Notice that the option uses a capital
-`F' instead of a lowercase `-f', which specifies a file containing an
-`awk' program. Case is significant in command-line options: the `-F'
-and `-f' options have nothing to do with each other. You can use both
-options at the same time to set the `FS' variable _and_ get an `awk'
-program from a file.
+sets `FS' to the `,' character. Notice that the option uses an
+uppercase `F' instead of a lowercase `f'. The latter option (`-f')
+specifies a file containing an `awk' program. Case is significant in
+command-line options: the `-F' and `-f' options have nothing to do with
+each other. You can use both options at the same time to set the `FS'
+variable _and_ get an `awk' program from a file.
The value used for the argument to `-F' is processed in exactly the
same way as assignments to the built-in variable `FS'. Any special
@@ -3364,7 +3366,7 @@ separator.
As a special case, in compatibility mode (*note Command-Line
Options: Options.), if the argument to `-F' is `t', then `FS' is set to
-the tab character. If you type `-F\t' at the shell, without any
+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
@@ -3421,11 +3423,11 @@ the entries for users who have no password:

File: gawk.info, Node: Field Splitting Summary, Prev: Command Line Field Separator, Up: Field Separators
-Field Splitting Summary
+Field-Splitting Summary
-----------------------
The following table summarizes how fields are split, based on the
-value of `FS'. (`==' means "is equal to.")
+value of `FS' (`==' means "is equal to"):
`FS == " "'
Fields are separated by runs of whitespace. Leading and trailing
@@ -3525,7 +3527,7 @@ use of `FIELDWIDTHS':
The following program takes the above input, converts the idle time
to number of seconds, and prints out the first two fields and the
-calculated idle time.
+calculated idle time:
*Note:* This program uses a number of `awk' features that haven't
been introduced yet.
@@ -3567,8 +3569,8 @@ An `awk' program for processing such data could use the `FIELDWIDTHS'
feature to simplify reading the data. (Of course, getting `gawk' to
run on a system with card readers is another story!)
- Assigning a value to `FS' causes `gawk' to return to using `FS' for
-field splitting. Use `FS = FS' to make this happen, without having to
+ Assigning a value to `FS' causes `gawk' to use `FS' for field
+splitting again. Use `FS = FS' to make this happen, without having to
know the current value of `FS'. In order to tell which kind of field
splitting is in effect, use `PROCINFO["FS"]' (*note Built-in Variables
That Convey Information: Auto-set.). The value is `"FS"' if regular
@@ -3606,7 +3608,7 @@ well be used, as long as it won't be part of the data in a record.
special dispensation, an empty string as the value of `RS' indicates
that records are separated by one or more blank lines. When `RS' is set
to the empty string, each record always ends at the first blank line
-encountered. The next record doesn't start until the first non-blank
+encountered. The next record doesn't start until the first nonblank
line that follows. No matter how many blank lines appear in a row, they
all act as one record separator. (Blank lines must be completely
empty; lines that contain only whitespace do not count.)
@@ -3616,7 +3618,7 @@ empty; lines that contain only whitespace do not count.)
record and one or more blank lines after the record. In addition, a
regular expression always matches the longest possible sequence when
there is a choice (*note How Much Text Matches?: Leftmost Longest.).
-So the next record doesn't start until the first non-blank line that
+So the next record doesn't start until the first nonblank line that
follows--no matter how many blank lines appear in a row, they are
considered one record separator.
@@ -3646,7 +3648,7 @@ line: to do this, just set the variable `FS' to the string `"\n"'.
(This simple regular expression matches a single newline.) A practical
example of a data file organized this way might be a mailing list,
where each entry is separated by blank lines. Consider a mailing list
-in a file named `addresses', that looks like this:
+in a file named `addresses', which looks like this:
Jane Doe
123 Main Street
@@ -3708,7 +3710,7 @@ equal to.")
`RS == REGEXP'
Records are separated by occurrences of characters that match
REGEXP. Leading and trailing matches of REGEXP delimit empty
- records. (This is a `gawk' extension, it is not specified by the
+ records. (This is a `gawk' extension; it is not specified by the
POSIX standard.)
In all cases, `gawk' sets `RT' to the input text that matched the
@@ -3734,8 +3736,8 @@ have reviewed the rest of this Info file and have a good knowledge of
how `awk' works.
The `getline' command returns one if it finds a record and zero if
-the end of the file is encountered. If there is some error in getting
-a record, such as a file that cannot be opened, then `getline' returns
+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.
@@ -3768,7 +3770,7 @@ Using `getline' with No Arguments
from the current input file. All it does in this case is read the next
input record and split it up into fields. This is useful if you've
finished processing the current record, but want to do some special
-processing _right now_ on the next record. Here's an example:
+processing on the next record _right now_. For example:
{
if ((t = index($0, "/*")) != 0) {
@@ -3821,8 +3823,7 @@ suppose the next line is a comment or a special string, and you want to
read it without triggering any rules. This form of `getline' allows
you to read that line and store it in a variable so that the main
read-a-line-and-check-each-rule loop of `awk' never sees it. The
-following example swaps every two lines of input. The program is as
-follows:
+following example swaps every two lines of input:
{
if ((getline tmp) > 0) {
@@ -3912,8 +3913,8 @@ file FILENAME:
}
Note here how the name of the extra input file is not built into the
-program; it is taken directly from the data, from the second field on
-the `@include' line.
+program; it is taken directly from the data, specifically from the
+second field on the `@include' line.
The `close' function is called to ensure that if two identical
`@include' lines appear in the input, the entire specified file is
@@ -3971,13 +3972,13 @@ the program might produce:
bill ttyp1 Jul 13 14:23 (murphy:0)
bletch
-Notice that this program ran the command `who' and printed the result.
-(If you try this program yourself, you will of course get different
-results, depending upon who is logged in on your system.)
+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.)
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.
+value of `NF', and recomputes the value of `$0'. The values of `NR'
+and `FNR' are not changed.
According to POSIX, `EXPRESSION | getline' is ambiguous if
EXPRESSION contains unparenthesized operators other than `$'--for
@@ -4031,7 +4032,7 @@ your `awk' program.
processing and then read the results back. `gawk' allows you start a
"coprocess", with which two-way communications are possible. This is
done with the `|&' operator. Typically, you write data to the
-coprocess first, and then read results back, as shown in the following:
+coprocess first and then read results back, as shown in the following:
print "SOME QUERY" |& "db_server"
"db_server" |& getline
@@ -4040,8 +4041,8 @@ which sends a query to `db_server' and then reads the results.
The values of `NR' and `FNR' are not changed, because the main input
stream is not used. However, the record is split into fields in the
-normal manner, thus changing the values of `$0', the other fields, and
-of `NF'.
+normal manner, thus changing the values of `$0', of the other fields,
+and of `NF'.
Coprocesses are an advanced feature. They are discussed here only
because this is the minor node on `getline'. *Note Two-Way
@@ -4070,7 +4071,7 @@ discussed in more detail.

File: gawk.info, Node: Getline Notes, Next: Getline Summary, Prev: Getline/Variable/Coprocess, Up: Getline
-Points About `getline' to Remember
+Points to Remember About `getline'
----------------------------------
Here are some miscellaneous points about `getline' that you should
@@ -4105,15 +4106,15 @@ Summary of `getline' Variants
The following table summarizes the eight variants of `getline',
listing which built-in variables are set by each one.
-`getline' Sets `$0', `NF', `FNR' and `NR'
-`getline' VAR Sets VAR, `FNR' and `NR'
+`getline' Sets `$0', `NF', `FNR', and `NR'
+`getline' VAR Sets VAR, `FNR', and `NR'
`getline <' FILE Sets `$0' and `NF'
`getline VAR < FILE' Sets VAR
COMMAND `| getline' Sets `$0' and `NF'
COMMAND `| getline' VAR Sets VAR
-COMMAND `|& getline' Sets `$0' and `NF' (this is a `gawk'
- extension)
-COMMAND `|& getline' VAR Sets VAR (this is a `gawk' extension)
+COMMAND `|& getline' Sets `$0' and `NF'. This is a `gawk'
+ extension
+COMMAND `|& getline' VAR Sets VAR. This is a `gawk' extension

File: gawk.info, Node: Printing, Next: Expressions, Prev: Reading Files, Up: Top
@@ -4121,16 +4122,16 @@ File: gawk.info, Node: Printing, Next: Expressions, Prev: Reading Files, Up:
Printing Output
***************
- One of the most common programming actions is to "print" or output,
+ One of the most common programming actions is to "print", or output,
some or all of the input. Use the `print' statement for simple output,
and the `printf' statement for fancier formatting. The `print'
statement is not limited when computing _which_ values to print.
However, with two exceptions, you cannot specify _how_ to print
them--how many columns, whether to use exponential notation or not, and
so on. (For the exceptions, *note Output Separators::, and *Note
-Controlling Numeric Output with `print': OFMT.) For that, you need the
-`printf' statement (*note Using `printf' Statements for Fancier
-Printing: Printf.).
+Controlling Numeric Output with `print': OFMT.) For printing with
+specifications, you need the `printf' statement (*note Using `printf'
+Statements for Fancier Printing: Printf.).
Besides basic and formatted printing, this major node also covers
I/O redirections to files and pipes, introduces the special file names
@@ -4177,9 +4178,9 @@ Numeric values are converted to strings and then printed.
$0': it prints the entire current record. To print a blank line, use
`print ""', where `""' is the empty string. To print a fixed piece of
text, use a string constant, such as `"Don't Panic"', as one item. If
-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.
+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.

File: gawk.info, Node: Print Examples, Next: Output Separators, Prev: Print, Up: Printing
@@ -4371,8 +4372,9 @@ Introduction to the `printf' Statement
The entire list of arguments may optionally be enclosed in parentheses.
The parentheses are necessary if any of the item expressions use the
-`>' relational operator; otherwise it can be confused with a redirection
-(*note Redirecting Output of `print' and `printf': Redirection.).
+`>' relational operator; otherwise, it can be confused with a
+redirection (*note Redirecting Output of `print' and `printf':
+Redirection.).
The difference between `printf' and `print' is the FORMAT argument.
This is an expression whose value is taken as a string; it specifies
@@ -4464,7 +4466,7 @@ width. Here is a list of the format-control letters:
`A' through `F' instead of `a' through `f'.
`%%'
- This isn't a format-control letter but it does have meaning--the
+ This isn't a format-control letter, but it does have meaning--the
sequence `%%' outputs one `%'; it does not consume an argument and
it ignores any modifiers.
@@ -4492,7 +4494,7 @@ which they may appear:
order given in the format string. With a positional specifier,
the format specification is applied to a specific argument,
instead of what would be the next argument in the list.
- Positional specifiers begin counting with one:
+ Positional specifiers begin counting with one. Thus:
printf "%s %s\n", "don't", "panic"
printf "%2$s %1$s\n", "panic", "don't"
@@ -4506,7 +4508,7 @@ which they may appear:
For now, we will not use them.
`-'
- The minus sign, used before the width modifier (see further on in
+ The minus sign, used before the width modifier (see later on in
this table), says to left-justify the argument within its
specified width. Normally, the argument is printed
right-justified in the specified width. Thus:
@@ -4520,7 +4522,7 @@ which they may appear:
negative values with a minus sign.
`+'
- The plus sign, used before the width modifier (see further on in
+ The plus sign, used before the width modifier (see later on in
this table), says to always supply a sign for numeric conversions,
even if the data to format is positive. The `+' overrides the
space modifier.
@@ -4773,14 +4775,14 @@ work identically for `printf':
close(report)
The message is built using string concatenation and saved in the
- variable `m'. It is then sent down the pipeline to the `mail'
+ variable `m'. It's then sent down the pipeline to the `mail'
program. (The parentheses group the items to concatenate--see
*Note String Concatenation: Concatenation.)
The `close' function is called here because it's a good idea to
close the pipe as soon as all the intended output has been sent to
it. *Note Closing Input and Output Redirections: Close Files And
- Pipes, for more information on this.
+ Pipes, for more information.
This example also illustrates the use of a variable to represent a
FILE or COMMAND--it is not necessary to always use a string
@@ -4792,15 +4794,15 @@ work identically for `printf':
This type of redirection prints the items to the input of COMMAND.
The difference between this and the single-`|' redirection is that
the output from COMMAND can be read with `getline'. Thus COMMAND
- is a "coprocess", that works together with, but subsidiary to, the
- `awk' program.
+ is a "coprocess", which works together with, but subsidiary to,
+ the `awk' program.
This feature is a `gawk' extension, and is not available in POSIX
`awk'. *Note Two-Way Communications with Another Process: Two-way
I/O, for a more complete discussion.
Redirecting output using `>', `>>', `|', or `|&' asks the system to
-open a file, pipe, or coprocess, only if the particular FILE or COMMAND
+open a file, pipe, or coprocess only if the particular FILE or COMMAND
you specify has not already been written to by your program or if it
has been closed since it was last written to.
@@ -4827,7 +4829,7 @@ Advanced Notes: Piping into `sh'
--------------------------------
A particularly powerful way to use redirection is to build command
-lines, and pipe them into the shell, `sh'. For example, suppose you
+lines and pipe them into the shell, `sh'. For example, suppose you
have a list of files brought over from a system where all the file names
are stored in uppercase, and you wish to rename them to have names in
all lowercase. The following program is both simple and efficient:
@@ -4871,7 +4873,7 @@ the "standard input", "standard output", and "standard error output".
These streams are, by default, connected to your terminal, but they are
often redirected with the shell, via the `<', `<<', `>', `>>', `>&',
and `|' operators. Standard error is typically used for writing error
-messages; the reason there are two separate streams, standard output,
+messages; the reason there are two separate streams, standard output
and standard error, is so that they can be redirected separately.
In other implementations of `awk', the only way to write an error
@@ -4897,8 +4899,8 @@ opening `/dev/tty' fails.
streams, as well as any other inherited open files. If the file name
matches one of these special names when `gawk' redirects input or
output, then it directly uses the stream that the file name stands for.
-(These special file names work for all operating systems that `gawk'
-has been ported to, not just those that are POSIX-compliant.):
+These special file names work for all operating systems that `gawk' has
+been ported to, not just those that are POSIX-compliant:
`/dev/stdin'
The standard input (file descriptor 0).
@@ -4994,7 +4996,7 @@ Special Files for Network Communications
----------------------------------------
Starting with version 3.1 of `gawk', `awk' programs can open a
-two-way TCP/IP connection, acting as either a client or server. This
+two-way TCP/IP connection, acting as either a client or a server. This
is done using a special file name of the form:
`/inet/PROTOCOL/LOCAL-PORT/REMOTE-HOST/REMOTE-PORT'
@@ -5015,7 +5017,7 @@ Special File Name Caveats
-------------------------
Here is a list of things to bear in mind when using the special file
-names that `gawk' provides.
+names that `gawk' provides:
* Recognition of these special file names is disabled if `gawk' is in
compatibility mode (*note Command-Line Options: Options.).
@@ -5036,12 +5038,12 @@ names that `gawk' provides.
---------- Footnotes ----------
- (1) Older versions of `gawk' would only interpret these names
-internally if the system did not actually have a a `/dev/fd' directory
-or any of the other above listed special files. Usually this didn't
-make a difference, but sometimes it did; thus, it was decided to make
-`gawk''s behavior consistent on all systems and to have it always
-interpret the special file names itself.
+ (1) Older versions of `gawk' would interpret these names internally
+only if the system did not actually have a `/dev/fd' directory or any
+of the other special files listed earlier. Usually this didn't make a
+difference, but sometimes it did; thus, it was decided to make `gawk''s
+behavior consistent on all systems and to have it always interpret the
+special file names itself.

File: gawk.info, Node: Close Files And Pipes, Prev: Special Files, Up: Printing
@@ -5273,11 +5275,11 @@ forms, but are stored identically internally.
* Menu:
* Scalar Constants:: Numeric and string constants.
-* Non-decimal-numbers:: What are octal and hex numbers.
+* Nondecimal-numbers:: What are octal and hex numbers.
* Regexp Constants:: Regular Expression constants.

-File: gawk.info, Node: Scalar Constants, Next: Non-decimal-numbers, Prev: Constants, Up: Constants
+File: gawk.info, Node: Scalar Constants, Next: Nondecimal-numbers, Prev: Constants, Up: Constants
Numeric and String Constants
----------------------------
@@ -5292,7 +5294,7 @@ the same value:
1050e-1
A string constant consists of a sequence of characters enclosed in
-double quote marks. For example:
+double-quotation marks. For example:
"parrot"
@@ -5309,7 +5311,7 @@ uses double-precision floating-point numbers. On most modern systems,
these are in IEEE 754 standard format.

-File: gawk.info, Node: Non-decimal-numbers, Next: Regexp Constants, Prev: Scalar Constants, Up: Constants
+File: gawk.info, Node: Nondecimal-numbers, Next: Regexp Constants, Prev: Scalar Constants, Up: Constants
Octal and Hexadecimal Numbers
-----------------------------
@@ -5317,14 +5319,14 @@ Octal and Hexadecimal Numbers
In `awk', all numbers are in decimal; i.e., base 10. Many other
programming languages allow you to specify numbers in other bases, often
octal (base 8) and hexadecimal (base 16). In octal, the numbers go 0,
-1, 2, 3, 4, 5, 6, 7, 10, 11, 12, etc.. Just as `11' in decimal is 1
-times 10 plus 1, so `11' in octal is 1 times 8, plus 1. This equals
-nine in decimal. In hexadecimal, there are 16 digits. Since the
-everyday decimal number system only has ten digits (`0'--`9'), the
-letters `a' through `f' are used to represent the rest. (Case in the
-letters is usually irrelevant; hexadecimal `a' and `A' have the same
-value.) Thus, `11' in hexadecimal is 1 times 16 plus 1, which equals
-17 in decimal.
+1, 2, 3, 4, 5, 6, 7, 10, 11, 12, etc. Just as `11', in decimal, is 1
+times 10 plus 1, so `11', in octal, is 1 times 8, plus 1. This equals 9
+in decimal. In hexadecimal, there are 16 digits. Since the everyday
+decimal number system only has ten digits (`0'-`9'), the letters `a'
+through `f' are used to represent the rest. (Case in the letters is
+usually irrelevant; hexadecimal `a' and `A' have the same value.)
+Thus, `11', in hexadecimal, is 1 times 16 plus 1, which equals 17 in
+decimal.
Just by looking at plain `11', you can't tell what base it's in.
So, in C, C++, and other languages derived from C, there is a special
@@ -5332,7 +5334,7 @@ notation to help signify the base. Octal numbers start with a leading
`0', and hexadecimal numbers start with a leading `0x' or `0X':
`11'
- Decimal 11.
+ Decimal value 11.
`011'
Octal 11, decimal value 9.
@@ -5354,7 +5356,7 @@ of various sorts.
program text. However, such numbers in the input data are not treated
differently; doing so by default would break old programs. (If you
really need to do this, use the `--non-decimal-data' command-line
-option, *note Allowing Non-Decimal Input Data: Non-decimal Data..) If
+option; *note Allowing Nondecimal Input Data: Nondecimal Data..) If
you have octal or hexadecimal data, you can use the `strtonum' function
(*note String Manipulation Functions: String Functions.) to convert
the data into a number. Most of the time, you will want to use octal
@@ -5363,7 +5365,7 @@ manipulation functions; see *Note Using `gawk''s Bit Manipulation
Functions: Bitwise Functions, for more information.
Unlike some early C implementations, `8' and `9' are not valid in
-octal constants; e.g., `gawk' treats `018' as decimal 18.
+octal constants; e.g., `gawk' treats `018' as decimal 18:
$ gawk 'BEGIN { print "021 is", 021 ; print 018 }'
-| 021 is 17
@@ -5385,7 +5387,7 @@ for conversion of numbers to strings:
-| 0x11 is <17>

-File: gawk.info, Node: Regexp Constants, Prev: Non-decimal-numbers, Up: Constants
+File: gawk.info, Node: Regexp Constants, Prev: Nondecimal-numbers, Up: Constants
Regular Expression Constants
----------------------------
@@ -5406,7 +5408,7 @@ Using Regular Expression Constants
regexp constant merely stands for the regexp that is to be matched.
However, regexp constants (such as `/foo/') may be used like simple
expressions. When a regexp constant appears by itself, it has the same
-meaning as if it appeared in a pattern, i.e.; `($0 ~ /foo/)' (d.c.)
+meaning as if it appeared in a pattern, i.e., `($0 ~ /foo/)' (d.c.)
*Note Expressions as Patterns: Expression Patterns. This means that
the following two code segments:
@@ -5447,7 +5449,7 @@ of the `match' function (*note String Manipulation Functions: String
Functions.). Modern implementations of `awk', including `gawk', allow
the third argument of `split' to be a regexp constant, but some older
implementations do not. (d.c.) This can lead to confusion when
-attempting to use regexp constants as arguments to user defined
+attempting to use regexp constants as arguments to user-defined
functions (*note User-Defined Functions: User-defined.). For example:
function mysub(pat, repl, str, global)
@@ -5569,9 +5571,9 @@ second field is printed in lines from `BBS-list':
...
Command-line arguments are made available for explicit examination by
-the `awk' program in an array named `ARGV' (*note Using `ARGC' and
-`ARGV': ARGC and ARGV.). `awk' processes the values of command-line
-assignments for escape sequences (d.c.) (*note Escape Sequences::).
+the `awk' program in the `ARGV' array (*note Using `ARGC' and `ARGV':
+ARGC and ARGV.). `awk' processes the values of command-line
+assignments for escape sequences (*note Escape Sequences::). (d.c.)

File: gawk.info, Node: Conversion, Next: Arithmetic Ops, Prev: Variables, Up: Expressions
@@ -5592,7 +5594,7 @@ are converted to strings. Consider the following:
This prints the (numeric) value 27. The numeric values of the
variables `two' and `three' are converted to strings and concatenated
together. The resulting string is converted back to the number 23, to
-which four is then added.
+which 4 is then added.
If, for some reason, you need to force a number to be converted to a
string, concatenate the empty string, `""', with that number. To force
@@ -5724,7 +5726,7 @@ that `X % Y' is negative if X is negative. Thus:
-17 % 8 = -1
In other `awk' implementations, the signedness of the remainder may
-be machine dependent.
+be machine-dependent.
*Note:* The POSIX standard only specifies the use of `^' for
exponentiation. For maximum portability, do not use the `**' operator.
@@ -5849,7 +5851,7 @@ Arrays.). These are all called "lvalues", which means they can appear
on the lefthand side of an assignment operator. The righthand operand
may be any expression; it produces the new value that the assignment
stores in the specified variable, field, or array element. (Such values
-are called "rvalues").
+are called "rvalues".)
It is important to note that variables do _not_ have permanent types.
A variable's type is simply the type of whatever value it happens to
@@ -5872,8 +5874,7 @@ zero. After executing the following code, the value of `foo' is five:
*Note:* Using a variable as a number and then later as a string can be
confusing and is poor programming style. The previous two examples
-illustrate how `awk' works, _not_ how you should write your own
-programs!
+illustrate how `awk' works, _not_ how you should write your programs!
An assignment is an expression, so it has a value--the same value
that is assigned. Thus, `z = 1' is an expression with the value one.
@@ -5969,7 +5970,7 @@ A workaround is:
awk '/[=]=/' /dev/null
- `gawk' does not have this problem, nor do the other freely-available
+ `gawk' does not have this problem, nor do the other freely available
versions described in *Note Other Freely Available `awk'
Implementations: Other Versions.
@@ -5981,8 +5982,8 @@ Increment and Decrement Operators
"Increment" and "decrement operators" increase or decrease the value
of a variable by one. An assignment operator can do the same thing, so
-the increment operators add no power to the `awk' language; however they
-are convenient abbreviations for very common operations.
+the increment operators add no power to the `awk' language; however,
+they are convenient abbreviations for very common operations.
The operator used for adding one is written `++'. It can be used to
increment a variable either before or after taking its value. To
@@ -6070,7 +6071,7 @@ concepts of "true" and "false." Such languages usually use the special
constants `true' and `false', or perhaps their uppercase equivalents.
However, `awk' is different. It borrows a very simple concept of true
and false from C. In `awk', any nonzero numeric value _or_ any
-non-empty string value is true. Any other value (zero or the null
+nonempty string value is true. Any other value (zero or the null
string `""') is false. The following program prints `A strange truth
value' three times:
@@ -6300,7 +6301,7 @@ also referred to as "logical expressions". The terms are equivalent.
Boolean expressions can be used wherever comparison and matching
expressions can be used. They can be used in `if', `while', `do', and
`for' statements (*note Control Statements in Actions: Statements.).
-They have numeric values (one if true, zero if false), that come into
+They have numeric values (one if true, zero if false) that come into
play if the result of the Boolean expression is stored in a variable or
used in arithmetic.
@@ -6456,7 +6457,8 @@ concatenation of a variable with an expression inside parentheses.
but it is best not to get into the habit of using space to avoid
mistakes with user-defined functions. Each function expects a
particular number of arguments. For example, the `sqrt' function must
-be called with a single argument: the number to take the square root of:
+be called with a single argument, the number of which to take the
+square root:
sqrt(ARGUMENT)
@@ -6516,7 +6518,7 @@ interpret them: innermost first. Thus, `$++i' means `$(++i)' and
operand, then the precedence of the unary operators can matter. `$x^2'
means `($x)^2', but `-x^2' means `-(x^2)', because `-' has lower
precedence than `^', whereas `$' has higher precedence. This table
-presents `awk''s operators, in order of highest precedence to lowest:
+presents `awk''s operators, in order of highest to lowest precedence:
`(...)'
Grouping.
@@ -6556,12 +6558,12 @@ presents `awk''s operators, in order of highest precedence to lowest:
redirection does not produce an expression that could be the
operand of another operator. As a result, it does not make sense
to use a redirection operator near another operator of lower
- precedence without parentheses. Such combinations (for example
+ precedence without parentheses. Such combinations (for example,
`print foo > a ? b : c'), result in syntax errors. The correct
way to write this statement is `print foo > (a ? b : c)'.
`~ !~'
- Matching, non-matching.
+ Matching, nonmatching.
`in'
Array membership.
@@ -6577,7 +6579,7 @@ presents `awk''s operators, in order of highest precedence to lowest:
`= += -= *='
`/= %= ^= **='
- Assignment. These operators group right-to-left.
+ Assignment. These operators group right to left.
*Note:* The `|&', `**', and `**=' operators are not specified by
POSIX. For maximum portability, do not use them.
@@ -6623,7 +6625,7 @@ Pattern Elements
Patterns in `awk' control the execution of rules--a rule is executed
when its pattern matches the current input record. The following is a
-summary of the types of patterns in `awk':
+summary of the types of `awk' patterns:
`/REGULAR EXPRESSION/'
A regular expression. It matches when the text of the input record
@@ -6675,13 +6677,13 @@ matches if the expression's value is nonzero (if a number) or non-null
(if a string). The expression is reevaluated each time the rule is
tested against a new input record. If the expression uses fields such
as `$1', the value depends directly on the new input record's text;
-otherwise it depends on only what has happened so far in the execution
+otherwise, it depends on only what has happened so far in the execution
of the `awk' program.
Comparison expressions, using the comparison operators described in
*Note Variable Typing and Comparison Expressions: Typing and Comparison,
-are a very common kind of pattern. Regexp matching and non-matching
-are also very common expressions. The left operand of the `~' and `!~'
+are a very common kind of pattern. Regexp matching and nonmatching are
+also very common expressions. The left operand of the `~' and `!~'
operators is a string. The right operand is either a constant regular
expression enclosed in slashes (`/REGEXP/'), or any expression whose
string value is used as a dynamic regular expression (*note Using
@@ -6777,7 +6779,7 @@ distinguish them from the records you are interested in.
It is possible for a pattern to be turned on and off by the same
record. If the record satisfies both conditions, then the action is
executed for just that record. For example, suppose there is text
-between two identical markers (say the `%' symbol), each on its own
+between two identical markers (e.g., the `%' symbol), each on its own
line, that should be ignored. A first attempt would be to combine a
range pattern that describes the delimited text with the `next'
statement (not discussed yet, *note The `next' Statement: Next
@@ -6798,7 +6800,7 @@ a flag:
In a range pattern, the comma (`,') has the lowest precedence of all
the operators (i.e., it is evaluated last). Thus, the following
-program attempts to combine a range pattern with another simpler test:
+program attempts to combine a range pattern with another, simpler test:
echo Yes | awk '/1/,/2/ || /Yes/'
@@ -6873,14 +6875,14 @@ and readability.
functions, because each library file can have its own `BEGIN' and/or
`END' rule to do its own initialization and/or cleanup. The order in
which library functions are named on the command line controls the
-order in which their `BEGIN' and `END' rules are executed. Therefore
+order in which their `BEGIN' and `END' rules are executed. Therefore,
you have to be careful when writing such rules in library files so that
the order in which they are executed doesn't matter. *Note
Command-Line Options: Options, for more information on using library
functions. *Note A Library of `awk' Functions: Library Functions, for
a number of useful library functions.
- If an `awk' program only has a `BEGIN' rule and no other rules, then
+ If an `awk' program has only a `BEGIN' rule and no other rules, then
the program exits after the `BEGIN' rule is run.(1) However, if an
`END' rule exists, then the input is read, even if there are no other
rules in the program. This is necessary in case the `END' rule checks
@@ -6889,7 +6891,7 @@ the `FNR' and `NR' variables.
---------- Footnotes ----------
(1) The original version of `awk' used to keep reading and ignoring
-input until end of file was seen.
+input until the end of the file was seen.

File: gawk.info, Node: I/O And BEGIN/END, Prev: Using BEGIN/END, Up: BEGIN/END
@@ -6905,7 +6907,7 @@ fields, when executing `BEGIN' rules. References to `$0' and the fields
yield a null string or zero, depending upon the context. One way to
give `$0' a real value is to execute a `getline' command without a
variable (*note Explicit Input with `getline': Getline.). Another way
-is to simply assign a value to `$0'.
+is simply to assign a value to `$0'.
The second point is similar to the first but from the other
direction. Traditionally, due largely to implementation issues, `$0'
@@ -6940,7 +6942,7 @@ File: gawk.info, Node: Empty, Prev: BEGIN/END, Up: Pattern Overview
The Empty Pattern
-----------------
- An empty (i.e., non-existent) pattern is considered to match _every_
+ An empty (i.e., nonexistent) pattern is considered to match _every_
input record. For example, the program:
awk '{ print $1 }' BBS-list
@@ -7020,10 +7022,10 @@ looks like this:
...
An action consists of one or more `awk' "statements", enclosed in
-curly braces (`{' and `}'). Each statement specifies one thing to do.
-The statements are separated by newlines or semicolons. The curly
-braces around an action must be used even if the action contains only
-one statement, or if it contains no statements at all. However, if you
+curly braces (`{...}'). Each statement specifies one thing to do. The
+statements are separated by newlines or semicolons. The curly braces
+around an action must be used even if the action contains only one
+statement, or if it contains no statements at all. However, if you
omit the action entirely, omit the curly braces as well. An omitted
action is equivalent to `{ print $0 }':
@@ -7032,32 +7034,35 @@ action is equivalent to `{ print $0 }':
The following types of statements are supported in `awk':
- * Expressions, which can call functions or assign values to variables
- (*note Expressions::). Executing this kind of statement simply
- computes the value of the expression. This is useful when the
- expression has side effects (*note Assignment Expressions:
- Assignment Ops.).
-
- * Control statements, which specify the control flow of `awk'
- programs. The `awk' language gives you C-like constructs (`if',
- `for', `while', and `do') as well as a few special ones (*note
- Control Statements in Actions: Statements.).
-
- * Compound statements, which consist of one or more statements
- enclosed in curly braces. A compound statement is used in order
- to put several statements together in the body of an `if',
- `while', `do', or `for' statement.
-
- * Input statements using the `getline' command (*note Explicit Input
- with `getline': Getline.), the `next' statement (*note The `next'
- Statement: Next Statement.), and the `nextfile' statement (*note
- Using `gawk''s `nextfile' Statement: Nextfile Statement.).
+Expressions
+ Call functions or assign values to variables (*note
+ Expressions::). Executing this kind of statement simply computes
+ the value of the expression. This is useful when the expression
+ has side effects (*note Assignment Expressions: Assignment Ops.).
+
+Control statements
+ Specify the control flow of `awk' programs. The `awk' language
+ gives you C-like constructs (`if', `for', `while', and `do') as
+ well as a few special ones (*note Control Statements in Actions:
+ Statements.).
+
+Compound statements
+ Consist of one or more statements enclosed in curly braces. A
+ compound statement is used in order to put several statements
+ together in the body of an `if', `while', `do', or `for' statement.
+
+Input statements
+ Use the `getline' command (*note Explicit Input with `getline':
+ Getline.). Also supplied in `awk' are the `next' statement (*note
+ The `next' Statement: Next Statement.), and the `nextfile'
+ statement (*note Using `gawk''s `nextfile' Statement: Nextfile
+ Statement.).
- * Output statements, such as `print' and `printf'. *Note Printing
- Output: Printing.
+Output statements
+ Such as `print' and `printf'. *Note Printing Output: Printing.
- * Deletion statements for deleting array elements. *Note The
- `delete' Statement: Delete.
+Deletion statements
+ For deleting array elements. *Note The `delete' Statement: Delete.

File: gawk.info, Node: Statements, Next: Built-in Variables, Prev: Action Overview, Up: Patterns and Actions
@@ -7108,7 +7113,7 @@ The CONDITION is an expression that controls what the rest of the
statement does. If the CONDITION is true, THEN-BODY is executed;
otherwise, ELSE-BODY is executed. The `else' part of the statement is
optional. The condition is considered false if its value is zero or
-the null string; otherwise the condition is true. Refer to the
+the null string; otherwise, the condition is true. Refer to the
following:
if (x % 2 == 0)
@@ -7118,7 +7123,7 @@ following:
In this example, if the expression `x % 2 == 0' is true (that is, if
the value of `x' is evenly divisible by two), then the first `print'
-statement is executed; otherwise the second `print' statement is
+statement is executed; otherwise, the second `print' statement is
executed. If the `else' keyword appears on the same line as THEN-BODY
and THEN-BODY is not a compound statement (i.e., not surrounded by
curly braces), then a semicolon must separate THEN-BODY from the `else'.
@@ -7210,7 +7215,7 @@ false to begin with. The following is an example of a `do' statement:
} while (i <= 10)
}
-This program prints each input record ten times. However, it isn't a
+This program prints each input record 10 times. However, it isn't a
very realistic example, since in this case an ordinary `while' would do
just as well. This situation reflects actual experience; only
occasionally is there a real use for a `do' statement.
@@ -7381,10 +7386,10 @@ illustrates this fact:
print ""
}
-This program prints all the numbers from 0 to 20--except for five, for
+This program prints all the numbers from 0 to 20--except for 5, for
which the `printf' is skipped. Because the increment `x++' is not
-skipped, `x' does not remain stuck at five. Contrast the `for' loop
-from the previous example with the following `while' loop:
+skipped, `x' does not remain stuck at 5. Contrast the `for' loop from
+the previous example with the following `while' loop:
BEGIN {
x = 0
@@ -7397,7 +7402,7 @@ from the previous example with the following `while' loop:
print ""
}
-This program loops forever once `x' reaches five.
+This program loops forever once `x' reaches 5.
The `continue' statement has no meaning when used outside the body of
a loop. Historical versions of `awk' treated a `continue' statement
@@ -7446,8 +7451,8 @@ beginning, in the following manner:
Because of the `next' statement, the program's subsequent rules won't
see the bad record. The error message is redirected to the standard
-error output stream, as error messages should be. *Note Special File
-Names in `gawk': Special Files.
+error output stream, as error messages should be. For more detail see
+*Note Special File Names in `gawk': Special Files.
According to the POSIX standard, the behavior is undefined if the
`next' statement is used in a `BEGIN' or `END' rule. `gawk' treats it
@@ -7571,14 +7576,14 @@ File: gawk.info, Node: Built-in Variables, Prev: Statements, Up: Patterns and
Built-in Variables
==================
- Most `awk' variables are available for you to use for your own
-purposes; they never change unless your program assigns values to them,
-and they never affect anything unless your program examines them.
-However, a few variables in `awk' have special built-in meanings.
-`awk' examines some of these automatically, so that they enable you to
-tell `awk' how to do certain things. Others are set automatically by
-`awk', so that they carry information from the internal workings of
-`awk' to your program.
+ Most `awk' variables are available to use for your own purposes;
+they never change unless your program assigns values to them, and they
+never affect anything unless your program examines them. However, a
+few variables in `awk' have special built-in meanings. `awk' examines
+some of these automatically, so that they enable you to tell `awk' how
+to do certain things. Others are set automatically by `awk', so that
+they carry information from the internal workings of `awk' to your
+program.
This minor node documents all the built-in variables of `gawk', most
of which are also documented in the chapters describing their areas of
@@ -7603,8 +7608,8 @@ change to control how `awk' does certain things. The variables that are
specific to `gawk' are marked with a pound sign (`#').
`BINMODE #'
- On non-POSIX systems, this variable specifies use of "binary" mode
- for all I/O. Numeric values of one, two, or three, specify that
+ On non-POSIX systems, this variable specifies use of binary mode
+ for all I/O. Numeric values of one, two, or three specify that
input files, output files, or all files, respectively, should use
binary I/O. Alternatively, string values of `"r"' or `"w"'
specify that input files and output files, respectively, should
@@ -7667,7 +7672,7 @@ specific to `gawk' are marked with a pound sign (`#').
`IGNORECASE #'
If `IGNORECASE' is nonzero or non-null, then all string comparisons
- and all regular expression matching are case-independent. Thus,
+ and all regular expression matching are case independent. Thus,
regexp matching with `~' and `!~', as well as the `gensub',
`gsub', `index', `match', `split', and `sub' functions, record
termination with `RS', and field splitting with `FS', all ignore
@@ -7684,7 +7689,7 @@ specific to `gawk' are marked with a pound sign (`#').
as if the `--lint' command-line option is in effect. (*note
Command-Line Options: Options.). With a value of `"fatal"', lint
warnings become fatal errors. Any other true value prints
- non-fatal warnings. Assigning a false value to `LINT' turns off
+ nonfatal warnings. Assigning a false value to `LINT' turns off
the lint warnings.
This variable is a `gawk' extension. It is not special in other
@@ -7740,7 +7745,7 @@ specific to `gawk' are marked with a pound sign (`#').
This variable is used for internationalization of programs at the
`awk' level. It sets the default text domain for specially marked
string constants in the source text, as well as for the
- `dcgettext' and `bindtextdomain' functions (*note
+ `dcgettext', `dcngettext' and `bindtextdomain' functions (*note
Internationalization with `gawk': Internationalization.). The
default value of `TEXTDOMAIN' is `"messages"'.
@@ -7779,7 +7784,7 @@ with an asterisk (`*').
-| BBS-list
`ARGV[0]' contains `"awk"', `ARGV[1]' contains
- `"inventory-shipped"' and `ARGV[2]' contains `"BBS-list"'. The
+ `"inventory-shipped"', and `ARGV[2]' contains `"BBS-list"'. The
value of `ARGC' is three, one more than the index of the last
element in `ARGV', because the elements are numbered from zero.
@@ -7794,9 +7799,9 @@ with an asterisk (`*').
variables.
`ARGIND #'
- This is the index in `ARGV' of the current file being processed.
- Every time `gawk' opens a new data file for processing, it sets
- `ARGIND' to the index in `ARGV' of the file name. When `gawk' is
+ The index in `ARGV' of the current file being processed. Every
+ time `gawk' opens a new data file for processing, it sets `ARGIND'
+ to the index in `ARGV' of the file name. When `gawk' is
processing the input files, `FILENAME == ARGV[ARGIND]' is always
true.
@@ -7836,29 +7841,29 @@ with an asterisk (`*').
Command-Line Options: Options.), it is not special.
`FILENAME'
- This is the name of the file that `awk' is currently reading.
- When no data files are listed on the command line, `awk' reads
- from the standard input and `FILENAME' is set to `"-"'.
- `FILENAME' is changed each time a new file is read (*note Reading
- Input Files: Reading Files.). Inside a `BEGIN' rule, the value of
- `FILENAME' is `""', since there are no input files being processed
- yet.(1) (d.c.) Note though, that using `getline' (*note Explicit
- Input with `getline': Getline.) inside a `BEGIN' rule can give
+ The name of the file that `awk' is currently reading. When no
+ data files are listed on the command line, `awk' reads from the
+ standard input and `FILENAME' is set to `"-"'. `FILENAME' is
+ changed each time a new file is read (*note Reading Input Files:
+ Reading Files.). Inside a `BEGIN' rule, the value of `FILENAME' is
+ `""', since there are no input files being processed yet.(1)
+ (d.c.) Note, though, that using `getline' (*note Explicit Input
+ with `getline': Getline.) inside a `BEGIN' rule can give
`FILENAME' a value.
`FNR'
- This is the current record number in the current file. `FNR' is
+ The current record number in the current file. `FNR' is
incremented each time a new record is read (*note Explicit Input
with `getline': Getline.). It is reinitialized to zero each time
a new input file is started.
`NF'
- This is the number of fields in the current input record. `NF' is
- set each time a new record is read, when a new field is created or
+ The number of fields in the current input record. `NF' is set
+ each time a new record is read, when a new field is created or
when `$0' changes (*note Examining Fields: Fields.).
`NR'
- This is the number of input records `awk' has processed since the
+ The number of input records `awk' has processed since the
beginning of the program's execution (*note How Input Is Split
into Records: Records.). `NR' is incremented each time a new
record is read.
@@ -7905,17 +7910,17 @@ with an asterisk (`*').
Options.), it is not special.
`RLENGTH'
- This is the length of the substring matched by the `match' function
- (*note String Manipulation Functions: String Functions.).
- `RLENGTH' is set by invoking the `match' function. Its value is
- the length of the matched string, or -1 if no match is found.
+ The length of the substring matched by the `match' function (*note
+ String Manipulation Functions: String Functions.). `RLENGTH' is
+ set by invoking the `match' function. Its value is the length of
+ the matched string, or -1 if no match is found.
`RSTART'
- This is the start-index in characters of the substring that is
- matched by the `match' function (*note String Manipulation
- Functions: String Functions.). `RSTART' is set by invoking the
- `match' function. Its value is the position of the string where
- the matched substring starts, or zero if no match was found.
+ The start-index in characters of the substring that is matched by
+ the `match' function (*note String Manipulation Functions: String
+ Functions.). `RSTART' is set by invoking the `match' function.
+ Its value is the position of the string where the matched
+ substring starts, or zero if no match was found.
`RT #'
This is set each time a record is read. It contains the input text
@@ -8138,12 +8143,12 @@ example, conceptually, if the element values are 8, `"foo"', `""', and
0 1 2 3 Index
Only the values are stored; the indices are implicit from the order of
-the values. 8 is the value at index zero, because 8 appears in the
+the values. Here, 8 is the value at index zero, because 8 appears in the
position with zero elements before it.
Arrays in `awk' are different--they are "associative". This means
-that each array is a collection of pairs: an index, and its
-corresponding array element value:
+that each array is a collection of pairs: an index and its corresponding
+array element value:
Element 3 Value 30
Element 1 Value "foo"
@@ -8169,7 +8174,7 @@ It has elements 0-3 and 10, but doesn't have elements 4, 5, 6, 7, 8, or
Another consequence of associative arrays is that the indices don't
have to be positive integers. Any number, or even a string, can be an
index. For example, the following is an array that translates words
-from English into French:
+from English to French:
Element "dog" Value "chien"
Element "cat" Value "chat"
@@ -8224,10 +8229,10 @@ index, use the following expression:
INDEX in ARRAY
-This expression tests whether or not the particular index exists,
-without the side effect of creating that element if it is not present.
-The expression has the value one (true) if `ARRAY[INDEX]' exists and
-zero (false) if it does not exist. For example, this statement tests
+This expression tests whether the particular index exists, without the
+side effect of creating that element if it is not present. The
+expression has the value one (true) if `ARRAY[INDEX]' exists and zero
+(false) if it does not exist. For example, this statement tests
whether the array `frequencies' contains the index `2':
if (2 in frequencies)
@@ -8293,7 +8298,7 @@ following input:
1 Who is number one?
3 I three you.
-its output is:
+Its output is:
1 Who is number one?
2 Who are you? The new number two!
@@ -8363,9 +8368,9 @@ example of this type.
statement is determined by the internal arrangement of the array
elements within `awk' and cannot be controlled or changed. This can
lead to problems if new elements are added to ARRAY by statements in
-the loop body; it is not predictable whether or not the `for' loop will
-reach them. Similarly, changing VAR inside the loop may produce
-strange results. It is best to avoid such things.
+the loop body; it is not predictable whether the `for' loop will reach
+them. Similarly, changing VAR inside the loop may produce strange
+results. It is best to avoid such things.

File: gawk.info, Node: Delete, Next: Numeric Array Subscripts, Prev: Scanning an Array, Up: Arrays
@@ -8419,7 +8424,7 @@ compatibility mode (*note Command-Line Options: Options.).
more efficient than the equivalent loop that deletes each element one
at a time.
- The following statement provides a portable but non-obvious way to
+ The following statement provides a portable but nonobvious way to
clear out an array:(1)
split("", array)
@@ -8480,8 +8485,8 @@ to be. So the usual case of the following works:
The "integer values always convert to strings as integers" rule has
an additional consequence for array indexing. Octal and hexadecimal
-constants (*note Octal and Hexadecimal Numbers: Non-decimal-numbers.)
-are converted internally into numbers and their original form is
+constants (*note Octal and Hexadecimal Numbers: Nondecimal-numbers.)
+are converted internally into numbers, and their original form is
forgotten. This means, for example, that `array[17]', `array[021]', and
`array[0x11]' all refer to the same element!
@@ -8569,7 +8574,7 @@ it was stored with a single index or a sequence of indices. The two
expressions `foo[5,12]' and `foo[5 SUBSEP 12]' are always equivalent.
The default value of `SUBSEP' is the string `"\034"', which contains
-a non-printing character that is unlikely to appear in an `awk' program
+a nonprinting character that is unlikely to appear in an `awk' program
or in most input data. The usefulness of choosing an unlikely
character comes from the fact that index values that contain a string
matching `SUBSEP' can lead to combined strings that are ambiguous.
@@ -8578,7 +8583,7 @@ Suppose that `SUBSEP' is `"@"'; then `foo["a@b", "c"]' and
stored as `foo["a@b@c"]'.
To test whether a particular index sequence exists in a
-"multidimensional" array, use the same operator (`in') that is used for
+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:
@@ -8586,7 +8591,7 @@ parentheses, separated by commas, as the left operand:
The following example 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.
+result. It assumes that all lines have the same number of elements:
{
if (max_nf < NF)
@@ -8627,7 +8632,7 @@ Scanning Multidimensional Arrays
================================
There is no special `for' statement for scanning a
-"multidimensional" array. There cannot be one, because in truth there
+"multidimensional" array. There cannot be one, because, in truth, there
are no multidimensional arrays or elements--there is only a
multidimensional _way of accessing_ an array.
@@ -8740,7 +8745,7 @@ Functions
This major node describes `awk''s built-in functions, which fall
into three categories: numeric, string, and I/O. `gawk' provides
additional groups of functions to work with values that represent time,
-do bit manipulation, and to internationalize and localize programs.
+do bit manipulation, and internationalize and localize programs.
Besides the built-in functions, `awk' has provisions for writing new
functions that the rest of a program can use. The second half of this
@@ -8782,7 +8787,7 @@ Calling Built-in Functions
To call one of `awk''s built-in functions, write the name of the
function followed by arguments in parentheses. For example, `atan2(y +
-z, 1)' is a call to the function `atan2', and has two arguments.
+z, 1)' is a call to the function `atan2' and has two arguments.
Whitespace is ignored between the built-in function name and the
open parenthesis, and it is good practice to avoid using whitespace
@@ -8814,9 +8819,9 @@ are evaluated from left to right or from right to left. For example:
j = atan2(i++, i *= 2)
If the order of evaluation is left to right, then `i' first becomes
-six, and then 12, and `atan2' is called with the two arguments 6 and
-12. But if the order of evaluation is right to left, `i' first becomes
-10, then 11, and `atan2' is called with the two arguments 11 and 10.
+6, and then 12, and `atan2' is called with the two arguments 6 and 12.
+But if the order of evaluation is right to left, `i' first becomes 10,
+then 11, and `atan2' is called with the two arguments 11 and 10.

File: gawk.info, Node: Numeric Functions, Next: String Functions, Prev: Calling Built-in, Up: Built-in
@@ -8826,18 +8831,18 @@ Numeric Functions
The following list describes all of the built-in functions that work
with numbers. Optional parameters are enclosed in square brackets ([
-and ]):
+]):
`int(X)'
This returns the nearest integer to X, located between X and zero
and truncated toward zero.
- For example, `int(3)' is three, `int(3.9)' is three, `int(-3.9)'
- is -3, and `int(-3)' is -3 as well.
+ For example, `int(3)' is 3, `int(3.9)' is 3, `int(-3.9)' is -3,
+ and `int(-3)' is -3 as well.
`sqrt(X)'
This returns the positive square root of X. `gawk' reports an
- error if X is negative. Thus, `sqrt(4)' is two.
+ error if X is negative. Thus, `sqrt(4)' is 2.
`exp(X)'
This returns the exponential of X (`e ^ X') or reports an error if
@@ -8876,7 +8881,7 @@ and ]):
The following example uses a similar function to produce random
integers between one and N. This program prints a new random
- number for each input record.
+ number for each input record:
# Function to roll a simulated die.
function roll(n) { return 1 + int(rand() * n) }
@@ -8905,7 +8910,7 @@ and ]):
numbers.(2) Thus, if the seed is set to the same value a second
time, the same sequence of random numbers is produced again.
- Different `awk' implementations use different random number
+ Different `awk' implementations use different random-number
generators internally. Don't expect the same `awk' program to
produce the same series of random numbers when executed by
different versions of `awk'.
@@ -8926,21 +8931,21 @@ implementation use the C `rand' to implement the `awk' version of
`rand'. In fact, `gawk' uses the BSD `random' function, which is
considerably better than `rand', to produce random numbers.
- (2) Computer generated random numbers really are not truly random.
-They are technically known as "pseudo-random." This means that while
+ (2) Computer-generated random numbers really are not truly random.
+They are technically known as "pseudorandom." This means that while
the numbers in a sequence appear to be random, you can in fact generate
the same sequence of random numbers over and over again.

File: gawk.info, Node: String Functions, Next: I/O Functions, Prev: Numeric Functions, Up: Built-in
-String Manipulation Functions
+String-Manipulation Functions
-----------------------------
The functions in this minor node look at or change the text of one
or more strings. Optional parameters are enclosed in square brackets
-([ and ]). Those functions that are specific to `gawk' are marked with
-a pound sign (`#'):
+([ ]). Those functions that are specific to `gawk' are marked with a
+pound sign (`#'):
* Menu:
@@ -9006,9 +9011,9 @@ a pound sign (`#'):
programs to be maximally portable, always supply the parentheses.
`match(STRING, REGEXP [, ARRAY])'
- The `match' function searches STRING for the longest leftmost
+ The `match' function searches STRING for the longest, leftmost
substring matched by the regular expression, REGEXP. It returns
- the character position, or "index", where that substring begins
+ the character position, or "index", at which that substring begins
(one, if it starts at the beginning of STRING). If no match is
found, it returns zero.
@@ -9053,14 +9058,14 @@ a pound sign (`#'):
Match of ru+n found at 12 in My program runs
Match of Melvin found at 1 in Melvin was here.
- If ARRAY is present, it is cleared, and then the 0'th element of
+ If ARRAY is present, it is cleared, and then the 0th element of
ARRAY is set to the entire portion of STRING matched by REGEXP.
If REGEXP contains parentheses, the integer-indexed elements of
ARRAY are set to contain the portion of STRING matching the
- corresponding parenthesized sub-expression. For example:
+ corresponding parenthesized subexpression. For example:
$ echo foooobazbarrrrr |
- > gawk '{ match($0, /(fo+).+(ba*r)/, arr)
+ > gawk '{ match($0, /(fo+).+(bar*)/, arr)
> print arr[1], arr[2] }'
-| foooo barrrrr
@@ -9069,15 +9074,14 @@ a pound sign (`#'):
third argument is a fatal error.
`split(STRING, ARRAY [, FIELDSEP])'
- This function divides STRING into pieces separated by FIELDSEP,
- and stores the pieces in ARRAY. The first piece is stored in
+ This function divides STRING into pieces separated by FIELDSEP and
+ stores the pieces in ARRAY. The first piece is stored in
`ARRAY[1]', the second piece in `ARRAY[2]', and so forth. The
string value of the third argument, FIELDSEP, is a regexp
describing where to split STRING (much as `FS' can be a regexp
- describing where to split input records). If the FIELDSEP is
- omitted, the value of `FS' is used. `split' returns the number of
- elements created. If STRING does not match FIELDSEP, ARRAY is
- empty and `split' returns zero.
+ describing where to split input records). If FIELDSEP is omitted,
+ the value of `FS' is used. `split' returns the number of elements
+ created.
The `split' function splits strings into pieces in a manner
similar to the way input lines are split into fields. For example:
@@ -9094,7 +9098,7 @@ a pound sign (`#'):
The value returned by this call to `split' is three.
As with input field-splitting, when the value of FIELDSEP is
- `" "', leading and trailing whitespace is ignored and the elements
+ `" "', leading and trailing whitespace is ignored, and the elements
are separated by runs of whitespace. Also as with input
field-splitting, if FIELDSEP is the null string, each individual
character in the string is split into its own array element.
@@ -9137,7 +9141,7 @@ a pound sign (`#'):
`sub(REGEXP, REPLACEMENT [, TARGET])'
The `sub' function alters the value of TARGET. It searches this
- value, which is treated as a string, for the leftmost longest
+ value, which is treated as a string, for the leftmost, longest
substring matched by the regular expression REGEXP. Then the
entire string is changed by replacing the matched text with
REPLACEMENT. The modified string becomes the new value of TARGET.
@@ -9174,7 +9178,7 @@ a pound sign (`#'):
> }'
-| dCaaCbaaa
- This shows how `&' can represent a non-constant string and also
+ This shows how `&' can represent a nonconstant string and also
illustrates the "leftmost, longest" rule in regexp matching (*note
How Much Text Matches?: Leftmost Longest.).
@@ -9182,7 +9186,7 @@ a pound sign (`#'):
putting a backslash before it in the string. As usual, to insert
one backslash in the string, you must write two backslashes.
Therefore, write `\\&' in a string constant to include a literal
- `&' in the replacement. For example, following is shown how to
+ `&' in the replacement. For example, the following shows how to
replace the first `|' on each line with an `&':
{ sub(/\|/, "\\&"); print }
@@ -9198,7 +9202,7 @@ a pound sign (`#'):
sub(/USA/, "United States", "the USA and Canada")
For historical compatibility, `gawk' accepts erroneous code, such
- as in the previous example. However, using any other non-changeable
+ as in the previous example. However, using any other nonchangeable
object as the third parameter causes a fatal error and your program
will not run.
@@ -9208,7 +9212,7 @@ a pound sign (`#'):
`gsub(REGEXP, REPLACEMENT [, TARGET])'
This is similar to the `sub' function, except `gsub' replaces
- _all_ of the longest, leftmost, _non-overlapping_ matching
+ _all_ of the longest, leftmost, _nonoverlapping_ matching
substrings it can find. The `g' in `gsub' stands for "global,"
which means replace everywhere. For example:
@@ -9248,10 +9252,8 @@ a pound sign (`#'):
-| def abc
As with `sub', you must type two backslashes in order to get one
- into the string.
-
- In the replacement text, the sequence `\0' represents the entire
- matched text, as does the character `&'.
+ into the string. In the replacement text, the sequence `\0'
+ represents the entire matched text, as does the character `&'.
The following example shows how you can use the third argument to
control which match of the regexp should be changed:
@@ -9285,7 +9287,12 @@ a pound sign (`#'):
STRING that begins at character number START. For example,
`substr("washington", 5)' returns `"ington"'. The whole suffix is
also returned if LENGTH is greater than the number of characters
- remaining in the string, counting from character number START.
+ remaining in the string, counting from character START.
+
+ If START is less than one or greater than the number of characters
+ in the string, `substr' returns the null string. Similarly, if
+ LENGTH is present but less than or equal to zero, the null string
+ is returned.
The string returned by `substr' _cannot_ be assigned. Thus, it is
a mistake to attempt to change a portion of a string, as shown in
@@ -9313,23 +9320,23 @@ a pound sign (`#'):
`tolower(STRING)'
This returns a copy of STRING, with each uppercase character in
the string replaced with its corresponding lowercase character.
- Non-alphabetic characters are left unchanged. For example,
+ Nonalphabetic characters are left unchanged. For example,
`tolower("MiXeD cAsE 123")' returns `"mixed case 123"'.
`toupper(STRING)'
This returns a copy of STRING, with each lowercase character in
the string replaced with its corresponding uppercase character.
- Non-alphabetic characters are left unchanged. For example,
+ Nonalphabetic characters are left unchanged. For example,
`toupper("MiXeD cAsE 123")' returns `"MIXED CASE 123"'.
---------- Footnotes ----------
(1) Unless you use the `--non-decimal-data' option, which isn't
-recommended. *Note Allowing Non-Decimal Input Data: Non-decimal Data,
+recommended. *Note Allowing Nondecimal Input Data: Nondecimal Data,
for more information.
- (2) This is different from C and C++, where the first character is
-number zero.
+ (2) This is different from C and C++, in which the first character
+is number zero.

File: gawk.info, Node: Gory Details, Prev: String Functions, Up: String Functions
@@ -9376,7 +9383,7 @@ illustrate with a table:
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
the runtime processing done by `sub'. (For the sake of simplicity, the
-rest of the tables below only show the case of even numbers of
+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
@@ -9435,8 +9442,8 @@ specifies; this Info file will be updated as well.(2)
level, whenever `gawk' sees a `\', if the following character is a
digit, then the text that matched the corresponding parenthesized
subexpression is placed in the generated output. Otherwise, no matter
-what the character after the `\' is, it appears in the generated text
-and the `\' does not:
+what character follows the `\', it appears in the generated text and
+the `\' does not:
You type `gensub' sees `gensub' generates
-------- ------------- ------------------
@@ -9477,8 +9484,8 @@ File: gawk.info, Node: I/O Functions, Next: Time Functions, Prev: String Func
Input/Output Functions
----------------------
- The following functions relate to Input/Output (I/O). Optional
-parameters are enclosed in square brackets ([ and ]):
+ The following functions relate to input/output (I/O). Optional
+parameters are enclosed in square brackets ([ ]):
`close(FILENAME [, HOW])'
Close the file FILENAME for input or output. Alternatively, the
@@ -9488,7 +9495,7 @@ parameters are enclosed in square brackets ([ and ]):
Redirections: Close Files And Pipes, for more information.
When closing a coprocess, it is occasionally useful to first close
- one end of the two-way pipe, and then to close the other. This is
+ one end of the two-way pipe and then to close the other. This is
done by providing a second argument to `close'. This second
argument should be one of the two string values `"to"' or `"from"',
indicating which end of the pipe to close. Case in the string does
@@ -9502,7 +9509,7 @@ parameters are enclosed in square brackets ([ and ]):
redirecting output to a pipe or coprocess.
Many utility programs "buffer" their output; i.e., they save
- information to write to a disk file or terminal in memory, until
+ information to write to a disk file or terminal in memory until
there is enough for it to be worthwhile to send the data to the
output device. This is often more efficient than writing every
little bit of information as soon as it is ready. However,
@@ -9524,22 +9531,21 @@ parameters are enclosed in square brackets ([ and ]):
output files and pipes are flushed.
`fflush' returns zero if the buffer is successfully flushed;
- otherwise it returns -1. In the case where all buffers are
+ otherwise, it returns -1. In the case where all buffers are
flushed, the return value is zero only if all buffers were flushed
successfully. Otherwise, it is -1, and `gawk' warns about the
- FILENAME that had the problem.
+ problem FILENAME.
`gawk' also issues a warning message if you attempt to flush a
file or pipe that was opened for reading (such as with `getline'),
or if FILENAME is not an open file, pipe, or coprocess. In such a
- case, `fflush' returns -1 as well.
+ case, `fflush' returns -1, as well.
`system(COMMAND)'
- The `system' function allows the user to execute operating system
- commands and then return to the `awk' program. The `system'
- function executes the command given by the string COMMAND. It
- returns the status returned by the command that was executed as
- its value.
+ Executes operating-system commands and then returns to the `awk'
+ program. The `system' function executes the command given by the
+ string COMMAND. It returns the status returned by the command
+ that was executed as its value.
For example, if the following fragment of code is put in your `awk'
program:
@@ -9565,15 +9571,15 @@ parameters are enclosed in square brackets ([ and ]):
an editor. Some operating systems cannot implement the `system'
function. `system' causes a fatal error if it is not supported.
-Advanced Notes: Interactive Versus Non-Interactive Buffering
-------------------------------------------------------------
+Advanced Notes: Interactive Versus Noninteractive Buffering
+-----------------------------------------------------------
As a side point, buffering issues can be even more confusing,
-depending upon whether your program is "interactive"; i.e.,
+depending upon whether your program is "interactive", i.e.,
communicating with a user sitting at a keyboard.(1)
Interactive programs generally "line buffer" their output; i.e., they
-write out every line. Non-interactive programs wait until they have a
+write out every line. Noninteractive programs wait until they have a
full buffer, which may be many lines of output. Here is an example of
the difference:
@@ -9638,8 +9644,8 @@ and not:
first print
second print
- If `awk' did not flush its buffers before calling `system', the
-latter (undesirable) output is what you see.
+ If `awk' did not flush its buffers before calling `system', you
+would see the latter (undesirable) output.
---------- Footnotes ----------
@@ -9652,22 +9658,22 @@ File: gawk.info, Node: Time Functions, Next: Bitwise Functions, Prev: I/O Fun
Using `gawk''s Timestamp Functions
----------------------------------
- A common use for `awk' programs is the processing of log files
-containing timestamp information, indicating when a particular log
-record was written. Many programs log their timestamp in the form
-returned by the `time' system call, which is the number of seconds
-since a particular epoch. On POSIX-compliant systems, it is the number
-of seconds since 1970-01-01 00:00:00 UTC, not counting leap seconds.(1)
-All known POSIX-compliant systems support timestamps from 0 through
-2^31 - 1, which is sufficient to represent times through 2038-01-19
-03:14:07 UTC. Many systems support a wider range of timestamps,
-including negative timestamps that represent times before the epoch.
+ `awk' programs are commonly used to process log files containing
+timestamp information, indicating when a particular log record was
+written. Many programs log their timestamp in the form returned by the
+`time' system call, which is the number of seconds since a particular
+epoch. On POSIX-compliant systems, it is the number of seconds since
+1970-01-01 00:00:00 UTC, not counting leap seconds.(1) All known
+POSIX-compliant systems support timestamps from 0 through 2^31 - 1,
+which is sufficient to represent times through 2038-01-19 03:14:07 UTC.
+Many systems support a wider range of timestamps, including negative
+timestamps that represent times before the epoch.
In order to make it easier to process such log files and to produce
useful reports, `gawk' provides the following functions for working
with timestamps. They are `gawk' extensions; they are not specified in
the POSIX standard, nor are they in any other known version of `awk'.(2)
-Optional parameters are enclosed in square brackets ([ and ]):
+Optional parameters are enclosed in square brackets ([ ]):
`systime()'
This function returns the current time as the number of seconds
@@ -9683,13 +9689,13 @@ Optional parameters are enclosed in square brackets ([ and ]):
seven numbers representing, respectively, the full year including
century, the month from 1 to 12, the day of the month from 1 to
31, the hour of the day from 0 to 23, the minute from 0 to 59, the
- second from 0 to 60,(3) and an optional daylight savings flag.
+ second from 0 to 60,(3) and an optional daylight-savings flag.
The values of these numbers need not be within the ranges
specified; for example, an hour of -1 means 1 hour before midnight.
The origin-zero Gregorian calendar is assumed, with year 0
preceding year 1 and year -1 preceding year 0. The time is
- assumed to be in the local timezone. If the daylight savings flag
+ assumed to be in the local timezone. If the daylight-savings flag
is positive, the time is assumed to be daylight savings time; if
zero, the time is assumed to be standard time; and if negative
(the default), `mktime' attempts to determine whether daylight
@@ -9724,7 +9730,7 @@ file.
The `strftime' function allows you to easily turn a timestamp into
human-readable information. It is similar in nature to the `sprintf'
function (*note String Manipulation Functions: String Functions.), in
-that it copies non-format specification characters verbatim to the
+that it copies nonformat specification characters verbatim to the
returned string, while substituting date and time values for format
specifications in the FORMAT string.
@@ -9766,9 +9772,9 @@ the following date format specifications:
`%g'
The year modulo 100 of the ISO week number, as a decimal number
- (00-99). For example, January 1, 1993, is in week 53 of 1992.
+ (00-99). For example, January 1, 1993 is in week 53 of 1992.
Thus, the year of its ISO week number is 1992, even though its
- year is 1993. Similarly, December 31, 1973, is in week 1 of 1974.
+ year is 1993. Similarly, December 31, 1973 is in week 1 of 1974.
Thus, the year of its ISO week number is 1974, even though its
year is 1973.
@@ -9811,7 +9817,7 @@ the following date format specifications:
The second as a decimal number (00-60).
`%t'
- A tab character.
+ A TAB character.
`%T'
Equivalent to specifying `%H:%M:%S'.
@@ -9828,7 +9834,7 @@ the following date format specifications:
week one) as a decimal number (01-53). The method for determining
the week number is as specified by ISO 8601. (To wit: if the week
containing January 1 has four or more days in the new year, then
- it is week one, otherwise it is week 53 of the previous year and
+ it is week one; otherwise it is week 53 of the previous year and
the next week is week one.)
`%w'
@@ -9862,9 +9868,9 @@ the following date format specifications:
`%Ec %EC %Ex %EX %Ey %EY %Od %Oe %OH'
`%OI %Om %OM %OS %Ou %OU %OV %Ow %OW %Oy'
- These are "alternate representations" for the specifications that
- use only the second letter (`%c', `%C', and so on).(5) (These
- facilitate compliance with the POSIX `date' utility.)
+ "Alternate representations" for the specifications that use only
+ the second letter (`%c', `%C', and so on).(5) (These facilitate
+ compliance with the POSIX `date' utility.)
`%%'
A literal `%'.
@@ -9888,11 +9894,11 @@ compile `gawk' (*note Installing `gawk': Installation.), then the
following additional format specifications are available:
`%k'
- The hour (24-hour clock) as a decimal number (0-23). Single digit
+ The hour (24-hour clock) as a decimal number (0-23). Single-digit
numbers are padded with a space.
`%l'
- The hour (12-hour clock) as a decimal number (1-12). Single digit
+ The hour (12-hour clock) as a decimal number (1-12). Single-digit
numbers are padded with a space.
`%N'
@@ -9913,7 +9919,7 @@ normal representations are used.
This example is an `awk' implementation of the POSIX `date' utility.
Normally, the `date' utility prints the current date and time of day
in a well-known format. However, if you provide an argument to it that
-begins with a `+', `date' copies non-format specifier characters to the
+begins with a `+', `date' copies nonformat specifier characters to the
standard output and interprets the current time according to the format
specifiers in the string. For example:
@@ -9951,10 +9957,10 @@ if the time zone is set to UTC:
---------- Footnotes ----------
- (1) *Note Glossary::, especially the entries for "Epoch" and "UTC."
+ (1) *Note Glossary::, especially the entries "Epoch" and "UTC."
(2) The GNU `date' utility can also do many of the things described
-here. It's use may be preferable for simple time-related operations in
+here. Its use may be preferable for simple time-related operations in
shell scripts.
(3) Occasionally there are minutes in a year with a leap second,
@@ -9971,13 +9977,13 @@ Internationalization with `gawk': Internationalization.
(6) This is because ISO C leaves the behavior of the C version of
`strftime' undefined and `gawk' uses the system's version of `strftime'
if it's there. Typically, the conversion specifier either does not
-appear in the returned string or it appears literally.
+appear in the returned string or appears literally.

File: gawk.info, Node: Bitwise Functions, Next: I18N Functions, Prev: Time Functions, Up: Built-in
-Using `gawk''s Bit Manipulation Functions
------------------------------------------
+Bit-Manipulation Functions of `gawk'
+------------------------------------
I can explain it for you, but I can't understand it for you.
Anonymous
@@ -10010,15 +10016,15 @@ again with `10111001' and shift it left by three bits, you end up with
`11001000'. `gawk' provides built-in functions that implement the
bitwise operations just described. They are:
-`and(V1, V2)' Return the bitwise AND of the values provided by V1
+`and(V1, V2)' Returns the bitwise AND of the values provided by V1
and V2.
-`or(V1, V2)' Return the bitwise OR of the values provided by V1 and
- V2.
-`xor(V1, V2)' Return the bitwise XOR of the values provided by V1
+`or(V1, V2)' Returns the bitwise OR of the values provided by V1
and V2.
-`compl(VAL)' Return the bitwise complement of VAL.
-`lshift(VAL, COUNT)' Return the value of VAL, shifted left by COUNT bits.
-`rshift(VAL, COUNT)' Return the value of VAL, shifted right by COUNT bits.
+`xor(V1, V2)' Returns the bitwise XOR of the values provided by V1
+ and V2.
+`compl(VAL)' Returns the bitwise complement of VAL.
+`lshift(VAL, COUNT)' Returns the value of VAL, shifted left by COUNT bits.
+`rshift(VAL, COUNT)' Returns the value of VAL, shifted right by COUNT bits.
For all of these functions, first the double-precision
floating-point value is converted to a C `unsigned long', then the
@@ -10071,18 +10077,18 @@ This program produces the following output when run:
The `bits2str' function turns a binary number into a string. The
number `1' represents a binary value where the rightmost bit is set to
1. Using this mask, the function repeatedly checks the rightmost bit.
-AND-ing the mask with the value indicates whether the rightmost bit is
-1 or not. If so, a `"1"' is concatenated onto the front of the string.
+ANDing the mask with the value indicates whether the rightmost bit is 1
+or not. If so, a `"1"' is concatenated onto the front of the string.
Otherwise, a `"0"' is added. The value is then shifted right by one
bit and the loop continues until there are no more 1 bits.
If the initial value is zero it returns a simple `"0"'. Otherwise,
at the end, it pads the value with zeros to represent multiples of
-eight-bit quantities. This is typical in modern computers.
+8-bit quantities. This is typical in modern computers.
The main code in the `BEGIN' rule shows the difference between the
decimal and octal values for the same numbers (*note Octal and
-Hexadecimal Numbers: Non-decimal-numbers.), and then demonstrates the
+Hexadecimal Numbers: Nondecimal-numbers.), and then demonstrates the
results of the `compl', `lshift', and `rshift' functions.
---------- Footnotes ----------
@@ -10094,14 +10100,14 @@ have the left side fill with 1's. Caveat emptor.

File: gawk.info, Node: I18N Functions, Prev: Bitwise Functions, Up: Built-in
-Using `gawk''s String Translation Functions
+Using `gawk''s String-Translation Functions
-------------------------------------------
`gawk' provides facilities for internationalizing `awk' programs.
These include the functions described in the following list. The
-description here is purposely brief. *Note Internationalization with
+descriptions here are purposely brief. *Note Internationalization with
`gawk': Internationalization, for the full story. Optional parameters
-are enclosed in square brackets ([ and ]):
+are enclosed in square brackets ([ ]):
`dcgettext(STRING [, DOMAIN [, CATEGORY]])'
This function returns the translation of STRING in text domain
@@ -10109,11 +10115,19 @@ are enclosed in square brackets ([ and ]):
is the current value of `TEXTDOMAIN'. The default value for
CATEGORY is `"LC_MESSAGES"'.
+`dcngettext(STRING1, STRING2, NUMBER [, DOMAIN [, CATEGORY]])'
+ This function returns the plural form used for NUMBER of the
+ translation of STRING1 and STRING2 in text domain DOMAIN for
+ locale category CATEGORY. STRING1 is the English singular variant
+ of a message, and STRING2 the English plural variant of the same
+ message. The default value for DOMAIN is the current value of
+ `TEXTDOMAIN'. The default value for CATEGORY is `"LC_MESSAGES"'.
+
`bindtextdomain(DIRECTORY [, DOMAIN])'
- This function allows you to specify the directory where `gawk'
+ This function allows you to specify the directory in which `gawk'
will look for message translation files, in case they will not or
cannot be placed in the "standard" locations (e.g., during
- testing). It returns the directory where DOMAIN is "bound."
+ testing). It returns the directory in which DOMAIN is "bound."
The default DOMAIN is the value of `TEXTDOMAIN'. If DIRECTORY is
the null string (`""'), then `bindtextdomain' returns the current
@@ -10127,7 +10141,7 @@ User-Defined Functions
Complicated `awk' programs can often be simplified by defining your
own functions. User-defined functions can be called just like built-in
-ones (*note Function Calls::), but it is up to you to define them;
+ones (*note Function Calls::), but it is up to you to define them,
i.e., to tell `awk' what they should do.
* Menu:
@@ -10161,7 +10175,7 @@ starting to execute any of it.
NAME is the name of the function to define. A valid function name is
like a valid variable name: a sequence of letters, digits, and
-underscores, that doesn't start with a digit. Within a single `awk'
+underscores that doesn't start with a digit. Within a single `awk'
program, any particular name can only be used as a variable, array, or
function.
@@ -10196,7 +10210,7 @@ arguments and the local variables, in order to document how your
function is supposed to be used.
During execution of the function body, the arguments and local
-variable values hide or "shadow" any variables of the same names used
+variable values hide, or "shadow", any variables of the same names used
in the rest of the program. The shadowed variables are not accessible
in the function definition, because there is no way to name them while
their names have been taken away for the local variables. All other
@@ -10276,13 +10290,13 @@ The `delete' Statement: Delete.). Instead of having to repeat this
loop everywhere that you need to clear out an array, your program can
just call `delarray'. (This guarantees portability. The use of
`delete ARRAY' to delete the contents of an entire array is a
-non-standard extension.)
+nonstandard extension.)
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.
+zero, i.e., when there are no more characters left in the string.
function rev(str, start)
{
@@ -10364,7 +10378,7 @@ does this:
print str
}
-to change its first argument variable `str', it _does not_ change the
+to change its first argument variable `str', it does _not_ change the
value of `foo' in the caller. The role of `foo' in calling `myfunc'
ended when its value (`"bar"') was computed. If `str' also exists
outside of `myfunc', the function body cannot alter this outer value,
@@ -10392,8 +10406,8 @@ dangerous if you do not watch what you are doing. For example:
a[1], a[2], a[3]
}
-This program prints `a[1] = 1, a[2] = two, a[3] = 3', because
-`changeit' stores `"two"' in the second element of `a'.
+prints `a[1] = 1, a[2] = two, a[3] = 3', because `changeit' stores
+`"two"' in the second element of `a'.
Some `awk' implementations allow you to call a function that has not
been defined. They only report a problem at runtime when the program
@@ -10409,7 +10423,7 @@ actually tries to call the function. For example:
# note that `foo' is not defined
Because the `if' statement will never be true, it is not really a
-problem that `foo' has not been defined. Usually though, it is a
+problem that `foo' has not been defined. Usually, though, it is a
problem if a program calls an undefined function.
If `--lint' is specified (*note Command-Line Options: Options.),
@@ -10460,11 +10474,11 @@ a value for the largest number among the elements of an array:
You call `maxelt' with one argument, which is an array name. The local
variables `i' and `ret' are not intended to be arguments; while there
-is nothing to stop you from passing two or three arguments to `maxelt',
+is nothing to stop you from passing more than one argument to `maxelt',
the results would be strange. The extra space before `i' in the
function parameter list indicates that `i' and `ret' are not supposed
-to be arguments. This is a convention that you should follow when you
-define functions.
+to be arguments. You should follow this convention when defining
+functions.
The following program uses the `maxelt' function. It loads an
array, calls `maxelt', and then reports the maximum number in that
@@ -10503,8 +10517,8 @@ the array.

File: gawk.info, Node: Dynamic Typing, Prev: Return Statement, Up: User-defined
-Functions and Their Effect on Variable Typing
----------------------------------------------
+Functions and Their Effects on Variable Typing
+----------------------------------------------
`awk' is a very fluid language. It is possible that `awk' can't
tell if an identifier represents a regular variable or an array until
@@ -10532,7 +10546,7 @@ File: gawk.info, Node: Internationalization, Next: Advanced Features, Prev: F
Internationalization with `gawk'
********************************
- Once upon a time, computer makers wrote software that only worked in
+ Once upon a time, computer makers wrote software that worked only in
English. Eventually, hardware and software vendors noticed that if
their systems worked in the native languages of non-English-speaking
countries, they were able to sell more systems. As a result,
@@ -10565,7 +10579,7 @@ Internationalization and Localization
"Internationalization" means writing (or modifying) a program once,
in such a way that it can use multiple languages without requiring
-further source code changes. "Localization" means providing the data
+further source-code changes. "Localization" means providing the data
necessary for an internationalized program to work in a particular
language. Most typically, these terms refer to features such as the
language used for printing error messages, the language used to read
@@ -10583,7 +10597,7 @@ by a program, either directly or via formatting with `printf' or
`sprintf'.(1)
When using GNU `gettext', each application has its own "text
-domain". This is a unique name such as `kpilot' or `gawk', that
+domain". This is a unique name, such as `kpilot' or `gawk', that
identifies the application. A complete application may have multiple
components--programs written in C or C++, as well as scripts written in
`sh' or `awk'. All of the components use the same text domain.
@@ -10603,7 +10617,7 @@ in this order:
to the `gettext' library, by calling the `textdomain' function.
3. Messages from the application are extracted from the source code
- and collected into a Portable Object file (`guide.po'), which
+ and collected into a portable object file (`guide.po'), which
lists the strings and their translations. The translations are
initially empty. The original (usually English) messages serve as
the key for lookup of the translations.
@@ -10662,11 +10676,11 @@ defined locale categories that `gettext' knows about are:
a different category.)
`LC_COLLATE'
- Text collation information; i.e., how different characters and/or
+ Text-collation information; i.e., how different characters and/or
groups of characters sort in a given language.
`LC_CTYPE'
- Character type information (alphabetic, digit, upper- or
+ 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 Regular Expression Operators: Regexp Operators.).
@@ -10684,7 +10698,7 @@ defined locale categories that `gettext' knows about are:
local language, and possibly other information as well.
`LC_TIME'
- Time and date related information, such as 12- or 24-hour clock,
+ Time- and date-related information, such as 12- or 24-hour clock,
month printed before or after day in a date, local month
abbreviations, and so on.
@@ -10700,7 +10714,7 @@ operating systems. Sorry.
(2) Americans use a comma every three decimal places and a period
for the decimal point, while many Europeans do exactly the opposite:
-`1,234.56' vs. `1.234,56'.
+`1,234.56' versus `1.234,56'.

File: gawk.info, Node: Programmer i18n, Next: Translator i18n, Prev: Explaining gettext, Up: Internationalization
@@ -10737,11 +10751,21 @@ internationalization:
C version. The `awk' version's order was chosen to be simple and
to allow for reasonable `awk'-style default arguments.
+`dcngettext(STRING1, STRING2, NUMBER [, DOMAIN [, CATEGORY]])'
+ This built-in function returns the plural form used for NUMBER of
+ the translation of STRING1 and STRING2 in text domain DOMAIN for
+ locale category CATEGORY. STRING1 is the English singular variant
+ of a message, and STRING2 the English plural variant of the same
+ message. The default value for DOMAIN is the current value of
+ `TEXTDOMAIN'. The default value for CATEGORY is `"LC_MESSAGES"'.
+
+ The same remarks as for the `dcgettext' function apply.
+
`bindtextdomain(DIRECTORY [, DOMAIN])'
- This built-in function allows you to specify the directory where
+ This built-in function allows you to specify the directory in which
`gettext' looks for `.mo' files, in case they will not or cannot
be placed in the standard locations (e.g., during testing). It
- returns the directory where DOMAIN is "bound."
+ returns the directory in which DOMAIN is "bound."
The default DOMAIN is the value of `TEXTDOMAIN'. If DIRECTORY is
the null string (`""'), then `bindtextdomain' returns the current
@@ -10769,7 +10793,7 @@ outlined in *Note GNU `gettext': Explaining gettext, like so:
printf(_"Number of users is %d\n", nusers)
3. If you are creating strings dynamically, you can still translate
- them, using the `dcgettext' built-in function.
+ them, using the `dcgettext' built-in function:
message = nusers " users logged in"
message = dcgettext(message, "adminprog")
@@ -10796,8 +10820,8 @@ outlined in *Note GNU `gettext': Explaining gettext, like so:
*Note A Simple Internationalization Example: I18N Example, for an
-example program showing the steps necessary to create and use
-translations from `awk'.
+example program showing the steps to create and use translations from
+`awk'.

File: gawk.info, Node: Translator i18n, Next: I18N Example, Prev: Programmer i18n, Up: Internationalization
@@ -10837,15 +10861,15 @@ to create the initial `.po' file:
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'.(1) *Note A Simple Internationalization
-Example: I18N Example, for the full list of steps to go through to
-create and test translations for `guide'.
+first argument to `dcgettext' or as the first and second argument to
+`dcngettext'.(1) *Note A Simple Internationalization Example: I18N
+Example, for the full list of steps to go through to create and test
+translations for `guide'.
---------- Footnotes ----------
- (1) Eventually, the `xgettext' utility that comes with GNU `gettext'
-will be taught to automatically run `gawk --gen-po' for `.awk' files,
-freeing the translator from having to do it manually.
+ (1) Starting with `gettext' version 0.11.1, the `xgettext' utility
+that comes with GNU `gettext' can handle `.awk' files.

File: gawk.info, Node: Printf Ordering, Next: I18N Portability, Prev: String Extraction, Up: Translator i18n
@@ -10879,7 +10903,7 @@ For example:
indicates which argument to use, and a `$'. Counts are one-based, and
the format string itself is _not_ included. Thus, in the following
example, `string' is the first argument and `length(string)' is the
-second.
+second:
$ gawk 'BEGIN {
> string = "Dont Panic"
@@ -10903,7 +10927,7 @@ precision capability:
*Note:* When using `*' with a positional specifier, the `*' comes
first, then the integer position, and then the `$'. This is somewhat
-counter-intutive.
+counterintutive.
`gawk' does not allow you to mix regular format specifiers and those
with positional specifiers in the same string:
@@ -10942,7 +10966,7 @@ use them to other versions of `awk'. Consider this program:
}
As written, it won't work on other versions of `awk'. However, it is
-actually almost portable, requiring very little change.
+actually almost portable, requiring very little change:
* Assignments to `TEXTDOMAIN' won't have any effect, since
`TEXTDOMAIN' is not special in other `awk' implementations.
@@ -10952,9 +10976,9 @@ actually almost portable, requiring very little change.
it.(1) Typically, the variable `_' has the null string (`""') as
its value, leaving the original string constant as the result.
- * By defining "dummy" functions to replace `dcgettext' and
- `bindtextdomain', the `awk' program can be made to run, but all
- the messages are output in the original language. For example:
+ * By defining "dummy" functions to replace `dcgettext', `dcngettext'
+ and `bindtextdomain', the `awk' program can be made to run, but
+ all the messages are output in the original language. For example:
function bindtextdomain(dir, domain)
{
@@ -10965,6 +10989,11 @@ actually almost portable, requiring very little change.
{
return string
}
+
+ function dcngettext(string1, string2, number, domain, category)
+ {
+ return (number == 1 ? string1 : string2)
+ }
* The use of positional specifications in `printf' or `sprintf' is
_not_ portable. To support `gettext' at the C level, many
@@ -11060,9 +11089,10 @@ proper directory so that `gawk' can find it:
-| Like, the scoop is 42
-| Pardon me, Zaphod who?
- If the two replacement functions for `dcgettext' and `bindtextdomain'
-(*note `awk' Portability Issues: I18N Portability.) are in a file
-named `libintl.awk', then we can run `guide.awk' unchanged as follows:
+ If the three replacement functions for `dcgettext', `dcngettext' and
+`bindtextdomain' (*note `awk' Portability Issues: I18N Portability.)
+are in a file named `libintl.awk', then we can run `guide.awk'
+unchanged as follows:
$ gawk --posix -f guide.awk -f libintl.awk
-| Don't Panic
@@ -11082,8 +11112,8 @@ File: gawk.info, Node: Gawk I18N, Prev: I18N Example, Up: Internationalizatio
As of version 3.1, `gawk' itself has been internationalized using
the GNU `gettext' package. (GNU `gettext' is described in complete
detail in *Note Top::.) As of this writing, the latest version of GNU
-`gettext' is version 0.10.37
-(ftp://gnudist.gnu.org/gnu/gettext/gettext-0.10.37.tar.gz).
+`gettext' is version 0.11.1
+(ftp://ftp.gnu.org/gnu/gettext/gettext-0.11.1.tar.gz).
If a translation of `gawk''s messages exists, then `gawk' produces
usage messages, warnings, and fatal errors in the local language.
@@ -11105,7 +11135,7 @@ Advanced Features of `gawk'
This major node discusses advanced features in `gawk'. It's a bit
of a "grab bag" of items that are otherwise unrelated to each other.
-First, a command-line option allows `gawk' to recognize non-decimal
+First, a command-line option allows `gawk' to recognize nondecimal
numbers in input data, not just in `awk' programs. Next, two-way I/O,
discussed briefly in earlier parts of this Info file, is described in
full detail, along with the basics of TCP/IP networking and BSD portal
@@ -11119,20 +11149,20 @@ description is relegated to an appendix.
* Menu:
-* Non-decimal Data:: Allowing non-decimal input data.
+* Nondecimal Data:: Allowing nondecimal input data.
* Two-way I/O:: Two-way communications with another process.
* TCP/IP Networking:: Using `gawk' for network programming.
* Portal Files:: Using `gawk' with BSD portals.
* Profiling:: Profiling your `awk' programs.

-File: gawk.info, Node: Non-decimal Data, Next: Two-way I/O, Prev: Advanced Features, Up: Advanced Features
+File: gawk.info, Node: Nondecimal Data, Next: Two-way I/O, Prev: Advanced Features, Up: Advanced Features
-Allowing Non-Decimal Input Data
-===============================
+Allowing Nondecimal Input Data
+==============================
If you run `gawk' with the `--non-decimal-data' option, you can have
-non-decimal constants in your input data:
+nondecimal constants in your input data:
$ echo 0123 123 0x123 |
> gawk --non-decimal-data '{ printf "%d, %d, %d\n",
@@ -11163,12 +11193,12 @@ request it.
*Caution:* _Use of this option is not recommended._ It can break old
programs very badly. Instead, use the `strtonum' function to convert
-your data (*note Octal and Hexadecimal Numbers: Non-decimal-numbers.).
+your data (*note Octal and Hexadecimal Numbers: Nondecimal-numbers.).
This makes your programs easier to write and easier to read, and leads
to less surprising results.

-File: gawk.info, Node: Two-way I/O, Next: TCP/IP Networking, Prev: Non-decimal Data, Up: Advanced Features
+File: gawk.info, Node: Two-way I/O, Next: TCP/IP Networking, Prev: Nondecimal Data, Up: Advanced Features
Two-Way Communications with Another Process
===========================================
@@ -11212,7 +11242,7 @@ This works, but not elegantly.
_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 new `|&' operator (borrowed from the
-Korn Shell, `ksh'):(1)
+Korn shell, `ksh'):(1)
do {
print DATA |& "subprogram"
@@ -11235,6 +11265,8 @@ or pipeline of programs, that can be started by the shell.
standard error goes. It is not possible to read the child's
standard error separately.
+ </itemizedlist>
+
* I/O buffering may be a problem. `gawk' automatically flushes all
output down the pipe to the child process. However, if the
coprocess does not flush its output, `gawk' may hang when doing a
@@ -11309,8 +11341,8 @@ networking is by recognizing special file names that begin with
`/inet/'.
The full syntax of the special file name is
-`/inet/PROTOCOL/LOCAL-PORT/REMOTE-HOST/REMOTE-PORT'. The meaning of
-the components are:
+`/inet/PROTOCOL/LOCAL-PORT/REMOTE-HOST/REMOTE-PORT'. The components
+are:
PROTOCOL
The protocol to use over IP. This must be either `tcp', `udp', or
@@ -11325,7 +11357,7 @@ LOCAL-PORT
when you want the system to pick a port. This is what you should do
when writing a TCP or UDP client. You may also use a well-known
service name, such as `smtp' or `http', in which case `gawk'
- attempts to determine the pre-defined port number using the C
+ attempts to determine the predefined port number using the C
`getservbyname' function.
REMOTE-HOST
@@ -11382,8 +11414,8 @@ version of `gawk', called `pgawk' ("profiling `gawk'").
`pgawk' is identical in every way to `gawk', except that when it has
finished running, it creates a profile of your program in a file named
-`awkprof.out'. Because it is profiling, it also executes up to 45
-percent slower than `gawk' normally does.
+`awkprof.out'. Because it is profiling, it also executes up to 45%
+slower than `gawk' normally does.
As shown in the following example, the `--profile' option can be
used to change the name of the file where `pgawk' will write the
@@ -11436,8 +11468,8 @@ First, the `awk' program:
junk
Here is the `awkprof.out' that results from running `pgawk' on this
-program and data. (This example also illustrates that `awk'
-programmers sometimes have to work late.):
+program and data (this example also illustrates that `awk' programmers
+sometimes have to work late):
# gawk profile, created Sun Aug 13 00:00:15 2000
@@ -11479,8 +11511,8 @@ programmers sometimes have to work late.):
6 print "I gotta be me!"
}
- The previous example illustrates many of the basic rules for
-profiling output. The rules are as follows:
+ This example illustrates many of the basic rules for profiling
+output. The rules are as follows:
* The program is printed in the order `BEGIN' rule, pattern/action
rules, `END' rule and functions, listed alphabetically. Multiple
@@ -11510,7 +11542,7 @@ profiling output. The rules are as follows:
counts next to the statements in the body show how many times
those statements were executed.
- * The layout uses "K&R" style using tabs. Braces are used
+ * The layout uses "K&R" style with tabs. Braces are used
everywhere, even when the body of an `if', `else', or loop is only
a single statement.
@@ -11536,7 +11568,7 @@ profiling output. The rules are as follows:
you typed when you wrote it. This is because `pgawk' creates the
profiled version by "pretty printing" its internal representation of
the program. The advantage to this is that `pgawk' can produce a
-standard representation. The disadvantage is that all source code
+standard representation. The disadvantage is that all source-code
comments are lost, as are the distinctions among multiple `BEGIN' and
`END' rules. Also, things such as:
@@ -11558,7 +11590,7 @@ executed. To use this feature, run `pgawk' in the background:
$ pgawk -f myprog &
[1] 13992
-The shell prints a job number and process ID number, in this case,
+The shell prints a job number and process ID number; in this case,
13992. Use the `kill' command to send the `USR1' signal to `pgawk':
$ kill -USR1 13992
@@ -11581,7 +11613,15 @@ Each time, the profile and function call trace are appended to the
output profile file.
If you use the `HUP' signal instead of the `USR1' signal, `pgawk'
-produces the profile and the function call trace, and then exits.
+produces the profile and the function call trace and then exits.
+
+ When `pgawk' runs on MS-DOS or MS-Windows, it uses the `INT' and
+`QUIT' signals for producing the profile and, in the case of the `INT'
+signal, `pgawk' exits. This is because these systems don't support the
+`kill' command, so the only signals you can deliver to a program are
+those generated by the keyboard. The `INT' signal is generated by the
+`Ctrl-<C>' or `Ctrl-<BREAK>' key, while the `QUIT' signal is generated
+by the `Ctrl-<\>' key.

File: gawk.info, Node: Invoking Gawk, Next: Library Functions, Prev: Advanced Features, Up: Top
@@ -11631,9 +11671,9 @@ supports GNU long options.
awk '' datafile1 datafile2
-Doing so makes little sense though; `awk' exits silently when given an
-empty program. (d.c.) If `--lint' has been specified on the
-command-line, `gawk' issues a warning that the program is empty.
+Doing so makes little sense, though; `awk' exits silently when given an
+empty program. (d.c.) If `--lint' has been specified on the command
+line, `gawk' issues a warning that the program is empty.

File: gawk.info, Node: Options, Next: Other Arguments, Prev: Command Line, Up: Invoking Gawk
@@ -11682,7 +11722,7 @@ options and their meanings are as follows:
`-mf N'
`-mr N'
- Set various memory limits to the value N. The `f' flag sets the
+ Sets various memory limits to the value N. The `f' flag sets the
maximum number of fields and the `r' flag sets the maximum record
size. These two flags and the `-m' option are from the Bell
Laboratories research version of Unix `awk'. They are provided
@@ -11736,21 +11776,21 @@ The following list describes `gawk'-specific options:
`-W dump-variables[=FILE]'
`--dump-variables[=FILE]'
- Print a sorted list of global variables, their types, and final
+ Prints a sorted list of global variables, their types, and final
values to FILE. If no FILE is provided, `gawk' prints this list
- to a file named `awkvars.out' in the current directory.
+ to the file named `awkvars.out' in the current directory.
- Having a list of all the global variables is a good way to look for
+ Having a list of all global variables is a good way to look for
typographical errors in your programs. You would also use this
option if you have a large program with a lot of functions, and
you want to be sure that your functions don't inadvertently use
global variables that you meant to be local. (This is a
particularly easy mistake to make with simple variable names like
- `i', `j', and so on.)
+ `i', `j', etc.)
`-W gen-po'
`--gen-po'
- Analyze the source program and generate a GNU `gettext' Portable
+ Analyzes the source program and generates a GNU `gettext' Portable
Object file on standard output for all string constants that have
been marked for translation. *Note Internationalization with
`gawk': Internationalization, for information about this option.
@@ -11759,28 +11799,28 @@ The following list describes `gawk'-specific options:
`-W usage'
`--help'
`--usage'
- Print a "usage" message summarizing the short and long style
+ Prints a "usage" message summarizing the short and long style
options that `gawk' accepts and then exit.
`-W lint[=fatal]'
`--lint[=fatal]'
- Warn about constructs that are dubious or non-portable to other
+ Warns about constructs that are dubious or nonportable to other
`awk' implementations. Some warnings are issued when `gawk' first
reads your program. Others are issued at runtime, as your program
executes. With an optional argument of `fatal', lint warnings
- become fatal errors. This may be drastic but its use will
+ become fatal errors. This may be drastic, but its use will
certainly encourage the development of cleaner `awk' programs.
`-W lint-old'
`--lint-old'
- Warn about constructs that are not available in the original
+ Warns about constructs that are not available in the original
version of `awk' from Version 7 Unix (*note Major Changes Between
V7 and SVR3.1: V7/SVR3.1.).
`-W non-decimal-data'
`--non-decimal-data'
Enable automatic interpretation of octal and hexadecimal values in
- input data (*note Allowing Non-Decimal Input Data: Non-decimal
+ input data (*note Allowing Nondecimal Input Data: Nondecimal
Data.).
*Caution:* This option can severely break old programs. Use with
@@ -11788,9 +11828,9 @@ The following list describes `gawk'-specific options:
`-W posix'
`--posix'
- Operate in strict POSIX mode. This disables all `gawk' extensions
- (just like `--traditional') and adds the following additional
- restrictions:
+ Operates in strict POSIX mode. This disables all `gawk'
+ extensions (just like `--traditional') and adds the following
+ additional restrictions:
* `\x' escape sequences are not recognized (*note Escape
Sequences::).
@@ -11811,15 +11851,15 @@ The following list describes `gawk'-specific options:
also *note Assignment Expressions: Assignment Ops.).
* Specifying `-Ft' on the command-line does not set the value
- of `FS' to be a single tab character (*note Specifying How
+ of `FS' to be a single TAB character (*note Specifying How
Fields Are Separated: Field Separators.).
* The `fflush' built-in function is not supported (*note
Input/Output Functions: I/O Functions.).
- If you supply both `--traditional' and `--posix' on the
- command-line, `--posix' takes precedence. `gawk' also issues a
- warning if both options are supplied.
+ If you supply both `--traditional' and `--posix' on the command
+ line, `--posix' takes precedence. `gawk' also issues a warning if
+ both options are supplied.
`-W profile[=FILE]'
`--profile[=FILE]'
@@ -11835,23 +11875,22 @@ The following list describes `gawk'-specific options:
`-W re-interval'
`--re-interval'
- Allow interval expressions (*note Regular Expression Operators:
+ Allows interval expressions (*note Regular Expression Operators:
Regexp Operators.) in regexps. Because interval expressions were
traditionally not available in `awk', `gawk' does not provide them
by default. This prevents old `awk' programs from breaking.
`-W source PROGRAM-TEXT'
`--source PROGRAM-TEXT'
- Program source code is taken from the PROGRAM-TEXT. This option
- allows you to mix source code in files with source code that you
- enter on the command-line. This is particularly useful when you
- have library functions that you want to use from your command-line
- programs (*note The `AWKPATH' Environment Variable: AWKPATH
- Variable.).
+ Allows you to mix source code in files with source code that you
+ enter on the command line. Program source code is taken from the
+ PROGRAM-TEXT. This is particularly useful when you have library
+ functions that you want to use from your command-line programs
+ (*note The `AWKPATH' Environment Variable: AWKPATH Variable.).
`-W version'
`--version'
- Print version information for this particular copy of `gawk'.
+ Prints version information for this particular copy of `gawk'.
This allows you to determine if your copy of `gawk' is up to date
with respect to whatever the Free Software Foundation is currently
distributing. It is also useful for bug reports (*note Reporting
@@ -11861,11 +11900,11 @@ The following list describes `gawk'-specific options:
flagged as invalid with a warning message but are otherwise ignored.
In compatibility mode, as a special case, if the value of FS supplied
-to the `-F' option is `t', then `FS' is set to the tab character
-(`"\t"'). This is only true for `--traditional' and not for `--posix'
+to the `-F' option is `t', then `FS' is set to the TAB character
+(`"\t"'). This is true only for `--traditional' and not for `--posix'
(*note Specifying How Fields Are Separated: Field Separators.).
- The `-f' option may be used more than once on the command-line. If
+ The `-f' option may be used more than once on the command line. If
it is, `awk' reads its program source from all of the named files, as
if they had been concatenated together into one big file. This is
useful for creating libraries of `awk' functions. These functions can
@@ -11896,7 +11935,7 @@ source code.
behaves in strict POSIX mode, exactly as if you had supplied the
`--posix' command-line option. Many GNU programs look for this
environment variable to turn on strict POSIX mode. If `--lint' is
-supplied on the command-line and `gawk' turns on POSIX mode because of
+supplied on the command line and `gawk' turns on POSIX mode because of
`POSIXLY_CORRECT', then it issues a warning message indicating that
POSIX mode is in effect. You would typically set this variable in your
shell's startup file. For a Bourne-compatible shell (such as `bash'),
@@ -11905,7 +11944,7 @@ you would add these lines to the `.profile' file in your home directory:
POSIXLY_CORRECT=true
export POSIXLY_CORRECT
- For a `csh' compatible shell,(1) you would add this line to the
+ For a `csh'-compatible shell,(1) you would add this line to the
`.login' file in your home directory:
setenv POSIXLY_CORRECT true
@@ -11924,7 +11963,7 @@ File: gawk.info, Node: Other Arguments, Next: AWKPATH Variable, Prev: Options
Other Command-Line Arguments
============================
- Any additional arguments on the command-line are normally treated as
+ Any additional arguments on the command line are normally treated as
input files to be processed in the order specified. However, an
argument that has the form `VAR=VALUE', assigns the value VALUE to the
variable VAR--it does not specify a file at all. (This was discussed
@@ -11951,7 +11990,7 @@ rule (*note The `BEGIN' and `END' Special Patterns: BEGIN/END.),
because such rules are run before `awk' begins scanning the argument
list.
- The variable values given on the command-line are processed for
+ The variable values given on the command line are processed for
escape sequences (*note Escape Sequences::). (d.c.)
In some earlier implementations of `awk', when a variable assignment
@@ -11993,19 +12032,19 @@ by one, looking for a file with the specified name.
The search path is a string consisting of directory names separated
by colons. `gawk' gets its search path from the `AWKPATH' environment
variable. If that variable does not exist, `gawk' uses a default path,
-which is `.:/usr/local/share/awk'.(1) (Programs written for use by
-system administrators should use an `AWKPATH' variable that does not
-include the current directory, `.'.)
+`.:/usr/local/share/awk'.(1) (Programs written for use by system
+administrators should use an `AWKPATH' variable that does not include
+the current directory, `.'.)
The search path feature is particularly useful for building libraries
of useful `awk' functions. The library files can be placed in a
standard directory in the default path and then specified on the
-command-line with a short file name. Otherwise, the full file name
+command line with a short file name. Otherwise, the full file name
would have to be typed for each file.
By using both the `--source' and `-f' options, your command-line
-`awk' programs can use facilities in `awk' library files. *Note A
-Library of `awk' Functions: Library Functions. Path searching is not
+`awk' programs can use facilities in `awk' library files (*note A
+Library of `awk' Functions: Library Functions.). Path searching is not
done if `gawk' is in compatibility mode. This is true for both
`--traditional' and `--posix'. *Note Command-Line Options: Options.
@@ -12034,7 +12073,7 @@ found, and `gawk' no longer needs to use `AWKPATH'.
(1) Your version of `gawk' may use a different directory; it will
depend upon how `gawk' was built and installed. The actual directory is
the value of `$(datadir)' generated when `gawk' was configured. You
-probably don't need to worry about this though.
+probably don't need to worry about this, though.

File: gawk.info, Node: Obsolete, Next: Undocumented, Prev: AWKPATH Variable, Up: Invoking Gawk
@@ -12050,7 +12089,7 @@ they will _not_ be in the next release).
For version 3.1 of `gawk', there are no deprecated command-line
options from the previous version of `gawk'. The use of `next file'
(two words) for `nextfile' was deprecated in `gawk' 3.0 but still
-worked. Starting with version 3.1, the two word usage is no longer
+worked. Starting with version 3.1, the two-word usage is no longer
accepted.
The process-related special files described in *Note Special Files
@@ -12079,13 +12118,13 @@ Known Bugs in `gawk'
* The `-F' option for changing the value of `FS' (*note Command-Line
Options: Options.) is not necessary given the command-line
- variable assignment feature; it remains only for backwards
+ variable assignment feature; it remains only for backward
compatibility.
- * Syntactically invalid single character programs tend to overflow
+ * Syntactically invalid single-character programs tend to overflow
the parse stack, generating a rather unhelpful message. Such
programs are surprisingly difficult to diagnose in the completely
- general case and the effort to do so really is not worth it.
+ general case, and the effort to do so really is not worth it.

File: gawk.info, Node: Library Functions, Next: Sample Programs, Prev: Invoking Gawk, Up: Top
@@ -12115,19 +12154,19 @@ these example library functions and programs from the Texinfo source
for this Info file. (This has already been done as part of the `gawk'
distribution.)
- If you have written one or more useful, general purpose `awk'
+ If you have written one or more useful, general-purpose `awk'
functions and would like to contribute them to the author's collection
of `awk' programs, see *Note How to Contribute: How To Contribute, for
more information.
The programs in this major node and in *Note Practical `awk'
Programs: Sample Programs, freely use features that are `gawk'-specific.
-It is straightforward to rewrite these programs for different
-implementations of `awk'.
+Rewriting these programs for different implementations of awk is pretty
+straightforward.
Diagnostic error messages are sent to `/dev/stderr'. Use `| "cat
-1>&2"' instead of `> "/dev/stderr"', if your system does not have a
-`/dev/stderr' or if you cannot use `gawk'.
+1>&2"' instead of `> "/dev/stderr"' if your system does not have a
+`/dev/stderr', or if you cannot use `gawk'.
A number of programs use `nextfile' (*note Using `gawk''s `nextfile'
Statement: Nextfile Statement.) to skip any remaining input in the
@@ -12143,7 +12182,7 @@ following rule to the beginning of the program:
{ $0 = tolower($0) }
Also, verify that all regexp and string constants used in comparisons
-only use lowercase letters.
+use only lowercase letters.
* Menu:
@@ -12238,7 +12277,7 @@ merely recommend that you do so.
(1) While all the library routines could have been rewritten to use
this convention, this was not done, in order to show how my own `awk'
-programming style has evolved, and to provide some basis for this
+programming style has evolved and to provide some basis for this
discussion.
(2) `gawk''s `--dump-variables' command-line option is useful for
@@ -12273,7 +12312,7 @@ File: gawk.info, Node: Nextfile Function, Next: Assert Function, Prev: Genera
Implementing `nextfile' as a Function
-------------------------------------
- The `nextfile' statement presented in *Note Using `gawk''s
+ The `nextfile' statement, presented in *Note Using `gawk''s
`nextfile' Statement: Nextfile Statement, is a `gawk'-specific
extension--it is not available in most other implementations of `awk'.
This minor node shows two versions of a `nextfile' function that you
@@ -12301,7 +12340,7 @@ Variables: Library Names.)
all the records from the current data file. The end of the file is
eventually reached and a new data file is opened, changing the value of
`FILENAME'. Once this happens, the comparison of `_abandon_' to
-`FILENAME' fails and execution continues with the first rule of the
+`FILENAME' fails, and execution continues with the first rule of the
"real" program.
The `nextfile' function itself simply sets the value of `_abandon_'
@@ -12310,9 +12349,9 @@ and then executes a `next' statement to start the loop.
This initial version has a subtle problem. If the same data file is
listed _twice_ on the commandline, one right after the other or even
with just a variable assignment between them, this code skips right
-through the file, a second time, even though it should stop when it
-gets to the end of the first occurrence. A second version of
-`nextfile' that remedies this problem is shown here:
+through the file a second time, even though it should stop when it gets
+to the end of the first occurrence. A second version of `nextfile'
+that remedies this problem is shown here:
# nextfile --- skip remaining records in current file
# correctly handle successive occurrences of the same file
@@ -12411,7 +12450,7 @@ false, it prints a message to standard error, using the `string'
parameter to describe the failed condition. It then sets the variable
`_assert_exit' to one and executes the `exit' statement. The `exit'
statement jumps to the `END' rule. If the `END' rules finds
-`_assert_exit' to be true, it then exits immediately.
+`_assert_exit' to be true, it exits immediately.
The purpose of the test in the `END' rule is to keep any other `END'
rules from running. When an assertion fails, the program should exit
@@ -12459,7 +12498,7 @@ This means that if you are using a format that does rounding (e.g.,
function does traditional rounding; it might be useful if your awk's
`printf' does unbiased rounding:
- # round --- do normal rounding
+ # round.awk --- do normal rounding
function round(x, ival, aval, fraction)
{
ival = int(x) # integer part, int() truncates
@@ -12564,16 +12603,15 @@ no real reason to build them into the `awk' interpreter:
}
Some explanation of the numbers used by `chr' is worthwhile. The
-most prominent character set in use today is ASCII. Although an
-eight-bit byte can hold 256 distinct values (from 0 to 255), ASCII only
-defines characters that use the values from 0 to 127.(1) In the now
-distant past, at least one minicomputer manufacturer used ASCII, but
-with mark parity, meaning that the leftmost bit in the byte is always
-1. This means that on those systems, characters have numeric values
-from 128 to 255. Finally, large mainframe systems use the EBCDIC
-character set, which uses all 256 values. While there are other
-character sets in use on some older systems, they are not really worth
-worrying about:
+most prominent character set in use today is ASCII. Although an 8-bit
+byte can hold 256 distinct values (from 0 to 255), ASCII only defines
+characters that use the values from 0 to 127.(1) In the now distant
+past, at least one minicomputer manufacturer used ASCII, but with mark
+parity, meaning that the leftmost bit in the byte is always 1. This
+means that on those systems, characters have numeric values from 128 to
+255. Finally, large mainframe systems use the EBCDIC character set,
+which uses all 256 values. While there are other character sets in use
+on some older systems, they are not really worth worrying about:
function ord(str, c)
{
@@ -12645,7 +12683,7 @@ Functions.):
}
An optional additional argument is the separator to use when joining
-the strings back together. If the caller supplies a non-empty value,
+the strings back together. If the caller supplies a nonempty value,
`join' uses it; if it is not supplied, it has a null value. In this
case, `join' uses a single blank as a default separator for the
strings. If the value is equal to `SUBSEP', then `join' joins the
@@ -12750,7 +12788,7 @@ Data File Management
====================
This minor node presents functions that are useful for managing
-command-line datafiles.
+command-line data files.
* Menu:
@@ -12765,7 +12803,7 @@ File: gawk.info, Node: Filetrans Function, Next: Rewind Function, Prev: Data
Noting Data File Boundaries
---------------------------
- The `BEGIN' and `END' rules are each executed exactly once, at the
+ The `BEGIN' and `END' rules are each executed exactly once at the
beginning and end of your `awk' program, respectively (*note The
`BEGIN' and `END' Special Patterns: BEGIN/END.). We (the `gawk'
authors) once had a user who mistakenly thought that the `BEGIN' rule
@@ -12985,7 +13023,7 @@ When it returns -1, there are no options left on the command line.
When using `getopt', options that do not take arguments can be
grouped together. Furthermore, options that take arguments require
that the argument is present. The argument can immediately follow the
-option letter or it can be a separate command-line argument.
+option letter, or it can be a separate command-line argument.
Given a hypothetical program that takes three command-line options,
`-a', `-b', and `-c', where `-b' requires an argument, all of the
@@ -13006,7 +13044,7 @@ use:
`optind'
The index in the argument value array (`argv') where the first
- non-option command-line argument can be found.
+ nonoption command-line argument can be found.
`optarg'
The string value of the argument to an option.
@@ -13066,7 +13104,7 @@ characters (*note String Manipulation Functions: String Functions.).(1)
# getopt.awk --- do C library getopt(3) function in awk
# External variables:
- # Optind -- index in ARGV of first non-option argument
+ # Optind -- index in ARGV of first nonoption argument
# Optarg -- string value of argument to current option
# Opterr -- if nonzero, print our own diagnostic
# Optopt -- current option letter
@@ -13112,7 +13150,7 @@ because it is a global variable.
perhaps a bit of overkill; it checks for a `-' followed by anything
that is not whitespace and not a colon. If the current command-line
argument does not match this pattern, it is not an option, and it ends
-option processing.
+option processing:
if (_opti == 0)
_opti = 2
@@ -13171,7 +13209,7 @@ invalid option letter actually is. Continuing on:
a colon in the `options' string. If there are remaining characters in
the current command-line argument (`argv[Optind]'), then the rest of
that string is assigned to `Optarg'. Otherwise, the next command-line
-argument is used (`-xFOO' vs. `-x FOO'). In either case, `_opti' is
+argument is used (`-xFOO' versus `-x FOO'). In either case, `_opti' is
reset to zero, because there are no more characters left to examine in
the current command-line argument. Continuing:
@@ -13249,14 +13287,14 @@ Reading the User Database
=========================
The `PROCINFO' array (*note Built-in Variables::) provides access to
-the current user's real and effective user and group id numbers, and if
+the current user's real and effective user and group ID numbers, and if
available, the user's supplementary group set. However, because these
are numbers, they do not provide very useful information to the average
user. There needs to be some way to find the user information
-associated with the user and group numbers. This minor node presents a
-suite of functions for retrieving information from the user database.
-*Note Reading the Group Database: Group Functions, for a similar suite
-that retrieves information from the group database.
+associated with the user and group ID numbers. This minor node
+presents a suite of functions for retrieving information from the user
+database. *Note Reading the Group Database: Group Functions, for a
+similar suite that retrieves information from the group database.
The POSIX standard does not define the file where user information is
kept. Instead, it provides the `<pwd.h>' header file and several C
@@ -13274,7 +13312,7 @@ pointer to a `struct passwd'. Each time it is called, it returns the
next entry in the database. When there are no more entries, it returns
`NULL', the null pointer. When this happens, the C program should call
`endpwent' to close the database. Following is `pwcat', a C program
-that "cats" the password database.
+that "cats" the password database:
/*
* pwcat.c
@@ -13307,8 +13345,8 @@ of colon-separated fields. The fields are:
Login name The user's login name.
Encrypted password The user's encrypted password. This may not be
available on some systems.
-User-ID The user's numeric user-id number.
-Group-ID The user's numeric group-id number.
+User-ID The user's numeric user ID number.
+Group-ID The user's numeric group ID number.
Full name The user's full name, and perhaps other
information associated with the user.
Home directory The user's login (or "home") directory
@@ -13374,7 +13412,7 @@ you might want it to be in a different directory on your system.
The function `_pw_init' keeps three copies of the user information
in three associative arrays. The arrays are indexed by username
-(`_pw_byname'), by user-id number (`_pw_byuid'), and by order of
+(`_pw_byname'), by user ID number (`_pw_byuid'), and by order of
occurrence (`_pw_bycount'). The variable `_pw_inited' is used for
efficiency; `_pw_init' needs only to be called once.
@@ -13400,7 +13438,7 @@ explained shortly.
The `getpwnam' function takes a username as a string argument. If
that user is in the database, it returns the appropriate line.
-Otherwise it returns the null string:
+Otherwise, it returns the null string:
function getpwnam(name)
{
@@ -13410,9 +13448,9 @@ Otherwise it returns the null string:
return ""
}
- Similarly, the `getpwuid' function takes a user-id number argument.
+ Similarly, the `getpwuid' function takes a user ID number argument.
If that user number is in the database, it returns the appropriate
-line. Otherwise it returns the null string:
+line. Otherwise, it returns the null string:
function getpwuid(uid)
{
@@ -13442,15 +13480,16 @@ subsequent calls to `getpwent' start over again:
_pw_count = 0
}
- A conscious design decision in this suite is that each subroutine
-calls `_pw_init' to initialize the database arrays. The overhead of
-running a separate process to generate the user database, and the I/O
-to scan it, are only incurred if the user's main program actually calls
-one of these functions. If this library file is loaded along with a
-user's program, but none of the routines are ever called, then there is
-no extra runtime overhead. (The alternative is move the body of
-`_pw_init' into a `BEGIN' rule, which always runs `pwcat'. This
-simplifies the code but runs an extra process that may never be needed.)
+ A conscious design decision in this suite was made that each
+subroutine calls `_pw_init' to initialize the database arrays. The
+overhead of running a separate process to generate the user database,
+and the I/O to scan it, are only incurred if the user's main program
+actually calls one of these functions. If this library file is loaded
+along with a user's program, but none of the routines are ever called,
+then there is no extra runtime overhead. (The alternative is move the
+body of `_pw_init' into a `BEGIN' rule, which always runs `pwcat'.
+This simplifies the code but runs an extra process that may never be
+needed.)
In turn, calling `_pw_init' is not too expensive, because the
`_pw_inited' variable keeps the program from reading the data more than
@@ -13522,14 +13561,14 @@ Group name The group's name.
Group password The group's encrypted password. In practice,
this field is never used; it is usually empty
or set to `*'.
-Group-ID The group's numeric group-id number; this
+Group-ID The group's numeric group ID number; this
number should be unique within the file.
Group member list A comma-separated list of usernames. These
users are members of the group. Modern Unix
systems allow users to be members of several
groups simultaneously. If your system does,
then there are elements `"group1"' through
- `"groupN"' in `PROCINFO' for those group-id
+ `"groupN"' in `PROCINFO' for those group ID
numbers. (Note that `PROCINFO' is a `gawk'
extension; *note Built-in Variables::.)
@@ -13612,10 +13651,10 @@ more than once. The `_gr_init' function first saves `FS',
correct values for scanning the group information.
The group information is stored is several associative arrays. The
-arrays are indexed by group name (`_gr_byname'), by group-id number
+arrays are indexed by group name (`_gr_byname'), by group ID number
(`_gr_bygid'), and by position in the database (`_gr_bycount'). There
is an additional array indexed by username (`_gr_groupsbyuser'), which
-is a space-separated list of groups that each user belongs to.
+is a space-separated list of groups to which each user belongs.
Unlike the user database, it is possible to have multiple records in
the database for the same group. This is common when a group has a
@@ -13625,7 +13664,7 @@ following:
tvpeople:*:101:johnny,jay,arsenio
tvpeople:*:101:david,conan,tom,joan
- For this reason, `_gr_init' looks to see if a group name or group-id
+ For this reason, `_gr_init' looks to see if a group name or group ID
number is already seen. If it is, then the usernames are simply
concatenated onto the previous list of users. (There is actually a
subtle problem with the code just presented. Suppose that the first
@@ -13648,8 +13687,8 @@ null string:
return ""
}
- The `getgrgid' function is similar, it takes a numeric group-id and
-looks up the information associated with that group-id:
+ The `getgrgid' function is similar, it takes a numeric group ID and
+looks up the information associated with that group ID:
function getgrgid(gid)
{
@@ -13783,7 +13822,7 @@ Cutting out Fields and Columns
The `cut' utility selects, or "cuts," characters or fields from its
standard input and sends them to its standard output. Fields are
separated by tabs by default, but you may supply a command-line option
-to change the field "delimiter" (i.e., the field separator character).
+to change the field "delimiter" (i.e., the field-separator character).
`cut''s definition of fields is less general than `awk''s.
A common use of `cut' might be to pull out just the login name of
@@ -13804,7 +13843,7 @@ pipeline generates a sorted, unique list of the logged-on users:
Use LIST as the list of fields to cut out.
`-d DELIM'
- Use DELIM as the field separator character instead of the tab
+ Use DELIM as the field-separator character instead of the tab
character.
`-s'
@@ -13842,13 +13881,13 @@ The variables `e1' and `e2' are used so that the function fits nicely
on the screen.
Next comes a `BEGIN' rule that parses the command-line options. It
-sets `FS' to a single tab character, because that is `cut''s default
+sets `FS' to a single TAB character, because that is `cut''s default
field separator. The output field separator is also set to be the same
as the input field separator. Then `getopt' is used to step through
-the command-line options. One or the other of the variables
-`by_fields' or `by_chars' is set to true, to indicate that processing
-should be done by fields or by characters, respectively. When cutting
-by characters, the output field separator is set to the null string.
+the command-line options. Exactly one of the variables `by_fields' or
+`by_chars' is set to true, to indicate that processing should be done
+by fields or by characters, respectively. When cutting by characters,
+the output field separator is set to the null string:
BEGIN \
{
@@ -13912,7 +13951,7 @@ fields or characters:
set_charlist()
}
- `set_fieldlist' is used to split the field list apart at the commas,
+ `set_fieldlist' is used to split the field list apart at the commas
and into an array. Then, for each element of the array, it looks to
see if it is actually a range, and if so, splits it apart. The range is
verified to make sure the first number is smaller than the second.
@@ -13942,7 +13981,7 @@ The program lets `awk' handle the job of doing the field splitting:
The `set_charlist' function is more complicated than `set_fieldlist'.
The idea here is to use `gawk''s `FIELDWIDTHS' variable (*note Reading
-Fixed-Width Data: Constant Size.), which describes constant width
+Fixed-Width Data: Constant Size.), which describes constant-width
input. When using a character list, that is exactly what we have.
Setting up `FIELDWIDTHS' is more complicated than simply listing the
@@ -14116,7 +14155,7 @@ that processes the command-line arguments with `getopt'. The `-i'
}
Next comes the code that handles the `egrep'-specific behavior. If no
-pattern is supplied with `-e', the first non-option on the command line
+pattern is supplied with `-e', the first nonoption on the command line
is used. The `awk' command-line arguments up to `ARGV[Optind]' are
cleared, so that `awk' won't try to process them as files. If no files
are specified, the standard input is used, and if multiple files are
@@ -14155,9 +14194,9 @@ since it is not necessary with `gawk':
The `beginfile' function is called by the rule in `ftrans.awk' when
each new file is processed. In this case, it is very simple; all it
does is initialize a variable `fcount' to zero. `fcount' tracks how
-many lines in the current file matched the pattern. (Naming the
+many lines in the current file matched the pattern (naming the
parameter `junk' shows we know that `beginfile' is called with a
-parameter, but that we're not interested in its value.):
+parameter, but that we're not interested in its value):
function beginfile(junk)
{
@@ -14170,8 +14209,8 @@ lines that matched. `no_print' is true only if the exit status is
desired. `count_only' is true if line counts are desired. `egrep'
therefore only prints line counts if printing and counting are enabled.
The output format must be adjusted depending upon the number of files to
-process. Finally, `fcount' is added to `total', so that we know how
-many lines altogether matched the pattern:
+process. Finally, `fcount' is added to `total', so that we know the
+total number of lines that matched the pattern:
function endfile(file)
{
@@ -14227,7 +14266,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:
+there are no matches, the exit status is one; otherwise it is zero:
END \
{
@@ -14268,9 +14307,9 @@ File: gawk.info, Node: Id Program, Next: Split Program, Prev: Egrep Program,
Printing out User Information
-----------------------------
- The `id' utility lists a user's real and effective user-id numbers,
-real and effective group-id numbers, and the user's group set, if any.
-`id' only prints the effective user-id and group-id if they are
+ The `id' utility lists a user's real and effective user ID numbers,
+real and effective group ID numbers, and the user's group set, if any.
+`id' only prints the effective user ID and group ID if they are
different from the real ones. If possible, `id' also supplies the
corresponding user and group names. The output might look like this:
@@ -14289,9 +14328,9 @@ the Group Database: Group Functions.):
The program is fairly straightforward. All the work is done in the
`BEGIN' rule. The user and group ID numbers are obtained from
`PROCINFO'. The code is repetitive. The entry in the user database
-for the real user-id number is split into parts at the `:'. The name is
-the first field. Similar code is used for the effective user-id number
-and the group numbers.
+for the real user ID number is split into parts at the `:'. The name is
+the first field. Similar code is used for the effective user ID number
+and the group numbers:
# id.awk --- implement id in awk
#
@@ -14358,9 +14397,8 @@ and the group numbers.
The test in the `for' loop is worth noting. Any supplementary
groups in the `PROCINFO' array have the indices `"group1"' through
-`"groupN"' for some N; i.e., the total number of supplementary groups.
-The problem is, we don't know in advance how many of these groups there
-are.
+`"groupN"' for some N, i.e., the total number of supplementary groups.
+However, we don't know in advance how many of these groups there are.
This loop works by starting at one, concatenating the value with
`"group"', and then using `in' to see if that value is in the array.
@@ -14378,7 +14416,7 @@ Splitting a Large File into Pieces
----------------------------------
The `split' program splits large text files into smaller pieces.
-The usage is as follows:
+Usage is as follows:
split [-COUNT] file [ PREFIX ]
@@ -14396,8 +14434,8 @@ Numbers: Ordinal Functions.
The program first sets its defaults, and then tests to make sure
there are not too many arguments. It then looks at each argument in
-turn. The first argument could be a minus followed by a number. If it
-is, this happens to look like a negative number, so it is made
+turn. The first argument could be a minus sign followed by a number.
+If it is, this happens to look like a negative number, so it is made
positive, and that is the count of lines. The data file name is
skipped over and the final argument is used as the prefix for the
output file names:
@@ -14470,10 +14508,10 @@ The `usage' function simply prints an error message and exits:
The variable `e' is used so that the function fits nicely on the screen.
- This program is a bit sloppy; it relies on `awk' to close the last
-file for it automatically, instead of doing it in an `END' rule. It
-also assumes that letters are contiguous in the character set, which
-isn't true for EBCDIC systems.
+ This program is a bit sloppy; it relies on `awk' to automatically
+close the last file instead of doing it in an `END' rule. It also
+assumes that letters are contiguous in the character set, which isn't
+true for EBCDIC systems.

File: gawk.info, Node: Tee Program, Next: Uniq Program, Prev: Split Program, Up: Clones
@@ -14562,8 +14600,8 @@ N input records and M output files, the first method only executes N

File: gawk.info, Node: Uniq Program, Next: Wc Program, Prev: Tee Program, Up: Clones
-Printing Non-Duplicated Lines of Text
--------------------------------------
+Printing Nonduplicated Lines of Text
+------------------------------------
The `uniq' utility reads sorted lines of data on its standard input,
and by default removes duplicate lines. In other words, it only prints
@@ -14572,21 +14610,21 @@ usage is as follows:
uniq [-udc [-N]] [+N] [ INPUT FILE [ OUTPUT FILE ]]
- The option meanings are:
+ The options for `uniq' are:
`-d'
- Only print repeated lines.
+ Pnly print only repeated lines.
`-u'
- Only print non-repeated lines.
+ Print only nonrepeated lines.
`-c'
Count lines. This option overrides `-d' and `-u'. Both repeated
- and non-repeated lines are counted.
+ and nonrepeated lines are counted.
`-N'
Skip N fields before comparing lines. The definition of fields is
- similar to `awk''s default: non-whitespace characters separated by
+ similar to `awk''s default: nonwhitespace characters separated by
runs of spaces and/or tabs.
`+N'
@@ -14616,11 +14654,12 @@ as the option letter `2' with an argument of `5'. If indeed two or more
digits are supplied (`Optarg' looks like a number), `Optarg' is
concatenated with the option digit and then the result is added to zero
to make it into a number. If there is only one digit in the option,
-then `Optarg' is not needed. `Optind' must be decremented so that
-`getopt' processes it next time. This code is admittedly a bit tricky.
+then `Optarg' is not needed. In this case, `Optind' must be decremented
+so that `getopt' processes it next time. This code is admittedly a bit
+tricky.
If no options are supplied, then the default is taken, to print both
-repeated and non-repeated lines. The output file, if provided, is
+repeated and nonrepeated lines. The output file, if provided, is
assigned to `outputfile'. Early on, `outputfile' is initialized to the
standard output, `/dev/stdout':
@@ -14726,13 +14765,13 @@ to.
The second rule does the work. The variable `equal' is one or zero,
depending upon the results of `are_equal''s comparison. If `uniq' is
counting repeated lines, and the lines are equal, then it increments
-the `count' variable. Otherwise it prints the line and resets `count',
+the `count' variable. Otherwise, it prints the line and resets `count',
since the two lines are not equal.
If `uniq' is not counting, and if the lines are equal, `count' is
incremented. Nothing is printed, since the point is to remove
duplicates. Otherwise, if `uniq' is counting repeated lines and more
-than one line is seen, or if `uniq' is counting non-repeated lines and
+than one line is seen, or if `uniq' is counting nonrepeated lines and
only one line is seen, then the line is printed, and `count' is reset.
Finally, similar logic is used in the `END' rule to print the final
@@ -14793,16 +14832,16 @@ counts for all the files. The options and their meanings are shown in
the following list:
`-l'
- Only count lines.
+ Count only lines.
`-w'
- Only count words. A "word" is a contiguous sequence of
- non-whitespace characters, separated by spaces and/or tabs.
- Happily, this is the normal way `awk' separates fields in its
+ Count only words. A "word" is a contiguous sequence of
+ nonwhitespace characters, separated by spaces and/or tabs.
+ Luckily, this is the normal way `awk' separates fields in its
input data.
`-c'
- Only count characters.
+ Count only characters.
Implementing `wc' in `awk' is particularly elegant, since `awk' does
a lot of the work for us; it splits lines into words (i.e., fields) and
@@ -14810,7 +14849,7 @@ counts them, it counts lines (i.e., records), and it can easily tell us
how long a line is.
This uses the `getopt' library function (*note Processing
-Command-Line Options: Getopt Function.) and the file transition
+Command-Line Options: Getopt Function.) and the file-transition
functions (*note Noting Data File Boundaries: Filetrans Function.).
This version has one notable difference from traditional versions of
@@ -14865,7 +14904,7 @@ lines, words, and characters to zero, and saves the current file name in
}
The `endfile' function adds the current file's numbers to the running
-totals of lines, words, and characters. It then prints out those
+totals of lines, words, and characters.(1) It then prints out those
numbers for the file that was just read. It relies on `beginfile' to
reset the numbers for the following data file:
@@ -14889,7 +14928,7 @@ is needed because the newline character separating records (the value
of `RS') is not part of the record itself, and thus not included in its
length. Next, `lines' is incremented for each line read, and `words'
is incremented by the value of `NF', which is the number of "words" on
-this line:(1)
+this line:
# do per line
{
@@ -14898,7 +14937,7 @@ this line:(1)
words += NF
}
- Finally, the `END' rule simply prints the totals for all the files.
+ Finally, the `END' rule simply prints the totals for all the files:
END {
if (print_total) {
@@ -14914,9 +14953,9 @@ this line:(1)
---------- Footnotes ----------
- (1) `wc' can't just use the value of `FNR' in `endfile'. If you
+ (1) `wc' can't just use the value of `FNR' in `endfile'. If you
examine the code in *Note Noting Data File Boundaries: Filetrans
-Function, you will see that `FNR' has already been reset by the time
+Function you will see that `FNR' has already been reset by the time
`endfile' is called.

@@ -14951,9 +14990,9 @@ Finding Duplicated Words in a Document
A common error when writing large amounts of prose is to accidentally
duplicate words. Typically you will see this in text as something like
-"the the program does the following ...." When the text is online,
-often the duplicated words occur at the end of one line and the
-beginning of another, making them very difficult to spot.
+"the the program does the following..." When the text is online, often
+the duplicated words occur at the end of one line and the beginning of
+another, making them very difficult to spot.
This program, `dupword.awk', scans through a file one line at a time
and looks for adjacent occurrences of the same word. It also saves the
@@ -14962,13 +15001,13 @@ first word on the next line.
The first two statements make sure that the line is all lowercase,
so that, for example, "The" and "the" compare equal to each other. The
-next statement replaces non-alphanumeric and non-whitespace characters
+next statement replaces nonalphanumeric and nonwhitespace characters
with spaces, so that punctuation does not affect the comparison either.
The characters are replaced with spaces so that formatting controls
don't create nonsense words (e.g., the Texinfo `@code{NF}' becomes
-`codeNF' if punctuation is simply deleted). The record is then
-re-split into fields, yielding just the actual words on the line, and
-insuring that there are no empty fields.
+`codeNF' if punctuation is simply deleted). The record is then resplit
+into fields, yielding just the actual words on the line, and ensuring
+that there are no empty fields.
If there are no fields left after removing all the punctuation, the
current record is skipped. Otherwise, the program loops through each
@@ -15013,10 +15052,10 @@ the Time of Day: Gettimeofday Function.
checking and setting of defaults: the delay, the count, and the message
to print. If the user supplied a message without the ASCII BEL
character (known as the "alert" character, `"\a"'), then it is added to
-the message. (On many systems, printing the ASCII BEL generates some
-sort of audible alert. Thus when the alarm goes off, the system calls
-attention to itself in case the user is not looking at their computer
-or terminal.):
+the message. (On many systems, printing the ASCII BEL generates an
+audible alert. Thus when the alarm goes off, the system calls attention
+to itself in case the user is not looking at the computer or terminal.)
+Here is the program:
# alarm.awk --- set an alarm
#
@@ -15147,18 +15186,17 @@ most of the job.
standard `awk': dealing with individual characters is very painful,
requiring repeated use of the `substr', `index', and `gsub' built-in
functions (*note String Manipulation Functions: String Functions.).(2)
-
- There are two functions. The first, `stranslate', takes three
+There are two functions. The first, `stranslate', takes three
arguments:
`from'
- A list of characters to translate from.
+ A list of characters from which to translate.
`to'
- A list of characters to translate to.
+ A list of characters to which to translate.
`target'
- The string to do the translation on.
+ The string on which to do the translation.
Associative arrays make the translation part fairly easy. `t_ar'
holds the "to" characters, indexed by the "from" characters. Then a
@@ -15251,9 +15289,9 @@ Printing Mailing Labels
Here is a "real world"(1) program. This script reads lists of names
and addresses and generates mailing labels. Each page of labels has 20
-labels on it, two across and ten down. The addresses are guaranteed to
-be no more than five lines of data. Each address is separated from the
-next by a blank line.
+labels on it, 2 across and 10 down. The addresses are guaranteed to be
+no more than 5 lines of data. Each address is separated from the next
+by a blank line.
The basic idea is to read 20 labels worth of data. Each line of
each label is stored in the `line' array. The single rule takes care
@@ -15272,7 +15310,7 @@ print horizontally; `line[1]' next to `line[6]', `line[2]' next to
outer loop, controlled by `i', steps through every 10 lines of data;
this is each row of labels. The inner loop, controlled by `j', goes
through the lines within the row. As `j' goes from 0 to 4, `i+j' is
-the `j''th line in the row, and `i+j+5' is the entry next to it. The
+the `j'-th line in the row, and `i+j+5' is the entry next to it. The
output ends up looking something like this:
line 1 line 6
@@ -15285,7 +15323,7 @@ output ends up looking something like this:
As a final note, an extra blank line is printed at lines 21 and 61,
to keep the output lined up on the labels. This is dependent on the
particular brand of labels in use when the program was written. You
-will also note that there are two blank lines at the top and two blank
+will also note that there are 2 blank lines at the top and 2 blank
lines at the bottom.
The `END' rule arranges to flush the final page of labels; there may
@@ -15351,7 +15389,7 @@ something done."

File: gawk.info, Node: Word Sorting, Next: History Sorting, Prev: Labels Program, Up: Miscellaneous Programs
-Generating Word Usage Counts
+Generating Word-Usage Counts
----------------------------
The following `awk' program prints the number of occurrences of each
@@ -15426,7 +15464,7 @@ Finally, we use the system `sort' utility to process the output of the
Assuming we have saved this program in a file named `wordfreq.awk',
and that the data is in `file1', the following pipeline:
- awk -f wordfreq.awk file1 | sort +1 -nr
+ awk -f wordfreq.awk file1 | sort -k 2nr
produces a table of the words appearing in `file1' in order of
decreasing frequency. The `awk' program suitably massages the data and
@@ -15443,7 +15481,7 @@ descending (reverse) order.
the `END' action to:
END {
- sort = "sort +1 -nr"
+ sort = "sort -k 2nr"
for (word in freq)
printf "%s\t%d\n", word, freq[word] | sort
close(sort)
@@ -15460,8 +15498,8 @@ File: gawk.info, Node: History Sorting, Next: Extract Program, Prev: Word Sor
Removing Duplicates from Unsorted Text
--------------------------------------
- The `uniq' program (*note Printing Non-Duplicated Lines of Text:
-Uniq Program.), removes duplicate lines from _sorted_ data.
+ The `uniq' program (*note Printing Nonduplicated Lines of Text: Uniq
+Program.), removes duplicate lines from _sorted_ data.
Suppose, however, you need to remove duplicate lines from a data
file but that you want to preserve the order the lines are in. A good
@@ -15525,14 +15563,14 @@ input files:
(`\') is in C or `awk'. Literal `@' symbols are represented in
Texinfo source files as `@@'.
- * Comments start with either `@c' or `@comment'. The file
- extraction program works by using special comments that start at
- the beginning of a line.
+ * Comments start with either `@c' or `@comment'. The
+ file-extraction program works by using special comments that start
+ at the beginning of a line.
* Lines containing `@group' and `@end group' commands bracket
example text that should not be split across a page boundary.
(Unfortunately, TeX isn't always smart enough to do things exactly
- right and we have to give it some help.)
+ right, and we have to give it some help.)
The following program, `extract.awk', reads through a Texinfo source
file and does two things, based on the special comments. Upon seeing
@@ -15700,18 +15738,18 @@ File: gawk.info, Node: Simple Sed, Next: Igawk Program, Prev: Extract Program
A Simple Stream Editor
----------------------
- The `sed' utility is a "stream editor," a program that reads a
-stream of data, makes changes to it, and passes it on. It is often
-used to make global changes to a large file or to a stream of data
-generated by a pipeline of commands. While `sed' is a complicated
-program in its own right, its most common use is to perform global
-substitutions in the middle of a pipeline:
+ The `sed' utility is a stream editor, a program that reads a stream
+of data, makes changes to it, and passes it on. It is often used to
+make global changes to a large file or to a stream of data generated by
+a pipeline of commands. While `sed' is a complicated program in its
+own right, its most common use is to perform global substitutions in
+the middle of a pipeline:
command1 < orig.data | sed 's/old/new/g' | command2 > result
Here, `s/old/new/g' tells `sed' to look for the regexp `old' on each
-input line and globally replace it with the text `new', (i.e., all the
-occurrences on a line). This is similar to `awk''s `gsub' function
+input line and globally replace it with the text `new', i.e., all the
+occurrences on a line. This is similar to `awk''s `gsub' function
(*note String Manipulation Functions: String Functions.).
The following program, `awksed.awk', accepts at least two
@@ -15816,7 +15854,7 @@ ability to have multiple source files specified via `-f', and the
ability to mix command-line and library source files.
The program is written using the POSIX Shell (`sh') command language.
-The way the program works is as follows:
+It works as follows:
1. Loop through the arguments, saving anything that doesn't represent
`awk' source code for later, when the expanded program is run.
@@ -15828,9 +15866,9 @@ The way the program works is as follows:
text is just echoed directly. The `echo' program
automatically supplies a trailing newline.
- b. Source file names provided with `-f'. We use a neat trick
+ b. Source file names, provided with `-f'. We use a neat trick
and echo `@include FILENAME' into the temporary file. Since
- the file inclusion program works the way `gawk' does, this
+ the file-inclusion program works the way `gawk' does, this
gets the text of the file included into the program at the
correct point.
@@ -15876,12 +15914,12 @@ are several cases of interest:
the `gawk' version information, and then exits.
If none of the `-f', `--file', `-Wfile', `--source', or `-Wsource'
-arguments are supplied, then the first non-option argument should be
-the `awk' program. If there are no command-line arguments left,
-`igawk' prints an error message and exits. Otherwise, the first
-argument is echoed into `/tmp/ig.s.$$'. In any case, after the
-arguments have been processed, `/tmp/ig.s.$$' contains the complete
-text of the original `awk' program.
+arguments are supplied, then the first nonoption argument should be the
+`awk' program. If there are no command-line arguments left, `igawk'
+prints an error message and exits. Otherwise, the first argument is
+echoed into `/tmp/ig.s.$$'. In any case, after the arguments have been
+processed, `/tmp/ig.s.$$' contains the complete text of the original
+`awk' program.
The `$$' in `sh' represents the current process ID number. It is
often used in shell programs to generate unique temporary file names.
@@ -16073,10 +16111,9 @@ There are three key simplifications that make the program work better:
the initial collected `awk' program much simpler; all the
`@include' processing can be done once.
- * The `pathto' function doesn't try to save the line read with
- `getline' when testing for the file's accessibility. Trying to
- save this line for use with the main program complicates things
- considerably.
+ * Not trying to save the line read with `getline' in the `pathto'
+ function when testing for the file's accessibility for use with
+ the main program simplifies things considerably.
* Using a `getline' loop in the `BEGIN' rule does it all in one
place. It is not necessary to call out to a separate loop for
@@ -16131,7 +16168,7 @@ Unix. (This implementation was the basis for `awk' in Berkeley Unix,
through 4.3-Reno. Subsequent versions of Berkeley Unix, and systems
derived from 4.4BSD-Lite, use various versions of `gawk' for their
`awk'.) This major node briefly describes the evolution of the `awk'
-language, with cross references to other parts of the Info file where
+language, with cross-references to other parts of the Info file where
you can find more information.
* Menu:
@@ -16301,7 +16338,7 @@ standard:
Assignment Expressions: Assignment Ops).
* Specifying `-Ft' on the command line does not set the value of
- `FS' to be a single tab character (*note Specifying How Fields Are
+ `FS' to be a single TAB character (*note Specifying How Fields Are
Separated: Field Separators.).
* The `fflush' built-in function is not supported (*note
@@ -16317,7 +16354,7 @@ Extensions in the Bell Laboratories `awk'
made his version available via his home page (*note Other Freely
Available `awk' Implementations: Other Versions.). This minor node
describes extensions in his version of `awk' that are not in POSIX
-`awk'.
+`awk':
* The `-mf N' and `-mr N' command-line options to set the maximum
number of fields and the maximum record size, respectively (*note
@@ -16407,8 +16444,7 @@ options (*note Command-Line Options: Options.).
through `ARGV' (*note Built-in Variables::).
* The `ERRNO' variable, which contains the system error message when
- `getline' returns -1 or when `close' fails (*note Built-in
- Variables::).
+ `getline' returns -1 or `close' fails (*note Built-in Variables::).
* The `/dev/pid', `/dev/ppid', `/dev/pgrpid', and `/dev/user' file
name interpretation (*note Special File Names in `gawk': Special
@@ -16420,7 +16456,7 @@ options (*note Command-Line Options: Options.).
* The ability to use GNU-style long-named options that start with
`--' (*note Command-Line Options: Options.).
- * The `--source' option for mixing command-line and library file
+ * The `--source' option for mixing command-line and library-file
source code (*note Command-Line Options: Options.).
Version 3.0 of `gawk' introduced the following features:
@@ -16492,7 +16528,7 @@ options (*note Command-Line Options: Options.).
* The ability to use octal and hexadecimal constants in `awk'
program source code (*note Octal and Hexadecimal Numbers:
- Non-decimal-numbers.).
+ Nondecimal-numbers.).
* The `|&' operator for two-way I/O to a coprocess (*note Two-Way
Communications with Another Process: Two-way I/O.).
@@ -16540,7 +16576,7 @@ options (*note Command-Line Options: Options.).
Extracting Marked Strings: String Extraction.).
* The `--non-decimal-data' option to allow non-decimal input data
- (*note Allowing Non-Decimal Input Data: Non-decimal Data.).
+ (*note Allowing Nondecimal Input Data: Nondecimal Data.).
* The `--profile' option and `pgawk', the profiling version of
`gawk', for producing execution profiles of `awk' programs (*note
@@ -16610,7 +16646,8 @@ Info file, in approximate chronological order:
* Hal Peterson provided help in porting `gawk' to Cray systems.
- * Kai Uwe Rommel provided the port to OS/2 and its documentation.
+ * Kai Uwe Rommel provided the initial port to OS/2 and its
+ documentation.
* Michal Jaegermann provided the port to Atari systems and its
documentation. He continues to provide portability checking with
@@ -16647,6 +16684,11 @@ Info file, in approximate chronological order:
as well as the code for the new optional third argument to the
`match' function.
+ * Andreas Buening updated the `gawk' port for OS/2.
+
+ Isamu Hasegawa, of IBM in Japan, contributed support for multibyte
+ characters.
+
* Arnold Robbins has been working on `gawk' since 1988, at first
helping David Trueman, and as the primary maintainer since around
1994.
@@ -16700,8 +16742,8 @@ Getting the `gawk' Distribution
* Copy it from someone else who already has it.
* Order `gawk' directly from the Free Software Foundation. Software
- distributions are available for Unix, MS-DOS, and VMS, on tape and
- CD-ROM. Their address is:
+ distributions are available for Gnu/Linux, Unix, and MS-Windows,
+ in several CD packages. Their address is:
Free Software Foundation
59 Temple Place, Suite 330
@@ -16709,13 +16751,13 @@ Getting the `gawk' Distribution
Phone: +1-617-542-5942
Fax (including Japan): +1-617-542-2652
Email: <gnu@gnu.org>
- URL: `http://www.gnu.org/'
+ URL: `http://www.gnu.org'
Ordering from the FSF directly contributes to the support of the
foundation and to the production of more free software.
* Retrieve `gawk' by using anonymous `ftp' to the Internet host
- `gnudist.gnu.org', in the directory `/gnu/gawk'.
+ `ftp.gnu.org', in the directory `/gnu/gawk'.
The GNU software archive is mirrored around the world. The
up-to-date list of mirror sites is available from the main FSF web site
@@ -16732,23 +16774,23 @@ Extracting the Distribution
`gawk' is distributed as a `tar' file compressed with the GNU Zip
program, `gzip'.
- Once you have the distribution (for example, `gawk-3.1.0.tar.gz'),
+ Once you have the distribution (for example, `gawk-3.1.1.tar.gz'),
use `gzip' to expand the file and then use `tar' to extract it. You
can use the following pipeline to produce the `gawk' distribution:
# Under System V, add 'o' to the tar options
- gzip -d -c gawk-3.1.0.tar.gz | tar -xvpf -
+ gzip -d -c gawk-3.1.1.tar.gz | tar -xvpf -
-This creates a directory named `gawk-3.1.0' in the current directory.
+This creates a directory named `gawk-3.1.1' in the current directory.
The distribution file name is of the form `gawk-V.R.P.tar.gz'. The
V represents the major version of `gawk', the R represents the current
release of version V, and the P represents a "patch level", meaning
that minor bugs have been fixed in the release. The current patch
-level is 0, but when retrieving distributions, you should get the
+level is 1, but when retrieving distributions, you should get the
version with the highest version, release, and patch level. (Note,
however, that patch levels greater than or equal to 80 denote "beta" or
-non-production software; you might not want to retrieve such a version
+nonproduction software; you might not want to retrieve such a version
unless you don't mind experimenting.) If you are not on a Unix system,
you need to make other arrangements for getting and extracting the
`gawk' distribution. You should consult a local expert.
@@ -16765,8 +16807,8 @@ configuration process (*note Compiling and Installing `gawk' on Unix:
Unix Installation.), as well as several subdirectories related to
different non-Unix operating systems:
-Various `.c', `.y', and `.h' files:
- These files are the actual `gawk' source code.
+Various `.c', `.y', and `.h' files
+ The actual `gawk' source code.
`README'
`README_d/README.*'
@@ -16794,11 +16836,11 @@ Various `.c', `.y', and `.h' files:
`LIMITATIONS'
A list of those factors that limit `gawk''s performance. Most of
- these depend on the hardware or operating system software, and are
+ these depend on the hardware or operating system software and are
not limits in `gawk' itself.
`POSIX.STD'
- A description of one area where the POSIX standard for `awk' is
+ A description of one area in which the POSIX standard for `awk' is
incorrect as well as how `gawk' handles the problem.
`doc/awkforai.txt'
@@ -16939,7 +16981,7 @@ Compiling `gawk' for Unix
-------------------------
After you have extracted the `gawk' distribution, `cd' to
-`gawk-3.1.0'. Like most GNU software, `gawk' is configured
+`gawk-3.1.1'. Like most GNU software, `gawk' is configured
automatically for your Unix system by running the `configure' program.
This program is a Bourne shell script that is generated automatically
using GNU `autoconf'. (The `autoconf' software is described fully
@@ -16983,12 +17025,12 @@ Additional Configuration Options
--------------------------------
There are several additional options you may use on the `configure'
-command line when compiling `gawk' from scratch.
+command line when compiling `gawk' from scratch, including:
`--enable-portals'
- This option causes `gawk' to treat pathnames that begin with `/p'
- as BSD portal files when doing two-way I/O with the `|&' operator
- (*note Using `gawk' with BSD Portals: Portal Files.).
+ Treat pathnames that begin with `/p' as BSD portal files when
+ doing two-way I/O with the `|&' operator (*note Using `gawk' with
+ BSD Portals: Portal Files.).
`--with-included-gettext'
Use the version of the `gettext' library that comes with `gawk'.
@@ -16997,7 +17039,7 @@ command line when compiling `gawk' from scratch.
systems use Glibc 2. Use this option on any other system.
`--disable-nls'
- Disable all message translation facilities. This is usually not
+ Disable all message-translation facilities. This is usually not
desirable, but it may bring you some slight performance
improvement. You should also use this option if
`--with-included-gettext' doesn't work on your system.
@@ -17154,6 +17196,8 @@ please refer to `README_d/README.pc' in the distribution.
and OS/2.
* PC Using:: Running `gawk' on MS-DOS, Win32 and
OS/2.
+* Cygwin:: Building and running `gawk' for
+ Cygwin.

File: gawk.info, Node: PC Binary Installation, Next: PC Compiling, Prev: PC Installation, Up: PC Installation
@@ -17172,8 +17216,26 @@ and `igawk.bat' (in `gnu/bin') may need to be edited.
The binary distribution contains a separate file describing the
contents. In particular, it may include more than one version of the
-`gawk' executable. OS/2 binary distributions may have a different
-arrangement, but installation is similar.
+`gawk' executable.
+
+ OS/2 (32 bit, EMX) binary distributions are prepared for the `/usr'
+directory of your preferred drive. Set `UNIXROOT' to your installation
+drive (e.g., `e:') if you want to install `gawk' onto another drive
+than the hardcoded default `c:'. Executables appear in `/usr/bin',
+libraries under `/usr/share/awk', manual pages under `/usr/man',
+Texinfo documentation under `/usr/info' and NLS files under
+`/usr/share/locale'. If you already have a file `/usr/info/dir' from
+another package _do not overwrite it!_ Instead enter the following
+commands at your prompt (replace `x:' by your installation drive):
+
+ install-info --info-dir=x:/usr/info x:/usr/info/gawk.info
+ install-info --info-dir=x:/usr/info x:/usr/info/gawkinet.info
+
+ However, the files can be installed anywhere provided `AWKPATH' is
+set properly.
+
+ The binary distribution may contain a separate file containing
+additional or more detailed installation instructions.

File: gawk.info, Node: PC Compiling, Next: PC Using, Prev: PC Binary Installation, Up: PC Installation
@@ -17189,8 +17251,9 @@ used to build a Win32 version, and Microsoft C/C++ can be used to build
the `gawk' distribution contains additional notes, and `pc/Makefile'
contains important information on compilation options.
- To build `gawk', copy the files in the `pc' directory (_except_ for
-`ChangeLog') to the directory with the rest of the `gawk' sources. The
+ To build `gawk' for MS-DOS, Win32, and OS/2 (16 bit; for 32 bit (EMX)
+see below), copy the files in the `pc' directory (_except_ for
+`ChangeLog') to the directory with the rest of the `gawk' sources. The
`Makefile' contains a configuration section with comments and may need
to be edited in order to work with your `make' utility.
@@ -17210,17 +17273,93 @@ the file `pc/Makefile.tst' over the file `test/Makefile' as a
replacement. Details can be found in `README_d/README.pc' and in the
file `pc/Makefile.tst'.
-
-File: gawk.info, Node: PC Using, Prev: PC Compiling, Up: PC Installation
+ To build `gawk' for OS/2 (32 bit, EMX), there are three
+possibilities:
+
+ 1. Using the `configure' script included in the official `gawk'
+ distribution. `configure' need not be recreated but a number of
+ restrictions exist when using this choice:
+
+ * An external `gettext' library cannot be used. I.e. the
+ `configure' option `--without-included-gettext' does not
+ work. Unfortunately, the internal `gettext' library is
+ seriuosly broken for OS/2. Therefore you have to use
+ `--disable-nls'.
+
+ * Executables must be linked statically (`a.out' format only).
+ `make install' does not work.
+
+ These restrictions are due to restrictions in Autoconf 2.13
+ and cannot be avoided. They will vanish as soon as `gawk'
+ moves on to Autoconf 2.5x. Now enter the following commands
+ at your `sh' prompt:
+
+ $ CC="gcc"; export CC
+ $ CFLAGS="-O2"; export CFLAGS
+ $ AWK="awk"; export AWK
+ $ LD="ld"; export LD
+ $ LDFLAGS="-Zexe"; export LDFLAGS
+ $ RANLIB="ranlib"; export RANLIB
+ $ ac_cv_header_sys_socket_h="yes"
+ $ export ac_cv_header_sys_socket_h
+ $ ./configure --prefix=c:/usr --disable-nls
+ $ make
+
+ 2. Using a special version of Autoconf 2.13 for OS/2 to recreate
+ `configure'. Not tested. In principle this should work but the
+ same restrictions apply as in 1, but the environment variables
+ `CC', `AWK', `LDFLAGS' and `RANLIB' are not necessary.
+
+ 3. Using Autoconf 2.5x to recreate `configure' (2.52f or higher
+ recommended). Some patches must be applied to `Makefile.am' and
+ `test/Makefile.am' and `po/Makefile.in.in'. Currently not
+ supported.
+
+ *Note:* Even if the compiled `gawk.exe' executable contains a DOS
+header (`a.out' format), it does _not_ work under DOS. To compile an
+executable that runs under DOS, `CPPFLAGS' must be set to
+`"-DPIPES_SIMULATED"'. But then some nonstandard extensions of `gawk'
+(e.g., `|&') do not work!
+
+ After compilation the internal tests can be performed. Enter `make
+check CMP="diff -a"' at your command prompt. All tests but the `pid'
+test are expected to work properly. The `pid' test might or might not
+work, no idea why.
+
+ *Note:* Most OS/2 ports of GNU `make' are not able to handle the
+Makefiles of this package. If you encounter any problems with `make'
+try GNU `make' 3.79.1. You should find the latest version on
+`ftp://ftp.unixos2.org'.
+
+
+File: gawk.info, Node: PC Using, Next: Cygwin, Prev: PC Compiling, Up: PC Installation
Using `gawk' on PC Operating Systems
....................................
+ With the exception of the Cygwin environment, the `|&' operator and
+TCP/IP networking (*note Using `gawk' for Network Programming: TCP/IP
+Networking.) are not supported for MS-DOS or MS-Windows. EMX (OS/2
+only) does support at least the `|&' operator.
+
The OS/2 and MS-DOS versions of `gawk' search for program files as
described in *Note The `AWKPATH' Environment Variable: AWKPATH Variable.
However, semicolons (rather than colons) separate elements in the
`AWKPATH' variable. If `AWKPATH' is not set or is empty, then the
-default search path is `".;c:/lib/awk;c:/gnu/lib/awk"'.
+default search path for OS/2 (16 bit) and MS-DOS versions is
+`".;c:/lib/awk;c:/gnu/lib/awk"'.
+
+ The search path for OS/2 (32 bit, EMX) is determined by the prefix
+directory (most likely `/usr' or `c:/usr') that has been specified as
+an option of the `configure' script like it is the case for the Unix
+versions. If `c:/usr' is the prefix directory then the default search
+path contains `.' and `c:/usr/share/awk'. Additionally, to support
+binary distributions of `gawk' for OS/2 systems whose drive `c:' might
+not support long file names or might not exist at all, there is a
+special environment variable. If `UNIXROOT' specifies a drive then this
+specific drive is also searched for program files. E.g., if `UNIXROOT'
+is set to `e:' the complete default search path is
+`".;c:/usr/share/awk;e:/usr/share/awk"'.
An `sh'-like shell (as opposed to `command.com' under MS-DOS or
`cmd.exe' under OS/2) may be useful for `awk' programming. Ian
@@ -17236,7 +17375,7 @@ for `gawk' in the shell configuration may need to be changed and the
Under OS/2 and DOS, `gawk' (and many other text programs) silently
translate end-of-line `"\r\n"' to `"\n"' on input and `"\n"' to
`"\r\n"' on output. A special `BINMODE' variable allows control over
-these translations and is interpreted as follows.
+these translations and is interpreted as follows:
* If `BINMODE' is `"r"', or `(BINMODE & 1)' is nonzero, then binary
mode is set on read (i.e., no translations on reads).
@@ -17269,7 +17408,7 @@ particular, the setting of `RS' giving the fewest "surprises" is open
to debate. `mawk' uses `RS = "\r\n"' if binary mode is set on read,
which is appropriate for files with the DOS-style end-of-line.
- To Illustrate, the following examples set binary mode on writes for
+ To illustrate, the following examples set binary mode on writes for
standard output and other files, and set `ORS' as the "usual" DOS-style
end-of-line:
@@ -17293,6 +17432,36 @@ With proper quoting, in the first example the setting of `RS' can be
moved into the `BEGIN' rule.

+File: gawk.info, Node: Cygwin, Prev: PC Using, Up: PC Installation
+
+Using `gawk' In The Cygwin Environment
+......................................
+
+ `gawk' can be used "out of the box" under Windows if you are using
+the Cygwin environment.(1) This environment provides an excellent
+simulation of Unix, using the GNU tools, such as `bash', the GNU
+Compiler Collection (GCC), GNU Make, and other GNU tools. Compilation
+and installation for Cygwin is the same as for a Unix system:
+
+ tar -xvpzf gawk-3.1.1.tar.gz
+ cd gawk-3.1.1
+ ./configure
+ make
+
+ When compared to GNU/Linux on the same system, the `configure' step
+on Cygwin takes considerably longer. However, it does finish, and then
+the `make' proceeds as usual.
+
+ *Note:* The `|&' operator and TCP/IP networking (*note Using `gawk'
+for Network Programming: TCP/IP Networking.) are fully supported in
+the Cygwin environment. This is not true for any other environment for
+MS-DOS or MS-Windows.
+
+ ---------- Footnotes ----------
+
+ (1) `http://www.cygwin.com'
+
+
File: gawk.info, Node: VMS Installation, Prev: PC Installation, Up: Non-Unix Installation
How to Compile and Install `gawk' on VMS
@@ -17692,7 +17861,8 @@ BeOS Martin Brown, <mc@whoever.com>.
MS-DOS Scott Deifik, <scottd@amgen.com> and Darrel
Hankerson, <hankedr@mail.auburn.edu>.
MS-Windows Juan Grigera, <juan@biophnet.unlp.edu.ar>.
-OS/2 Kai Uwe Rommel, <rommel@ars.de>.
+OS/2 The Unix for OS/2 team,
+ <gawk-maintainer@unixos2.org>.
Tandem Stephen Davies, <scldad@sdc.com.au>.
VMS Pat Rankin, <rankin@eql.caltech.edu>.
@@ -17830,7 +18000,7 @@ one more option available on the command line:
`-W parsedebug'
`--parsedebug'
- Print out the parse stack information as the program is being
+ Prints out the parse stack information as the program is being
parsed.
This option is intended only for serious `gawk' developers and not
@@ -17886,8 +18056,8 @@ make it possible for me to include your changes:
haven't read it, please do so, preferably _before_ starting to
modify `gawk'. (The `GNU Coding Standards' are available from the
GNU Project's `ftp' site, at
- `ftp://gnudist.gnu.org/gnu/GNUInfo/standards.text'. Texinfo,
- Info, and DVI versions are also available.)
+ `ftp://ftp.gnu.org/gnu/GNUInfo/standards.text'. Texinfo, Info,
+ and DVI versions are also available.)
4. Use the `gawk' coding style. The C code for `gawk' follows the
instructions in the `GNU Coding Standards', with minor exceptions.
@@ -17996,12 +18166,12 @@ Porting `gawk' to a New Operating System
----------------------------------------
If you want to port `gawk' to a new operating system, there are
-several steps to follow:
+several steps:
1. Follow the guidelines in *Note Adding New Features: Adding Code,
concerning coding style, submission of diffs, and so on.
- 2. When doing a port, bear in mind that your code must co-exist
+ 2. When doing a port, bear in mind that your code must coexist
peacefully with the rest of `gawk' and the other ports. Avoid
gratuitous changes to the system-independent parts of the code. If
at all possible, avoid sprinkling `#ifdef's just for your port
@@ -18065,8 +18235,8 @@ several steps to follow:
you have questions, please contact me, or <gnu@gnu.org>.
Following these steps makes it much easier to integrate your changes
-into `gawk' and have them co-exist happily with other operating
-systems' code that is already there.
+into `gawk' and have them coexist happily with other operating systems'
+code that is already there.
In the code that you supply and maintain, feel free to use a coding
style and brace layout that suits your taste.
@@ -18211,7 +18381,7 @@ when writing extensions. The next minor node shows how they are used:
`NODE *get_argument(NODE *tree, int i)'
This function is called from within a C extension function to get
- the `i''th argument from the function call. The first argument is
+ the `i'-th argument from the function call. The first argument is
argument zero.
`void set_value(NODE *tree)'
@@ -18227,7 +18397,7 @@ when writing extensions. The next minor node shows how they are used:
An argument that is supposed to be an array needs to be handled with
some extra code, in case the array being passed in is actually from a
-function parameter. The following "boiler plate" code shows how to do
+function parameter. The following boilerplate code shows how to do
this:
NODE *the_arg;
@@ -18650,14 +18820,14 @@ well.
Following is a list of probable future changes visible at the `awk'
language level:
-Loadable Module Interface
+Loadable module interface
It is not clear that the `awk'-level interface to the modules
facility is as good as it should be. The interface needs to be
redesigned, particularly taking namespace issues into account, as
well as possibly including issues such as library search path order
and versioning.
-`RECLEN' variable for fixed length records
+`RECLEN' variable for fixed-length records
Along with `FIELDWIDTHS', this would speed up the processing of
fixed-length records. `PROCINFO["RS"]' would be `"RS"' or
`"RECLEN"', depending upon which kind of record processing is in
@@ -18672,7 +18842,7 @@ Databases
It may be possible to map a GDBM/NDBM/SDBM file into an `awk'
array.
-Large Character Sets
+Large character sets
It would be nice if `gawk' could handle UTF-8 and other character
sets that are larger than eight bits.
@@ -18682,7 +18852,7 @@ More `lint' warnings
Following is a list of probable improvements that will make `gawk''s
source code easier to work with:
-Loadable Module Mechanics
+Loadable module mechanics
The current extension mechanism works (*note Adding New Built-in
Functions to `gawk': Dynamic Extensions.), but is rather
primitive. It requires a fair amount of manual work to create and
@@ -18691,24 +18861,24 @@ Loadable Module Mechanics
a number of features that would make using loadable modules much
easier. `gawk' should be changed to use `libtool'.
-Loadable Module Internals
+Loadable module internals
The API to its internals that `gawk' "exports" should be revised.
Too many things are needlessly exposed. A new API should be
designed and implemented to make module writing easier.
-Better Array Subscript Management
+Better array subscript management
`gawk''s management of array subscript storage could use revamping,
so that using the same value to index multiple arrays only stores
one copy of the index value.
-Integrating the DBUG Library
+Integrating the DBUG library
Integrating Fred Fish's DBUG library would be helpful during
development, but it's a lot of work to do.
Following is a list of probable improvements that will make `gawk'
perform better:
-An Improved Version of `dfa'
+An improved version of `dfa'
The `dfa' pattern matcher from GNU `grep' has some problems.
Either a new version or a fixed one will deal with some important
regexp matching issues.
@@ -18823,7 +18993,7 @@ Clean Up
After the cake comes out of the oven, you still have to wrap it in
plastic wrap to keep anyone from tasting it, as well as wash the
- mixing bowls and other utensils.
+ mixing bowls and utensils.
An "algorithm" is a detailed set of instructions necessary to
accomplish a task, or process data. It is much the same as a recipe
@@ -18839,7 +19009,7 @@ record.
The act of reading data is termed "input", and that of generating
results, not too surprisingly, is termed "output". They are often
-referred to together as "Input/Output," and even more often, as "I/O"
+referred to together as "input/output," and even more often, as "I/O"
for short. (You will also see "input" and "output" used as verbs.)
`awk' manages the reading of data for you, as well as the breaking
@@ -18864,7 +19034,7 @@ Data Values in a Computer
In a program, you keep track of information and values in things
called "variables". A variable is just a name for a given value, such
as `first_name', `last_name', `address', and so on. `awk' has several
-pre-defined variables, and it has special names to refer to the current
+predefined variables, and it has special names to refer to the current
input record and the fields of the record. You may also group multiple
associated values under one name, as an array.
@@ -18876,7 +19046,7 @@ characters that comprise them. Individual variables, as well as
numeric and string variables, are referred to as "scalar" values.
Groups of values, such as arrays, are not scalars.
- Within computers, there are two kinds of numeric values: "integers",
+ Within computers, there are two kinds of numeric values: "integers"
and "floating-point". In school, integer values were referred to as
"whole" numbers--that is, numbers without any fractional part, such as
1, 42, or -17. The advantage to integer numbers is that they represent
@@ -18920,7 +19090,7 @@ binary, each column represents two times the value in the column to its
right. Each column may contain either a 0 or a 1. Thus, binary 1010
represents 1 times 8, plus 0 times 4, plus 1 times 2, plus 0 times 1,
or decimal 10. Octal and hexadecimal are discussed more in *Note Octal
-and Hexadecimal Numbers: Non-decimal-numbers.
+and Hexadecimal Numbers: Nondecimal-numbers.
Programs are written in programming languages. Hundreds, if not
thousands, of programming languages exist. One of the most popular is
@@ -18932,7 +19102,7 @@ to as "K&R" C, after the initials of Brian Kernighan and Dennis Ritchie,
the authors of the first book on C. (Dennis Ritchie created the
language, and Brian Kernighan was one of the creators of `awk'.)
- In the mid-1980's, an effort began to produce an international
+ In the mid-1980s, an effort began to produce an international
standard for C. This work culminated in 1989, with the production of
the ANSI standard for C. This standard became an ISO standard in 1990.
Where it makes sense, POSIX `awk' is compatible with 1990 ISO C.
@@ -18947,16 +19117,16 @@ Floating-Point Number Caveats
=============================
As mentioned earlier, floating-point numbers represent what are
-called "real" numbers; i.e., those that have a fractional part. `awk'
+called "real" numbers, i.e., those that have a fractional part. `awk'
uses double-precision floating-point numbers to represent all numeric
values. This minor node describes some of the issues involved in using
floating-point numbers.
There is a very nice paper on floating-point arithmetic by David
-Goldberg, `What Every Computer Scientist Should Know About
-Floating-point Arithmetic', `ACM Computing Surveys' *23*, 1 (1991-03),
+Goldberg, "What Every Computer Scientist Should Know About
+Floating-point Arithmetic," `ACM Computing Surveys' *23*, 1 (1991-03),
5-48.(1) This is worth reading if you are interested in the details,
-but it does require a background in Computer Science.
+but it does require a background in computer science.
Internally, `awk' keeps both the numeric value (double-precision
floating-point) and the string value for a variable. Separately, `awk'
@@ -19043,7 +19213,7 @@ noted and can affect comparisons.
---------- Footnotes ----------
- (1) `http://www.validgh.com/goldberg/paper.ps'
+ (1) `http://www.validgh.com/goldberg/paper.ps'.
(2) Pathological cases can require up to 752 digits (!), but we
doubt that you need to worry about this.
@@ -19292,7 +19462,7 @@ Epoch
See also "GMT" and "UTC."
Escape Sequences
- A special sequence of characters used for describing non-printing
+ A special sequence of characters used for describing nonprinting
characters, such as `\n' for newline or `\033' for the ASCII ESC
(Escape) character. (*Note Escape Sequences::.)
@@ -19310,7 +19480,7 @@ Field
Flag
A variable whose truth value indicates the existence or
- non-existence of some condition.
+ nonexistence of some condition.
Floating-Point Number
Often referred to in mathematical terms as a "rational" or real
@@ -19339,7 +19509,7 @@ FSF
See "Free Software Foundation."
Free Software Foundation
- A non-profit organization dedicated to the production and
+ A nonprofit organization dedicated to the production and
distribution of freely distributable software. It was founded by
Richard M. Stallman, the author of the original Emacs editor. GNU
Emacs is the most widely used version of Emacs today.
@@ -19652,7 +19822,7 @@ UTC
and "GMT."
Whitespace
- A sequence of space, tab, or newline characters occurring inside
+ A sequence of space, TAB, or newline characters occurring inside
an input record or a string.

@@ -19662,7 +19832,6 @@ GNU General Public License
**************************
Version 2, June 1991
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111, USA
@@ -19721,7 +19890,6 @@ patent must be licensed for everyone's free use or not licensed at all.
modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
0. This License applies to any program or other work which contains a
notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program",
@@ -20034,7 +20202,6 @@ GNU Free Documentation License
of this license document, but changing it is not allowed.
-
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
@@ -20121,7 +20288,6 @@ GNU Free Documentation License
Page" means the text near the most prominent appearance of the
work's title, preceding the beginning of the body of the text.
-
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either
@@ -20138,7 +20304,6 @@ GNU Free Documentation License
You may also lend copies, under the same conditions stated above,
and you may publicly display copies.
-
3. COPYING IN QUANTITY
If you publish printed copies of the Document numbering more than
@@ -20179,7 +20344,6 @@ GNU Free Documentation License
copies, to give them a chance to provide you with an updated
version of the Document.
-
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document
@@ -20285,7 +20449,6 @@ GNU Free Documentation License
License give permission to use their names for publicity for or to
assert or imply endorsement of any Modified Version.
-
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under
@@ -20311,7 +20474,6 @@ GNU Free Documentation License
"Acknowledgements", and any sections entitled "Dedications". You
must delete all sections entitled "Endorsements."
-
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other
@@ -20327,7 +20489,6 @@ GNU Free Documentation License
this License in all other respects regarding verbatim copying of
that document.
-
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other
@@ -20347,7 +20508,6 @@ GNU Free Documentation License
aggregate. Otherwise they must appear on covers around the whole
aggregate.
-
8. TRANSLATION
Translation is considered a kind of modification, so you may
@@ -20361,7 +20521,6 @@ GNU Free Documentation License
disagreement between the translation and the original English
version of this License, the original English version will prevail.
-
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document
@@ -20372,7 +20531,6 @@ GNU Free Documentation License
from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
-
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of
@@ -20426,46 +20584,76 @@ Index
* Menu:
+* ! (exclamation point), ! operator: Boolean Ops.
+* ! (exclamation point), ! operator <1>: Egrep Program.
+* ! (exclamation point), ! operator: Precedence.
+* ! (exclamation point), != operator <1>: Precedence.
+* ! (exclamation point), != operator: Typing and Comparison.
+* ! (exclamation point), !~ operator <1>: Expression Patterns.
+* ! (exclamation point), !~ operator <2>: Precedence.
+* ! (exclamation point), !~ operator <3>: Typing and Comparison.
+* ! (exclamation point), !~ operator <4>: Regexp Constants.
+* ! (exclamation point), !~ operator <5>: Computed Regexps.
+* ! (exclamation point), !~ operator <6>: Case-sensitivity.
+* ! (exclamation point), !~ operator: Regexp Usage.
* ! operator <1>: Egrep Program.
-* ! operator <2>: Ranges.
-* ! operator <3>: Precedence.
-* ! operator: Boolean Ops.
-* != operator <1>: Precedence.
-* != operator: Typing and Comparison.
-* !~ operator <1>: Precedence.
-* !~ operator <2>: Typing and Comparison.
-* !~ operator <3>: Regexp Constants.
-* !~ operator <4>: Computed Regexps.
-* !~ operator <5>: Case-sensitivity.
-* !~ operator: Regexp Usage.
-* # (comment): Comments.
-* #! (executable scripts): Executable Scripts.
-* $ field operator <1>: Precedence.
+* ! operator: Ranges.
+* " (double quote) <1>: Quoting.
+* " (double quote): Read Terminal.
+* " (double quote), regexp constants: Computed Regexps.
+* # (number sign), #! (executable scripts): Executable Scripts.
+* # (number sign), #! (executable scripts), portability issues with: Executable Scripts.
+* # (number sign), commenting: Comments.
+* $ (dollar sign): Regexp Operators.
+* $ (dollar sign), $ field operator <1>: Precedence.
+* $ (dollar sign), $ field operator: Fields.
+* $ (dollar sign), incrementing fields and arrays: Increment Ops.
* $ field operator: Fields.
-* % operator: Precedence.
-* %= operator <1>: Precedence.
-* %= operator: Assignment Ops.
-* && operator <1>: Precedence.
-* && operator: Boolean Ops.
-* * operator: Precedence.
-* ** operator: Precedence.
-* **= operator <1>: Precedence.
-* **= operator: Assignment Ops.
-* *= operator <1>: Precedence.
-* *= operator: Assignment Ops.
-* + operator: Precedence.
-* ++ operator <1>: Precedence.
-* ++ operator: Increment Ops.
-* += operator <1>: Precedence.
-* += operator: Assignment Ops.
-* - operator: Precedence.
-* -- operator <1>: Precedence.
-* -- operator: Increment Ops.
+* % (percent sign), % operator: Precedence.
+* % (percent sign), %= operator <1>: Precedence.
+* % (percent sign), %= operator: Assignment Ops.
+* & (ampersand), && operator <1>: Precedence.
+* & (ampersand), && operator: Boolean Ops.
+* & (ampersand), gsub/gensub/sub functions and: Gory Details.
+* ' (single quote) <1>: Quoting.
+* ' (single quote) <2>: Long.
+* ' (single quote): One-shot.
+* ' (single quote), vs. apostrophe: Comments.
+* ' (single quote), with double quotes: Quoting.
+* () (parentheses): Regexp Operators.
+* () (parentheses), pgawk program: Profiling.
+* * (asterisk), * operator, as multiplication operator: Precedence.
+* * (asterisk), * operator, as regexp operator: Regexp Operators.
+* * (asterisk), * operator, null strings, matching: Gory Details.
+* * (asterisk), ** operator <1>: Options.
+* * (asterisk), ** operator <2>: Precedence.
+* * (asterisk), ** operator: Arithmetic Ops.
+* * (asterisk), **= operator <1>: Options.
+* * (asterisk), **= operator <2>: Precedence.
+* * (asterisk), **= operator: Assignment Ops.
+* * (asterisk), *= operator <1>: Precedence.
+* * (asterisk), *= operator: Assignment Ops.
+* + (plus sign): Regexp Operators.
+* + (plus sign), + operator: Precedence.
+* + (plus sign), ++ operator <1>: Precedence.
+* + (plus sign), ++ operator: Increment Ops.
+* + (plus sign), += operator <1>: Precedence.
+* + (plus sign), += operator: Assignment Ops.
+* + (plus sign), decrement/increment operators: Increment Ops.
+* , (comma), in range patterns: Ranges.
+* - (hyphen), - operator: Precedence.
+* - (hyphen), -- (decrement/increment) operator: Precedence.
+* - (hyphen), -- operator: Increment Ops.
+* - (hyphen), -= operator <1>: Precedence.
+* - (hyphen), -= operator: Assignment Ops.
+* - (hyphen), filenames beginning with: Options.
+* - (hyphen), in character lists: Character Lists.
* --assign option: Options.
* --compat option: Options.
* --copyleft option: Options.
* --copyright option: Options.
* --disable-nls configuration option: Additional Configuration Options.
+* --dump-variables option <1>: Library Names.
* --dump-variables option: Options.
* --enable-portals configuration option <1>: Additional Configuration Options.
* --enable-portals configuration option: Portal Files.
@@ -20474,234 +20662,369 @@ Index
* --gen-po option <1>: Options.
* --gen-po option: String Extraction.
* --help option: Options.
-* --lint option: Options.
+* --lint option <1>: Options.
+* --lint option: Command Line.
* --lint-old option: Options.
* --non-decimal-data option <1>: Options.
-* --non-decimal-data option: Non-decimal Data.
+* --non-decimal-data option: Nondecimal Data.
+* --non-decimal-data option, strtonum function and: Nondecimal Data.
* --posix option: Options.
-* --profile option: Options.
+* --posix option, --traditional option and: Options.
+* --profile option <1>: Options.
+* --profile option: Profiling.
* --re-interval option: Options.
* --source option: Options.
* --traditional option: Options.
+* --traditional option, --posix option and: Options.
* --usage option: Options.
* --version option: Options.
* --with-included-gettext configuration option <1>: Additional Configuration Options.
* --with-included-gettext configuration option: Gawk I18N.
-* -= operator <1>: Precedence.
-* -= operator: Assignment Ops.
+* --with-included-gettext configuration option, configuring gawk with: Additional Configuration Options.
* -f option: Options.
* -F option <1>: Options.
* -F option: Command Line Field Separator.
* -f option: Long.
-* -mf option: Options.
-* -mr option: Options.
+* -F option, -Ft sets FS to TAB: Options.
+* -f option, on command line: Options.
+* -F option, troubleshooting: Known Bugs.
+* -mf/-mr options: Options.
* -v option: Options.
+* -v option, variables, assigning: Assignment Options.
* -W option: Options.
-* / operator: Precedence.
-* /= operator <1>: Precedence.
-* /= operator: Assignment Ops.
+* . (period): Regexp Operators.
+* .mo files: Explaining gettext.
+* .mo files, converting from .po: I18N Example.
+* .mo files, specifying directory of <1>: Programmer i18n.
+* .mo files, specifying directory of: Explaining gettext.
+* .po files <1>: Translator i18n.
+* .po files: Explaining gettext.
+* .po files, converting to .mo: I18N Example.
+* / (forward slash): Regexp.
+* / (forward slash), / operator: Precedence.
+* / (forward slash), /= operator <1>: Precedence.
+* / (forward slash), /= operator: Assignment Ops.
+* / (forward slash), /= operator, vs. /=.../ regexp constant: Assignment Ops.
+* / (forward slash), patterns and: Expression Patterns.
* /= operator vs. /=.../ regexp constant: Assignment Ops.
-* /dev/fd special files: Special FD.
-* /dev/pgrpid special file: Special Process.
-* /dev/pid special file: Special Process.
-* /dev/ppid special file: Special Process.
-* /dev/stderr special file: Special FD.
-* /dev/stdin special file: Special FD.
-* /dev/stdout special file: Special FD.
-* /dev/user special file: Special Process.
-* /inet special files: TCP/IP Networking.
-* /p special files: Portal Files.
-* < I/O operator: Getline/File.
-* < operator <1>: Precedence.
-* < operator: Typing and Comparison.
-* <= operator <1>: Precedence.
-* <= operator: Typing and Comparison.
-* = operator: Assignment Ops.
-* == operator <1>: Precedence.
-* == operator: Typing and Comparison.
-* > I/O operator: Redirection.
-* > operator <1>: Precedence.
-* > operator: Typing and Comparison.
-* >= operator <1>: Precedence.
-* >= operator: Typing and Comparison.
-* >> I/O operator <1>: Precedence.
-* >> I/O operator: Redirection.
-* ?: operator: Precedence.
-* \" escape sequence: Escape Sequences.
-* \' regexp operator: GNU Regexp Operators.
-* \/ escape sequence: Escape Sequences.
-* \< regexp operator: GNU Regexp Operators.
-* \> regexp operator: GNU Regexp Operators.
-* \` regexp operator: GNU Regexp Operators.
-* \a escape sequence: Escape Sequences.
-* \b escape sequence: Escape Sequences.
-* \B regexp operator: GNU Regexp Operators.
-* \f escape sequence: Escape Sequences.
-* \n escape sequence: Escape Sequences.
-* \NNN escape sequence (octal): Escape Sequences.
-* \r escape sequence: Escape Sequences.
-* \t escape sequence: Escape Sequences.
-* \v escape sequence: Escape Sequences.
-* \W regexp operator: GNU Regexp Operators.
-* \w regexp operator: GNU Regexp Operators.
-* \x escape sequence: Escape Sequences.
-* \y regexp operator: GNU Regexp Operators.
-* ^ operator: Precedence.
-* ^= operator <1>: Precedence.
-* ^= operator: Assignment Ops.
-* _ C macro (gettext): Explaining gettext.
+* /dev/... special files (gawk): Special FD.
+* /inet/ files (gawk): TCP/IP Networking.
+* /p files (gawk): Portal Files.
+* ; (semicolon): Statements/Lines.
+* ; (semicolon), AWKPATH variable and: PC Using.
+* ; (semicolon), separating statements in actions <1>: Statements.
+* ; (semicolon), separating statements in actions: Action Overview.
+* < (left angle bracket), < operator <1>: Precedence.
+* < (left angle bracket), < operator: Typing and Comparison.
+* < (left angle bracket), < operator (I/O): Getline/File.
+* < (left angle bracket), <= operator <1>: Precedence.
+* < (left angle bracket), <= operator: Typing and Comparison.
+* = (equals sign), = operator: Assignment Ops.
+* = (equals sign), == operator <1>: Precedence.
+* = (equals sign), == operator: Typing and Comparison.
+* > (right angle bracket), > operator <1>: Precedence.
+* > (right angle bracket), > operator: Typing and Comparison.
+* > (right angle bracket), > operator (I/O): Redirection.
+* > (right angle bracket), >= operator <1>: Precedence.
+* > (right angle bracket), >= operator: Typing and Comparison.
+* > (right angle bracket), >> operator (I/O) <1>: Precedence.
+* > (right angle bracket), >> operator (I/O): Redirection.
+* ? (question mark) <1>: GNU Regexp Operators.
+* ? (question mark): Regexp Operators.
+* ? (question mark), ?: operator: Precedence.
+* [] (square brackets): Regexp Operators.
+* \ (backslash) <1>: Regexp Operators.
+* \ (backslash) <2>: Quoting.
+* \ (backslash) <3>: Comments.
+* \ (backslash): Read Terminal.
+* \ (backslash), \" escape sequence: Escape Sequences.
+* \ (backslash), \' operator (gawk): GNU Regexp Operators.
+* \ (backslash), \/ escape sequence: Escape Sequences.
+* \ (backslash), \< operator (gawk): GNU Regexp Operators.
+* \ (backslash), \> operator (gawk): GNU Regexp Operators.
+* \ (backslash), \` operator (gawk): GNU Regexp Operators.
+* \ (backslash), \a escape sequence: Escape Sequences.
+* \ (backslash), \b escape sequence: Escape Sequences.
+* \ (backslash), \B operator (gawk): GNU Regexp Operators.
+* \ (backslash), \f escape sequence: Escape Sequences.
+* \ (backslash), \n escape sequence: Escape Sequences.
+* \ (backslash), \NNN escape sequence: Escape Sequences.
+* \ (backslash), \r escape sequence: Escape Sequences.
+* \ (backslash), \t escape sequence: Escape Sequences.
+* \ (backslash), \v escape sequence: Escape Sequences.
+* \ (backslash), \W operator (gawk): GNU Regexp Operators.
+* \ (backslash), \w operator (gawk): GNU Regexp Operators.
+* \ (backslash), \x escape sequence: Escape Sequences.
+* \ (backslash), \y operator (gawk): GNU Regexp Operators.
+* \ (backslash), as field separators: Command Line Field Separator.
+* \ (backslash), continuing lines and <1>: Egrep Program.
+* \ (backslash), continuing lines and: Statements/Lines.
+* \ (backslash), continuing lines and, comments and: Statements/Lines.
+* \ (backslash), continuing lines and, in csh <1>: Statements/Lines.
+* \ (backslash), continuing lines and, in csh: More Complex.
+* \ (backslash), gsub/gensub/sub functions and: Gory Details.
+* \ (backslash), in character lists: Character Lists.
+* \ (backslash), in escape sequences: Escape Sequences.
+* \ (backslash), in escape sequences, POSIX and: Escape Sequences.
+* \ (backslash), regexp constants: Computed Regexps.
+* ^ (caret) <1>: GNU Regexp Operators.
+* ^ (caret): Regexp Operators.
+* ^ (caret), ^ operator <1>: Options.
+* ^ (caret), ^ operator: Precedence.
+* ^ (caret), ^= operator <1>: Options.
+* ^ (caret), ^= operator <2>: Precedence.
+* ^ (caret), ^= operator: Assignment Ops.
+* ^ (caret), in character lists: Character Lists.
+* _ (underscore), _ C macro: Explaining gettext.
+* _ (underscore), in names of private variables: Library Names.
+* _ (underscore), translatable string: Programmer i18n.
* _gr_init user-defined function: Group Functions.
* _pw_init user-defined function: Passwd Functions.
* accessing fields: Fields.
* account information <1>: Group Functions.
* account information: Passwd Functions.
-* acronym: History.
-* action, curly braces: Action Overview.
-* action, default: Very Simple.
-* action, definition of: Action Overview.
-* action, empty: Very Simple.
-* action, separating statements: Action Overview.
-* adding new features: Adding Code.
-* addition: Arithmetic Ops.
-* advanced features: Advanced Features.
-* advanced notes <1>: I/O Functions.
-* advanced notes <2>: Gory Details.
-* advanced notes <3>: Auto-set.
-* advanced notes <4>: Increment Ops.
-* advanced notes <5>: Assignment Ops.
-* advanced notes <6>: Non-decimal-numbers.
-* advanced notes <7>: Close Files And Pipes.
-* advanced notes <8>: Redirection.
-* advanced notes <9>: Records.
-* advanced notes <10>: Computed Regexps.
-* advanced notes <11>: Escape Sequences.
-* advanced notes: Executable Scripts.
+* actions: Action Overview.
+* actions, control statements in: Statements.
+* actions, default: Very Simple.
+* actions, empty: Very Simple.
+* adding, features to gawk: Adding Code.
+* adding, fields: Changing Fields.
+* adding, functions to gawk: Dynamic Extensions.
+* advanced features, buffering: I/O Functions.
+* advanced features, close function: Close Files And Pipes.
+* advanced features, constants, values of: Nondecimal-numbers.
+* advanced features, data files as single record: Records.
+* advanced features, fixed-width data: Constant Size.
+* advanced features, FNR/NR variables: Auto-set.
+* advanced features, gawk: Advanced Features.
+* advanced features, gawk, BSD portals: Portal Files.
+* advanced features, gawk, network programming: TCP/IP Networking.
+* advanced features, gawk, nondecimal input data: Nondecimal Data.
+* advanced features, gawk, processes, communicating with: Two-way I/O.
+* advanced features, network connections, See Also networks, connections: Advanced Features.
+* advanced features, null strings, matching: Gory Details.
+* advanced features, operators, precedence: Increment Ops.
+* advanced features, piping into sh: Redirection.
+* advanced features, regexp constants: Assignment Ops.
* Aho, Alfred <1>: Contributors.
* Aho, Alfred: History.
-* AI programming, using gawk: Distribution contents.
+* alarm clock example program: Alarm Program.
* alarm.awk program: Alarm Program.
-* algorithm, definition of: Basic High Level.
+* algorithms: Basic High Level.
+* Alpha (DEC): Manual History.
* amazing awk assembler (aaa): Glossary.
* amazingly workable formatter (awf): Glossary.
* ambiguity, syntactic: /= operator vs. /=.../ regexp constant: Assignment Ops.
* amiga: Amiga Installation.
-* anchors in regexps: Regexp Operators.
+* ampersand (&), && operator: Boolean Ops.
+* ampersand (&), &&operator: Precedence.
+* ampersand (&), gsub/gensub/sub functions and: Gory Details.
* AND bitwise operation: Bitwise Functions.
-* and built-in function: Bitwise Functions.
-* AND logical operator: Boolean Ops.
-* anonymous ftp: Getting.
+* and Boolean-logic operator: Boolean Ops.
+* and function (gawk): Bitwise Functions.
* ANSI: Glossary.
-* applications of awk <1>: When.
-* applications of awk: Preface.
* archeologists: Bugs.
-* ARGC variable: Auto-set.
-* ARGIND variable <1>: Other Arguments.
+* ARGC/ARGV variables <1>: ARGC and ARGV.
+* ARGC/ARGV variables: Auto-set.
+* ARGC/ARGV variables, command-line arguments: Other Arguments.
+* ARGC/ARGV variables, portability and: Executable Scripts.
* ARGIND variable: Auto-set.
-* argument processing: Getopt Function.
-* arguments in function call: Function Calls.
-* arguments, command-line: Command Line.
-* ARGV variable <1>: Other Arguments.
-* ARGV variable: Auto-set.
+* ARGIND variable, command-line arguments: Other Arguments.
+* arguments, command-line <1>: Other Arguments.
+* arguments, command-line <2>: ARGC and ARGV.
+* arguments, command-line: Auto-set.
+* arguments, command-line, invoking awk: Command Line.
+* arguments, in function calls: Function Calls.
+* arguments, processing: Getopt Function.
+* arguments, retrieving: Internals.
* arithmetic operators: Arithmetic Ops.
-* array assignment: Assigning Elements.
-* array reference: Reference to Elements.
-* arrays: Array Intro.
+* arrays: Arrays.
+* arrays, as parameters to functions: Function Caveats.
* arrays, associative: Array Intro.
-* arrays, definition of: Array Intro.
-* arrays, deleting an element: Delete.
+* arrays, associative, clearing: Internals.
+* arrays, associative, library functions and: Library Names.
* arrays, deleting entire contents: Delete.
-* arrays, multidimensional subscripts: Multi-dimensional.
-* arrays, presence of elements: Reference to Elements.
+* arrays, elements, assigning: Assigning Elements.
+* arrays, elements, deleting: Delete.
+* arrays, elements, installing: Internals.
+* arrays, elements, order of: Scanning an Array.
+* arrays, elements, referencing: Reference to Elements.
+* arrays, elements, retrieving number of: String Functions.
+* arrays, for statement and: Scanning an Array.
+* arrays, IGNORECASE variable and: Array Intro.
+* arrays, indexing: Array Intro.
+* arrays, merging into strings: Join Function.
+* arrays, multidimensional: Multi-dimensional.
+* arrays, multidimensional, scanning: Multi-scanning.
+* arrays, names of: Arrays.
+* arrays, scanning: Scanning an Array.
* arrays, sorting: Array Sorting.
-* arrays, sorting and IGNORECASE: Array Sorting.
+* arrays, sorting, IGNORECASE variable and: Array Sorting.
* arrays, sparse: Array Intro.
-* arrays, special for statement: Scanning an Array.
-* arrays, subscripts, and IGNORECASE: Array Intro.
-* arrays, subscripts, uninitialized variables: Uninitialized Subscripts.
-* arrays, the in operator: Reference to Elements.
-* artificial intelligence, using gawk: Distribution contents.
+* arrays, subscripts: Numeric Array Subscripts.
+* arrays, subscripts, uninitialized variables as: Uninitialized Subscripts.
+* artificial intelligence, gawk and: Distribution contents.
* ASCII: Ordinal Functions.
-* asort built-in function <1>: String Functions.
-* asort built-in function: Array Sorting.
-* assert C library function: Assert Function.
+* asort function (gawk) <1>: String Functions.
+* asort function (gawk): Array Sorting.
+* asort function (gawk), arrays, sorting: Array Sorting.
+* assert function (C library): Assert Function.
* assert user-defined function: Assert Function.
* assertions: Assert Function.
* assignment operators: Assignment Ops.
-* assignment to fields: Changing Fields.
+* assignment operators, evaluation order: Assignment Ops.
+* assignment operators, lvalues/rvalues: Assignment Ops.
+* assignments as filenames: Ignoring Assigns.
* assoc_clear internal function: Internals.
* assoc_lookup internal function: Internals.
* associative arrays: Array Intro.
-* atan2 built-in function: Numeric Functions.
+* asterisk (*), * operator, as multiplication operator: Precedence.
+* asterisk (*), * operator, as regexp operator: Regexp Operators.
+* asterisk (*), * operator, null strings, matching: Gory Details.
+* asterisk (*), ** operator <1>: Options.
+* asterisk (*), ** operator <2>: Precedence.
+* asterisk (*), ** operator: Arithmetic Ops.
+* asterisk (*), **= operator <1>: Options.
+* asterisk (*), **= operator <2>: Precedence.
+* asterisk (*), **= operator: Assignment Ops.
+* asterisk (*), *= operator <1>: Precedence.
+* asterisk (*), *= operator: Assignment Ops.
+* atan2 function: Numeric Functions.
* atari: Atari Installation.
-* automatic initialization: More Complex.
-* automatic warnings <1>: Options.
-* automatic warnings <2>: I/O Functions.
-* automatic warnings <3>: String Functions.
-* automatic warnings <4>: Using Constant Regexps.
-* automatic warnings <5>: Special Caveats.
-* automatic warnings <6>: Special Process.
-* automatic warnings: Escape Sequences.
* awf (amazingly workable formatter) program: Glossary.
-* awk language, POSIX version <1>: Definition Syntax.
-* awk language, POSIX version <2>: Gory Details.
-* awk language, POSIX version <3>: String Functions.
-* awk language, POSIX version <4>: User-modified.
-* awk language, POSIX version <5>: Next Statement.
-* awk language, POSIX version <6>: Continue Statement.
-* awk language, POSIX version <7>: Break Statement.
-* awk language, POSIX version <8>: Precedence.
-* awk language, POSIX version <9>: Assignment Ops.
-* awk language, POSIX version <10>: Arithmetic Ops.
-* awk language, POSIX version <11>: Conversion.
-* awk language, POSIX version <12>: Format Modifiers.
-* awk language, POSIX version <13>: OFMT.
-* awk language, POSIX version <14>: Field Splitting Summary.
-* awk language, POSIX version <15>: Character Lists.
-* awk language, POSIX version <16>: Regexp Operators.
-* awk language, POSIX version: Escape Sequences.
-* awk language, V.4 version <1>: SVR4.
-* awk language, V.4 version: Escape Sequences.
-* awka compiler for awk programs: Other Versions.
-* awka, source code: Other Versions.
+* awk language, POSIX version: Assignment Ops.
+* awk programs <1>: Two Rules.
+* awk programs <2>: Executable Scripts.
+* awk programs: Getting Started.
+* awk programs, complex: When.
+* awk programs, documenting <1>: Library Names.
+* awk programs, documenting: Comments.
+* awk programs, examples of: Sample Programs.
+* awk programs, execution of: Next Statement.
+* awk programs, internationalizing <1>: Programmer i18n.
+* awk programs, internationalizing: I18N Functions.
+* awk programs, lengthy: Long.
+* awk programs, lengthy, assertions: Assert Function.
+* awk programs, location of: Options.
+* awk programs, one-line examples: Very Simple.
+* awk programs, profiling: Profiling.
+* awk programs, profiling, enabling: Options.
+* awk programs, running <1>: Long.
+* awk programs, running: Running gawk.
+* awk programs, running, from shell scripts: One-shot.
+* awk programs, running, without input files: Read Terminal.
+* awk programs, shell variables in: Using Shell Variables.
+* awk, function of: Getting Started.
+* awk, gawk and <1>: This Manual.
+* awk, gawk and: Preface.
+* awk, history of: History.
+* awk, implementation issues, pipes: Redirection.
+* awk, implementations: Other Versions.
+* awk, implementations, limits: Getline Notes.
+* awk, invoking: Command Line.
+* awk, new vs. old: Names.
+* awk, new vs. old, OFMT variable: Conversion.
+* awk, POSIX and: Preface.
+* awk, POSIX and, See Also POSIX awk: Preface.
+* awk, regexp constants and: Typing and Comparison.
+* awk, See Also gawk: Preface.
+* awk, terms describing: This Manual.
+* awk, uses for <1>: When.
+* awk, uses for <2>: Getting Started.
+* awk, uses for: Preface.
+* awk, versions of <1>: V7/SVR3.1.
+* awk, versions of: Names.
+* awk, versions of, changes between SVR3.1 and SVR4: SVR4.
+* awk, versions of, changes between SVR4 and POSIX awk: POSIX.
+* awk, versions of, changes between V7 and SVR3.1: V7/SVR3.1.
+* awk, versions of, See Also Bell Laboratories awk: BTL.
+* awk.h file (internal): Internals.
+* awka compiler for awk: Other Versions.
* AWKNUM internal type: Internals.
+* AWKPATH environment variable <1>: PC Using.
* AWKPATH environment variable: AWKPATH Variable.
-* awkprof.out profiling output file: Profiling.
+* awkprof.out file: Profiling.
* awksed.awk program: Simple Sed.
-* awkvars.out global variable list output file: Options.
-* backslash continuation <1>: Egrep Program.
-* backslash continuation: Statements/Lines.
-* backslash continuation, and comments: Statements/Lines.
-* backslash continuation, in csh <1>: Statements/Lines.
-* backslash continuation, in csh: More Complex.
-* basic function of awk: Getting Started.
-* basic programming concepts: Basic Concepts.
+* awkvars.out file: Options.
+* backslash (\) <1>: Regexp Operators.
+* backslash (\) <2>: Quoting.
+* backslash (\) <3>: Comments.
+* backslash (\): Read Terminal.
+* backslash (\), \" escape sequence: Escape Sequences.
+* backslash (\), \' operator (gawk): GNU Regexp Operators.
+* backslash (\), \/ escape sequence: Escape Sequences.
+* backslash (\), \< operator (gawk): GNU Regexp Operators.
+* backslash (\), \> operator (gawk): GNU Regexp Operators.
+* backslash (\), \` operator (gawk): GNU Regexp Operators.
+* backslash (\), \a escape sequence: Escape Sequences.
+* backslash (\), \b escape sequence: Escape Sequences.
+* backslash (\), \B operator (gawk): GNU Regexp Operators.
+* backslash (\), \f escape sequence: Escape Sequences.
+* backslash (\), \n escape sequence: Escape Sequences.
+* backslash (\), \NNN escape sequence: Escape Sequences.
+* backslash (\), \r escape sequence: Escape Sequences.
+* backslash (\), \t escape sequence: Escape Sequences.
+* backslash (\), \v escape sequence: Escape Sequences.
+* backslash (\), \W operator (gawk): GNU Regexp Operators.
+* backslash (\), \w operator (gawk): GNU Regexp Operators.
+* backslash (\), \x escape sequence: Escape Sequences.
+* backslash (\), \y operator (gawk): GNU Regexp Operators.
+* backslash (\), as field separators: Command Line Field Separator.
+* backslash (\), continuing lines and <1>: Egrep Program.
+* backslash (\), continuing lines and: Statements/Lines.
+* backslash (\), continuing lines and, comments and: Statements/Lines.
+* backslash (\), continuing lines and, in csh <1>: Statements/Lines.
+* backslash (\), continuing lines and, in csh: More Complex.
+* backslash (\), gsub/gensub/sub functions and: Gory Details.
+* backslash (\), in character lists: Character Lists.
+* backslash (\), in escape sequences: Escape Sequences.
+* backslash (\), in escape sequences, POSIX and: Escape Sequences.
+* backslash (\), regexp constants: Computed Regexps.
* BBS-list file: Sample Data Files.
* Beebe, Nelson: Acknowledgments.
-* BEGIN special pattern: BEGIN/END.
+* BEGIN pattern <1>: BEGIN/END.
+* BEGIN pattern <2>: Field Separators.
+* BEGIN pattern: Records.
+* BEGIN pattern, assert user-defined function and: Assert Function.
+* BEGIN pattern, Boolean patterns and: Expression Patterns.
+* BEGIN pattern, exit statement and: Exit Statement.
+* BEGIN pattern, getline and: Getline Notes.
+* BEGIN pattern, headings, adding: Print Examples.
+* BEGIN pattern, next/nextfile statements and <1>: Next Statement.
+* BEGIN pattern, next/nextfile statements and: I/O And BEGIN/END.
+* BEGIN pattern, OFS/ORS variables, assigning values to: Output Separators.
+* BEGIN pattern, operators and: Using BEGIN/END.
+* BEGIN pattern, pgawk program: Profiling.
+* BEGIN pattern, print statement and: I/O And BEGIN/END.
+* BEGIN pattern, pwcat program: Passwd Functions.
+* BEGIN pattern, running awk programs and: Cut Program.
+* BEGIN pattern, TEXTDOMAIN variable and: Programmer i18n.
* beginfile user-defined function: Filetrans Function.
+* Bell Laboratories awk extensions: BTL.
* BeOS: BeOS Installation.
* Berry, Karl: Acknowledgments.
-* binary I/O: User-modified.
-* bindtextdomain built-in function <1>: Programmer i18n.
-* bindtextdomain built-in function: I18N Functions.
-* bindtextdomain C library function: Explaining gettext.
-* bindtextdomain user-defined function: I18N Portability.
+* binary input/output: User-modified.
+* bindtextdomain function (C library): Explaining gettext.
+* bindtextdomain function (gawk) <1>: Programmer i18n.
+* bindtextdomain function (gawk): I18N Functions.
+* bindtextdomain function (gawk), portability and: I18N Portability.
* BINMODE variable <1>: PC Using.
* BINMODE variable: User-modified.
* bits2str user-defined function: Bitwise Functions.
-* bitwise complement: Bitwise Functions.
-* bitwise operations: Bitwise Functions.
-* bitwise shift: Bitwise Functions.
-* blocks, BEGIN and END <1>: Profiling.
-* blocks, BEGIN and END: BEGIN/END.
-* body of a loop: While Statement.
-* book, using this: This Manual.
-* boolean expressions: Boolean Ops.
-* boolean operators: Boolean Ops.
-* bracket expression: Regexp Operators.
-* Brandon, Dick: This Manual.
+* bitwise, complement: Bitwise Functions.
+* bitwise, operations: Bitwise Functions.
+* bitwise, shift: Bitwise Functions.
+* body, in actions: Statements.
+* body, in loops: While Statement.
+* Boolean expressions: Boolean Ops.
+* Boolean expressions, as patterns: Expression Patterns.
+* Boolean operators, See Boolean expressions: Boolean Ops.
+* Bourne shell, quoting rules for: Quoting.
+* braces ({}), actions and: Action Overview.
+* braces ({}), pgawk program: Profiling.
+* braces ({}), statements, grouping: Statements.
+* bracket expressions, See character lists: Regexp Operators.
* break statement: Break Statement.
-* break, outside of loops: Break Statement.
* Brennan, Michael <1>: Other Versions.
* Brennan, Michael <2>: Simple Sed.
* Brennan, Michael <3>: Two-way I/O.
@@ -20710,540 +21033,721 @@ Index
* Brown, Martin <1>: Bugs.
* Brown, Martin <2>: Contributors.
* Brown, Martin: Acknowledgments.
-* BSD portal files: Portal Files.
-* BSD-based operating systems <1>: Glossary.
-* BSD-based operating systems <2>: Portal Files.
-* BSD-based operating systems: Manual History.
-* buffer matching operators: GNU Regexp Operators.
-* buffering output: I/O Functions.
-* buffering, interactive vs. non-interactive: I/O Functions.
-* buffering, non-interactive vs. interactive: I/O Functions.
+* BSD portals: Portal Files.
+* BSD-based operating systems: Glossary.
+* Buening, Andreas <1>: Contributors.
+* Buening, Andreas: Acknowledgments.
+* buffering, input/output <1>: Two-way I/O.
+* buffering, input/output: I/O Functions.
+* buffering, interactive vs. noninteractive: I/O Functions.
* buffers, flushing: I/O Functions.
-* bug reports: Bugs.
+* buffers, operators for: GNU Regexp Operators.
* bug reports, email address, bug-gawk@gnu.org: Bugs.
* bug-gawk@gnu.org bug reporting address: Bugs.
-* bugs, known in gawk: Known Bugs.
-* built-in functions: Built-in.
+* built-in functions: Functions.
+* built-in functions, evaluation order: Calling Built-in.
* built-in variables: Built-in Variables.
-* built-in variables, convey information: Auto-set.
-* built-in variables, user modifiable: User-modified.
+* built-in variables, -v option, setting with: Options.
+* built-in variables, conveying information: Auto-set.
+* built-in variables, user-modifiable: User-modified.
* call by reference: Function Caveats.
* call by value: Function Caveats.
-* calling a function <1>: Function Caveats.
-* calling a function: Function Calls.
-* case conversion: String Functions.
-* case sensitivity: Case-sensitivity.
-* changing contents of a field: Changing Fields.
-* changing the record separator: Records.
-* character class <1>: Character Lists.
-* character class: Regexp Operators.
+* caret (^) <1>: GNU Regexp Operators.
+* caret (^): Regexp Operators.
+* caret (^), ^ operator <1>: Options.
+* caret (^), ^ operator: Precedence.
+* caret (^), ^= operator <1>: Options.
+* caret (^), ^= operator <2>: Precedence.
+* caret (^), ^= operator: Assignment Ops.
+* caret (^), in character lists: Character Lists.
+* case sensitivity, array indices and: Array Intro.
+* case sensitivity, converting case: String Functions.
+* case sensitivity, example programs: Library Functions.
+* case sensitivity, gawk: Case-sensitivity.
+* case sensitivity, regexps and <1>: User-modified.
+* case sensitivity, regexps and: Case-sensitivity.
+* case sensitivity, string comparisons and: User-modified.
* character encodings: Ordinal Functions.
-* character list: Regexp Operators.
-* character list, complemented: Regexp Operators.
-* character set (regexp component): Regexp Operators.
-* character sets (machine character encodings) <1>: Glossary.
-* character sets (machine character encodings): Ordinal Functions.
+* character lists <1>: Character Lists.
+* character lists: Regexp Operators.
+* character lists, character classes: Character Lists.
+* character lists, collating elements: Character Lists.
+* character lists, collating symbols: Character Lists.
+* character lists, complemented: Regexp Operators.
+* character lists, equivalence classes: Character Lists.
+* character lists, non-ASCII: Character Lists.
+* character lists, range expressions: Character Lists.
+* character sets: Ordinal Functions.
+* character sets (machine character encodings): Glossary.
+* character sets, See Also character lists: Regexp Operators.
+* characters, counting: Wc Program.
+* characters, transliterating: Translate Program.
+* characters, values of as numbers: Ordinal Functions.
* Chassell, Robert J.: Acknowledgments.
+* chdir function, implementing in gawk: Sample Library.
* chem utility: Glossary.
* chr user-defined function: Ordinal Functions.
* Cliff random numbers: Cliff Random Function.
* cliff_rand user-defined function: Cliff Random Function.
-* close built-in function <1>: I/O Functions.
-* close built-in function: Close Files And Pipes.
+* close function <1>: I/O Functions.
+* close function <2>: Close Files And Pipes.
+* close function <3>: Getline/Pipe.
+* close function: Getline/Variable/File.
+* close function, return values: Close Files And Pipes.
+* close function, two-way pipes and: Two-way I/O.
* Close, Diane <1>: Contributors.
* Close, Diane: Manual History.
-* close, return value: Close Files And Pipes.
-* closing coprocesses: Close Files And Pipes.
-* closing input files and pipes: Close Files And Pipes.
-* closing output files and pipes: Close Files And Pipes.
-* coding style used in gawk: Adding Code.
* collating elements: Character Lists.
* collating symbols: Character Lists.
-* comma operator, not supported: For Statement.
-* command line: Command Line.
-* command line, setting FS on: Command Line Field Separator.
-* command-line formats: Running gawk.
-* command-line option, --assign: Options.
-* command-line option, --compat: Options.
-* command-line option, --copyleft: Options.
-* command-line option, --copyright: Options.
-* command-line option, --dump-variables: Options.
-* command-line option, --field-separator: Options.
-* command-line option, --file: Options.
-* command-line option, --gen-po <1>: Options.
-* command-line option, --gen-po: String Extraction.
-* command-line option, --help: Options.
-* command-line option, --lint: Options.
-* command-line option, --lint-old: Options.
-* command-line option, --non-decimal-data <1>: Options.
-* command-line option, --non-decimal-data: Non-decimal Data.
-* command-line option, --posix: Options.
-* command-line option, --profile: Options.
-* command-line option, --re-interval: Options.
-* command-line option, --source: Options.
-* command-line option, --traditional: Options.
-* command-line option, --usage: Options.
-* command-line option, --version: Options.
-* command-line option, -f: Options.
-* command-line option, -F <1>: Options.
-* command-line option, -F: Command Line Field Separator.
-* command-line option, -f: Long.
-* command-line option, -mf: Options.
-* command-line option, -mr: Options.
-* command-line option, -v: Options.
-* command-line option, -W: Options.
-* comments: Comments.
-* comments and backslash continuation: Statements/Lines.
-* common mistakes <1>: Options.
-* common mistakes <2>: String Functions.
-* common mistakes <3>: Typing and Comparison.
-* common mistakes <4>: Concatenation.
-* common mistakes <5>: Arithmetic Ops.
-* common mistakes <6>: Special FD.
-* common mistakes <7>: Redirection.
-* common mistakes <8>: Print Examples.
-* common mistakes <9>: Field Separators.
-* common mistakes <10>: Computed Regexps.
-* common mistakes: Escape Sequences.
-* comp.lang.awk Usenet news group: Bugs.
+* columns, aligning: Print Examples.
+* columns, cutting: Cut Program.
+* comma (,), in range patterns: Ranges.
+* command line, arguments <1>: Other Arguments.
+* command line, arguments <2>: ARGC and ARGV.
+* command line, arguments: Auto-set.
+* command line, formats: Running gawk.
+* command line, FS on, setting: Command Line Field Separator.
+* command line, invoking awk from: Command Line.
+* command line, options <1>: Options.
+* command line, options <2>: Command Line Field Separator.
+* command line, options: Long.
+* command line, options, end of: Options.
+* command line, variables, assigning on: Assignment Options.
+* command-line options, processing: Getopt Function.
+* command-line options, string extraction: String Extraction.
+* commenting: Comments.
+* commenting, backslash continuation and: Statements/Lines.
+* comp.lang.awk newsgroup: Bugs.
* comparison expressions: Typing and Comparison.
-* comparisons, string vs. regexp: Typing and Comparison.
-* compatibility mode <1>: POSIX/GNU.
-* compatibility mode: Options.
+* comparison expressions, as patterns: Expression Patterns.
+* comparison expressions, string vs. regexp: Typing and Comparison.
+* compatibility mode (gawk), extensions: POSIX/GNU.
+* compatibility mode (gawk), file names: Special Caveats.
+* compatibility mode (gawk), hexadecimal numbers: Nondecimal-numbers.
+* compatibility mode (gawk), octal numbers: Nondecimal-numbers.
+* compatibility mode (gawk), specifying: Options.
* compiled programs <1>: Glossary.
* compiled programs: Basic High Level.
-* compl built-in function: Bitwise Functions.
+* compl function (gawk): Bitwise Functions.
* complement, bitwise: Bitwise Functions.
-* complemented character list: Regexp Operators.
-* compound statement: Statements.
-* computed regular expressions: Computed Regexps.
-* concatenation: Concatenation.
-* concatenation evaluation order: Concatenation.
-* conditional expression: Conditional Exp.
+* compound statements, control statements and: Statements.
+* concatenating: Concatenation.
+* conditional expressions: Conditional Exp.
* configuration option, --disable-nls: Additional Configuration Options.
-* configuration option, --enable-portals <1>: Additional Configuration Options.
-* configuration option, --enable-portals: Portal Files.
+* configuration option, --enable-portals: Additional Configuration Options.
* configuration option, --with-included-gettext <1>: Additional Configuration Options.
* configuration option, --with-included-gettext: Gawk I18N.
-* configuring gawk: Configuration Philosophy.
+* configuration options, gawk: Additional Configuration Options.
+* constants, nondecimal: Nondecimal Data.
* constants, types of: Constants.
-* continuation of lines: Statements/Lines.
* continue statement: Continue Statement.
-* continue, outside of loops: Continue Statement.
-* contributors to gawk: Contributors.
-* control statement: Statements.
-* conventions, programming <1>: Internal File Ops.
-* conventions, programming <2>: Nextfile Function.
-* conventions, programming <3>: Library Names.
-* conventions, programming <4>: Non-decimal Data.
-* conventions, programming <5>: Return Statement.
-* conventions, programming <6>: Definition Syntax.
-* conventions, programming <7>: Calling Built-in.
-* conventions, programming <8>: Auto-set.
-* conventions, programming: Exit Statement.
-* conversion of case: String Functions.
-* conversion of strings and numbers: Conversion.
-* conversions, during subscripting: Numeric Array Subscripts.
-* converting dates to timestamps: Time Functions.
-* CONVFMT variable <1>: Numeric Array Subscripts.
-* CONVFMT variable <2>: User-modified.
+* control statements: Statements.
+* converting, case: String Functions.
+* converting, dates to timestamps: Time Functions.
+* converting, during subscripting: Numeric Array Subscripts.
+* converting, numbers: Conversion.
+* converting, numbers, to strings: Bitwise Functions.
+* converting, strings to numbers: Conversion.
+* CONVFMT variable <1>: User-modified.
* CONVFMT variable: Conversion.
-* coprocess <1>: Two-way I/O.
-* coprocess <2>: Close Files And Pipes.
-* coprocess <3>: Redirection.
-* coprocess: Getline/Coprocess.
-* cos built-in function: Numeric Functions.
-* csh utility <1>: Options.
-* csh utility <2>: Two-way I/O.
-* csh utility <3>: Statements/Lines.
-* csh utility <4>: More Complex.
-* csh utility: Quoting.
-* csh, backslash continuation <1>: Statements/Lines.
-* csh, backslash continuation: More Complex.
-* curly braces: Action Overview.
-* custom.h configuration file: Configuration Philosophy.
+* CONVFMT variable, array subscripts and: Numeric Array Subscripts.
+* coprocesses <1>: Two-way I/O.
+* coprocesses: Redirection.
+* coprocesses, closing: Close Files And Pipes.
+* coprocesses, getline from: Getline/Coprocess.
+* cos function: Numeric Functions.
+* counting: Wc Program.
+* csh utility: Statements/Lines.
+* csh utility, backslash continuation and: More Complex.
+* csh utility, POSIXLY_CORRECT environment variable: Options.
+* csh utility, |& operator, comparison with: Two-way I/O.
+* ctime user-defined function: Function Example.
+* currency symbols, localization: Explaining gettext.
+* custom.h file: Configuration Philosophy.
* cut utility: Cut Program.
* cut.awk program: Cut Program.
-* d.c., see "dark corner": Conventions.
+* d.c., See dark corner: Conventions.
* dark corner <1>: Glossary.
-* dark corner <2>: Other Arguments.
-* dark corner <3>: Command Line.
-* dark corner <4>: String Functions.
-* dark corner <5>: Uninitialized Subscripts.
-* dark corner <6>: Auto-set.
-* dark corner <7>: Exit Statement.
-* dark corner <8>: Continue Statement.
-* dark corner <9>: Break Statement.
-* dark corner <10>: Truth Values.
-* dark corner <11>: Assignment Ops.
-* dark corner <12>: Conversion.
-* dark corner <13>: Assignment Options.
-* dark corner <14>: Using Constant Regexps.
-* dark corner <15>: Close Files And Pipes.
-* dark corner <16>: Format Modifiers.
-* dark corner <17>: Control Letters.
-* dark corner <18>: OFMT.
-* dark corner <19>: Getline Notes.
-* dark corner <20>: Multiple Line.
-* dark corner <21>: Field Splitting Summary.
-* dark corner <22>: Single Character Fields.
-* dark corner <23>: Changing Fields.
-* dark corner <24>: Records.
-* dark corner <25>: Escape Sequences.
+* dark corner <2>: Truth Values.
+* dark corner <3>: Assignment Ops.
+* dark corner <4>: Format Modifiers.
* dark corner: Conventions.
-* data files, non-readable, skipping: File Checking.
-* data files, readable, checking: File Checking.
-* data-driven languages <1>: Basic High Level.
-* data-driven languages: Getting Started.
+* dark corner, array subscripts: Uninitialized Subscripts.
+* dark corner, break statement: Break Statement.
+* dark corner, close function: Close Files And Pipes.
+* dark corner, command-line arguments: Assignment Options.
+* dark corner, continue statement: Continue Statement.
+* dark corner, CONVFMT variable: Conversion.
+* dark corner, escape sequences: Other Arguments.
+* dark corner, escape sequences, for metacharacters: Escape Sequences.
+* dark corner, exit statement: Exit Statement.
+* dark corner, field separators: Field Splitting Summary.
+* dark corner, FILENAME variable <1>: Auto-set.
+* dark corner, FILENAME variable: Getline Notes.
+* dark corner, FNR/NR variables: Auto-set.
+* dark corner, format-control characters: Control Letters.
+* dark corner, FS as null string: Single Character Fields.
+* dark corner, input files: Records.
+* dark corner, invoking awk: Command Line.
+* dark corner, multiline records: Multiple Line.
+* dark corner, NF variable, decrementing: Changing Fields.
+* dark corner, OFMT variable: OFMT.
+* dark corner, regexp constants: Using Constant Regexps.
+* dark corner, regexp constants, /= operator and: Assignment Ops.
+* dark corner, regexp constants, as arguments to user-defined functions: Using Constant Regexps.
+* dark corner, split function: String Functions.
+* dark corner, strings, storing: Records.
+* data, fixed-width: Constant Size.
+* data-driven languages: Basic High Level.
+* database, group, reading: Group Functions.
+* database, users, reading: Passwd Functions.
+* date utility, GNU: Time Functions.
+* date utility, POSIX: Time Functions.
* dates, converting to timestamps: Time Functions.
+* dates, information related to, localization: Explaining gettext.
* Davies, Stephen <1>: Bugs.
* Davies, Stephen: Contributors.
-* dcgettext built-in function <1>: Programmer i18n.
-* dcgettext built-in function: I18N Functions.
-* dcgettext user-defined function: I18N Portability.
-* deadlock: Two-way I/O.
+* dcgettext function (gawk) <1>: Programmer i18n.
+* dcgettext function (gawk): I18N Functions.
+* dcgettext function (gawk), portability and: I18N Portability.
+* dcngettext function (gawk) <1>: Programmer i18n.
+* dcngettext function (gawk): I18N Functions.
+* dcngettext function (gawk), portability and: I18N Portability.
+* deadlocks: Two-way I/O.
+* debugging gawk: Known Bugs.
+* debugging gawk, bug reports: Bugs.
* decrement operators: Increment Ops.
-* default action: Very Simple.
-* default pattern: Very Simple.
-* defining functions: Definition Syntax.
* Deifik, Scott <1>: Bugs.
* Deifik, Scott <2>: Contributors.
* Deifik, Scott: Acknowledgments.
* delete statement: Delete.
-* deleting elements of arrays: Delete.
+* deleting elements in arrays: Delete.
* deleting entire arrays: Delete.
-* deprecated features: Obsolete.
-* deprecated options: Obsolete.
-* differences between gawk and awk <1>: AWKPATH Variable.
-* differences between gawk and awk <2>: String Functions.
-* differences between gawk and awk <3>: Calling Built-in.
-* differences between gawk and awk <4>: Delete.
-* differences between gawk and awk <5>: ARGC and ARGV.
-* differences between gawk and awk <6>: User-modified.
-* differences between gawk and awk <7>: Nextfile Statement.
-* differences between gawk and awk <8>: I/O And BEGIN/END.
-* differences between gawk and awk <9>: Conditional Exp.
-* differences between gawk and awk <10>: Arithmetic Ops.
-* differences between gawk and awk <11>: Using Constant Regexps.
-* differences between gawk and awk <12>: Scalar Constants.
-* differences between gawk and awk <13>: Close Files And Pipes.
-* differences between gawk and awk <14>: Special FD.
-* differences between gawk and awk <15>: Redirection.
-* differences between gawk and awk <16>: Format Modifiers.
-* differences between gawk and awk <17>: Getline Notes.
-* differences between gawk and awk <18>: Getline/Coprocess.
-* differences between gawk and awk <19>: Getline.
-* differences between gawk and awk <20>: Single Character Fields.
-* differences between gawk and awk <21>: Records.
-* differences between gawk and awk: Case-sensitivity.
-* directory search <1>: VMS Running.
-* directory search <2>: PC Using.
-* directory search <3>: Igawk Program.
-* directory search: AWKPATH Variable.
+* differences in awk and gawk, ARGC/ARGV variables: ARGC and ARGV.
+* differences in awk and gawk, ARGIND variable: Auto-set.
+* differences in awk and gawk, array elements, deleting: Delete.
+* differences in awk and gawk, AWKPATH environment variable: AWKPATH Variable.
+* differences in awk and gawk, BEGIN/END patterns: I/O And BEGIN/END.
+* differences in awk and gawk, BINMODE variable <1>: PC Using.
+* differences in awk and gawk, BINMODE variable: User-modified.
+* differences in awk and gawk, close function: Close Files And Pipes.
+* differences in awk and gawk, ERRNO variable: Auto-set.
+* differences in awk and gawk, error messages: Special FD.
+* differences in awk and gawk, FIELDWIDTHS variable: User-modified.
+* differences in awk and gawk, function arguments (gawk): Calling Built-in.
+* differences in awk and gawk, getline command: Getline.
+* differences in awk and gawk, IGNORECASE variable: User-modified.
+* differences in awk and gawk, implementation limitations <1>: Redirection.
+* differences in awk and gawk, implementation limitations: Getline Notes.
+* differences in awk and gawk, input/output operators <1>: Redirection.
+* differences in awk and gawk, input/output operators: Getline/Coprocess.
+* differences in awk and gawk, line continuations: Conditional Exp.
+* differences in awk and gawk, LINT variable: User-modified.
+* differences in awk and gawk, match function: String Functions.
+* differences in awk and gawk, next/nextfile statements: Nextfile Statement.
+* differences in awk and gawk, print/printf statements: Format Modifiers.
+* differences in awk and gawk, PROCINFO array: Auto-set.
+* differences in awk and gawk, record separators: Records.
+* differences in awk and gawk, regexp constants: Using Constant Regexps.
+* differences in awk and gawk, regular expressions: Case-sensitivity.
+* differences in awk and gawk, RS/RT variables: Records.
+* differences in awk and gawk, RT variable: Auto-set.
+* differences in awk and gawk, single-character fields: Single Character Fields.
+* differences in awk and gawk, split function: String Functions.
+* differences in awk and gawk, strings: Scalar Constants.
+* differences in awk and gawk, strings, storing: Records.
+* differences in awk and gawk, strtonum function (gawk): String Functions.
+* differences in awk and gawk, TEXTDOMAIN variable: User-modified.
+* differences in awk and gawk, trunc-mod operation: Arithmetic Ops.
+* directories, changing: Sample Library.
+* directories, searching <1>: Igawk Program.
+* directories, searching: AWKPATH Variable.
* division: Arithmetic Ops.
-* do-while statement: Do Statement.
+* do-while statement <1>: Do Statement.
+* do-while statement: Regexp Usage.
+* documentation, of awk programs: Library Names.
* documentation, online: Manual History.
-* documenting awk programs <1>: Library Names.
-* documenting awk programs: Comments.
-* double-precision floating-point, definition of: Basic Data Typing.
+* documents, searching: Dupword Program.
+* dollar sign ($): Regexp Operators.
+* dollar sign ($), $ field operator <1>: Precedence.
+* dollar sign ($), $ field operator: Fields.
+* dollar sign ($), incrementing fields and arrays: Increment Ops.
+* double quote (") <1>: Quoting.
+* double quote ("): Read Terminal.
+* double quote ("), regexp constants: Computed Regexps.
+* double-precision floating-point: Basic Data Typing.
* Drepper, Ulrich: Acknowledgments.
* dupnode internal function: Internals.
* dupword.awk program: Dupword Program.
-* dynamic profiling: Profiling.
-* dynamic regular expressions: Computed Regexps.
-* dynamic regular expressions with embedded newlines: Computed Regexps.
* EBCDIC: Ordinal Functions.
* egrep utility <1>: Egrep Program.
* egrep utility: Character Lists.
* egrep.awk program: Egrep Program.
-* element assignment: Assigning Elements.
-* element of array: Reference to Elements.
-* emaill address for bug reports, bug-gawk@gnu.org: Bugs.
-* embedded newlines, in dynamic regexps: Computed Regexps.
+* elements in arrays: Reference to Elements.
+* elements in arrays, assigning: Assigning Elements.
+* elements in arrays, deleting: Delete.
+* elements in arrays, order of: Scanning an Array.
+* elements in arrays, scanning: Scanning an Array.
+* email address for bug reports, bug-gawk@gnu.org: Bugs.
* EMISTERED: TCP/IP Networking.
-* empty action: Very Simple.
* empty pattern: Empty.
-* empty program: Command Line.
-* empty string <1>: Truth Values.
-* empty string <2>: Conversion.
-* empty string <3>: Regexp Field Splitting.
-* empty string: Records.
-* empty string, definition of: Basic Data Typing.
-* END special pattern: BEGIN/END.
+* empty strings, See null strings: Regexp Field Splitting.
+* END pattern: BEGIN/END.
+* END pattern, assert user-defined function and: Assert Function.
+* END pattern, backslash continuation and: Egrep Program.
+* END pattern, Boolean patterns and: Expression Patterns.
+* END pattern, exit statement and: Exit Statement.
+* END pattern, next/nextfile statements and <1>: Next Statement.
+* END pattern, next/nextfile statements and: I/O And BEGIN/END.
+* END pattern, operators and: Using BEGIN/END.
+* END pattern, pgawk program: Profiling.
+* END pattern, print statement and: I/O And BEGIN/END.
* endfile user-defined function: Filetrans Function.
+* endgrent function (C library): Group Functions.
* endgrent user-defined function: Group Functions.
+* endpwent function (C library): Passwd Functions.
* endpwent user-defined function: Passwd Functions.
* ENVIRON variable: Auto-set.
-* environment variable, AWKPATH: AWKPATH Variable.
-* environment variable, POSIXLY_CORRECT: Options.
+* environment variables: Auto-set.
* epoch, definition of: Glossary.
-* equivalence classes: Character Lists.
-* ERRNO variable <1>: Auto-set.
+* equals sign (=), = operator: Assignment Ops.
+* equals sign (=), == operator <1>: Precedence.
+* equals sign (=), == operator: Typing and Comparison.
+* EREs (Extended Regular Expressions): Character Lists.
+* ERRNO variable <1>: Internals.
+* ERRNO variable <2>: Auto-set.
* ERRNO variable: Getline.
-* errors, common <1>: Options.
-* errors, common <2>: String Functions.
-* errors, common <3>: Typing and Comparison.
-* errors, common <4>: Concatenation.
-* errors, common <5>: Arithmetic Ops.
-* errors, common <6>: Special FD.
-* errors, common <7>: Redirection.
-* errors, common <8>: Print Examples.
-* errors, common <9>: Field Separators.
-* errors, common <10>: Computed Regexps.
-* errors, common: Escape Sequences.
-* escape processing, sub et. al.: Gory Details.
-* escape sequence notation: Escape Sequences.
-* evaluation, order of <1>: Calling Built-in.
-* evaluation, order of <2>: Increment Ops.
-* evaluation, order of: Concatenation.
+* error handling: Special FD.
+* error handling, ERRNO variable and: Auto-set.
+* error output: Special FD.
+* escape processing, gsub/gensub/sub functions: Gory Details.
+* escape sequences: Escape Sequences.
+* escape sequences, unrecognized: Options.
+* evaluation order: Increment Ops.
+* evaluation order, concatenation: Concatenation.
+* evaluation order, functions: Calling Built-in.
* examining fields: Fields.
-* executable scripts: Executable Scripts.
+* exclamation point (!), ! operator <1>: Egrep Program.
+* exclamation point (!), ! operator <2>: Precedence.
+* exclamation point (!), ! operator: Boolean Ops.
+* exclamation point (!), != operator <1>: Precedence.
+* exclamation point (!), != operator: Typing and Comparison.
+* exclamation point (!), !~ operator <1>: Expression Patterns.
+* exclamation point (!), !~ operator <2>: Precedence.
+* exclamation point (!), !~ operator <3>: Typing and Comparison.
+* exclamation point (!), !~ operator <4>: Regexp Constants.
+* exclamation point (!), !~ operator <5>: Computed Regexps.
+* exclamation point (!), !~ operator <6>: Case-sensitivity.
+* exclamation point (!), !~ operator: Regexp Usage.
* exit statement: Exit Statement.
-* exp built-in function: Numeric Functions.
+* exp function: Numeric Functions.
* expand utility: Very Simple.
-* explicit input: Getline.
-* exponentiation: Arithmetic Ops.
-* expression: Expressions.
-* expression, assignment: Assignment Ops.
-* expression, boolean: Boolean Ops.
-* expression, comparison: Typing and Comparison.
-* expression, conditional: Conditional Exp.
-* expression, matching: Typing and Comparison.
-* extension built-in function: Using Internal File Ops.
+* expressions: Expressions.
+* expressions, as patterns: Expression Patterns.
+* expressions, assignment: Assignment Ops.
+* expressions, Boolean: Boolean Ops.
+* expressions, comparison: Typing and Comparison.
+* expressions, conditional: Conditional Exp.
+* expressions, matching, See comparison expressions: Typing and Comparison.
+* expressions, selecting: Conditional Exp.
+* Extended Regular Expressions (EREs): Character Lists.
+* extension function (gawk): Using Internal File Ops.
* extensions, Bell Laboratories awk: BTL.
+* extensions, in gawk, not in POSIX awk: POSIX/GNU.
* extensions, mawk: Other Versions.
* extract.awk program: Extract Program.
* extraction, of marked strings (internationalization): String Extraction.
-* fatal errors <1>: File Checking.
-* fatal errors <2>: Options.
-* fatal errors <3>: I/O Functions.
-* fatal errors <4>: String Functions.
-* fatal errors <5>: Calling Built-in.
-* fatal errors <6>: Format Modifiers.
-* fatal errors: Constant Size.
-* FDL: GNU Free Documentation License.
+* false, logical: Truth Values.
+* FDL (Free Documentation License): GNU Free Documentation License.
* features, adding to gawk: Adding Code.
-* features, advanced: Advanced Features.
+* features, advanced, See advanced features: Obsolete.
+* features, deprecated: Obsolete.
* features, undocumented: Undocumented.
* Fenlason, Jay <1>: Contributors.
* Fenlason, Jay: History.
-* fflush built-in function: I/O Functions.
+* fflush function: I/O Functions.
+* fflush function, unsupported: Options.
+* field numbers: Nonconstant Fields.
* field operator $: Fields.
-* field separator, choice of: Field Separators.
-* field separator, FS: Field Separators.
-* field separator, on command line: Command Line Field Separator.
-* fields: Fields.
+* field operators, dollar sign as: Fields.
+* field separators <1>: User-modified.
+* field separators: Field Separators.
+* field separators, choice of: Field Separators.
+* field separators, FIELDWIDTHS variable and: User-modified.
+* field separators, in multiline records: Multiple Line.
+* field separators, on command line: Command Line Field Separator.
+* field separators, POSIX and <1>: Field Splitting Summary.
+* field separators, POSIX and: Fields.
+* field separators, regular expressions as <1>: Regexp Field Splitting.
+* field separators, regular expressions as: Field Separators.
+* field separators, See Also OFS: Changing Fields.
+* field separators, spaces as: Cut Program.
+* fields <1>: Basic High Level.
+* fields <2>: Fields.
+* fields: Reading Files.
+* fields, adding: Changing Fields.
* fields, changing contents of: Changing Fields.
-* fields, definition of: Basic High Level.
+* fields, cutting: Cut Program.
+* fields, examining: Fields.
+* fields, number of: Fields.
+* fields, numbers: Nonconstant Fields.
+* fields, printing: Print Examples.
* fields, separating: Field Separators.
-* FIELDWIDTHS variable: User-modified.
+* fields, single-character: Single Character Fields.
+* FIELDWIDTHS variable <1>: User-modified.
+* FIELDWIDTHS variable: Constant Size.
* file descriptors: Special FD.
-* file, awk program: Long.
+* file names, distinguishing: Auto-set.
+* file names, in compatibility mode: Special Caveats.
+* file names, standard streams in gawk: Special FD.
* FILENAME variable <1>: Auto-set.
-* FILENAME variable <2>: Getline Notes.
* FILENAME variable: Reading Files.
-* FILENAME, being set by getline: Getline Notes.
+* FILENAME variable, getline, setting with: Getline Notes.
+* filenames, assignments as: Ignoring Assigns.
+* files, .mo: Explaining gettext.
+* files, .mo, converting from .po: I18N Example.
+* files, .mo, specifying directory of <1>: Programmer i18n.
+* files, .mo, specifying directory of: Explaining gettext.
+* files, .po <1>: Translator i18n.
+* files, .po: Explaining gettext.
+* files, .po, converting to .mo: I18N Example.
+* files, /dev/... special files: Special FD.
+* files, /inet/ (gawk): TCP/IP Networking.
+* files, /p (gawk): Portal Files.
+* files, as single records: Records.
+* files, awk programs in: Long.
+* files, awkprof.out: Profiling.
+* files, awkvars.out: Options.
+* files, closing: I/O Functions.
+* files, descriptors, See file descriptors: Special FD.
+* files, for process information: Special Process.
+* files, group: Group Functions.
+* files, information about, retrieving: Sample Library.
+* files, initialization and cleanup: Filetrans Function.
+* files, input, See input files: Read Terminal.
+* files, log, timestamps in: Time Functions.
+* files, managing: Data File Management.
+* files, managing, data file boundaries: Filetrans Function.
+* files, message object: Explaining gettext.
+* files, message object, converting from portable object files: I18N Example.
+* files, message object, specifying directory of <1>: Programmer i18n.
+* files, message object, specifying directory of: Explaining gettext.
+* files, multiple passes over: Other Arguments.
+* files, multiple, duplicating output into: Tee Program.
+* files, output, See output files: Close Files And Pipes.
+* files, password: Passwd Functions.
+* files, portable object <1>: Translator i18n.
+* files, portable object: Explaining gettext.
+* files, portable object, converting to message object files: I18N Example.
+* files, portable object, generating: Options.
+* files, portal: Portal Files.
+* files, processing, ARGIND variable and: Auto-set.
+* files, reading: Rewind Function.
+* files, reading, multiline records: Multiple Line.
+* files, searching for regular expressions: Egrep Program.
+* files, skipping: File Checking.
+* files, source, search path for: Igawk Program.
+* files, splitting: Split Program.
+* files, Texinfo, extracting programs from: Extract Program.
* Fish, Fred <1>: Bugs.
* Fish, Fred: Contributors.
+* fixed-width data: Constant Size.
* flag variables <1>: Tee Program.
-* flag variables <2>: Ranges.
* flag variables: Boolean Ops.
-* floating-point, definition of: Basic Data Typing.
-* floating-point, positive and negative values for zero: Floating Point Issues.
-* floating-point, precision issues: Floating Point Issues.
-* flushing buffers: I/O Functions.
+* floating-point: Floating Point Issues.
+* floating-point, numbers: Basic Data Typing.
+* floating-point, numbers, AWKNUM internal type: Internals.
* FNR variable <1>: Auto-set.
* FNR variable: Records.
-* for (x in ...) statement: Scanning an Array.
+* FNR variable, changing: Auto-set.
* for statement: For Statement.
+* for statement, in arrays: Scanning an Array.
* force_number internal function: Internals.
* force_string internal function: Internals.
-* format specifier, printf: Control Letters.
-* format specifier, strftime: Time Functions.
-* format specifiers, mixing regular with positional specifiers (printf): Printf Ordering.
-* format string: Basic Printf.
-* format, numeric output: OFMT.
-* formatted output: Printf.
-* formatted timestamps: Gettimeofday Function.
-* Free Documentation License: GNU Free Documentation License.
-* Free Software Foundation <1>: Glossary.
-* Free Software Foundation <2>: Getting.
-* Free Software Foundation: Manual History.
+* format specifiers, mixing regular with positional specifiers: Printf Ordering.
+* format specifiers, printf statement: Control Letters.
+* format specifiers, strftime function (gawk): Time Functions.
+* format strings: Basic Printf.
+* formats, numeric output: OFMT.
+* formatting output: Printf.
+* forward slash (/): Regexp.
+* forward slash (/), / operator: Precedence.
+* forward slash (/), /= operator <1>: Precedence.
+* forward slash (/), /= operator: Assignment Ops.
+* forward slash (/), /= operator, vs. /=.../ regexp constant: Assignment Ops.
+* forward slash (/), patterns and: Expression Patterns.
+* Free Documentation License (FDL): GNU Free Documentation License.
+* Free Software Foundation (FSF) <1>: Glossary.
+* Free Software Foundation (FSF) <2>: Getting.
+* Free Software Foundation (FSF): Manual History.
* free_temp internal macro: Internals.
-* FreeBSD <1>: Glossary.
-* FreeBSD: Manual History.
+* FreeBSD: Glossary.
* FS variable <1>: User-modified.
* FS variable: Field Separators.
-* FSF <1>: Glossary.
-* FSF <2>: Getting.
-* FSF: Manual History.
-* ftp, anonymous: Getting.
-* function call <1>: Function Caveats.
-* function call: Function Calls.
-* function definition: Definition Syntax.
-* function, recursive: Definition Syntax.
-* function, user-defined: User-defined.
+* FS variable, --field-separator option and: Options.
+* FS variable, as null string: Single Character Fields.
+* FS variable, as TAB character: Options.
+* FS variable, changing value of <1>: Known Bugs.
+* FS variable, changing value of: Field Separators.
+* FS variable, running awk programs and: Cut Program.
+* FS variable, setting from command line: Command Line Field Separator.
+* FSF (Free Software Foundation) <1>: Glossary.
+* FSF (Free Software Foundation) <2>: Getting.
+* FSF (Free Software Foundation): Manual History.
+* function calls: Function Calls.
+* functions, arrays as parameters to: Function Caveats.
+* functions, built-in <1>: Functions.
+* functions, built-in: Function Calls.
+* functions, built-in, adding to gawk: Dynamic Extensions.
+* functions, built-in, evaluation order: Calling Built-in.
+* functions, defining: Definition Syntax.
+* functions, library: Library Functions.
+* functions, library, assertions: Assert Function.
+* functions, library, associative arrays and: Library Names.
+* functions, library, C library: Getopt Function.
+* functions, library, character values as numbers: Ordinal Functions.
+* functions, library, Cliff random numbers: Cliff Random Function.
+* functions, library, command-line options: Getopt Function.
+* functions, library, example program for using: Igawk Program.
+* functions, library, group database, reading: Group Functions.
+* functions, library, managing data files: Data File Management.
+* functions, library, managing time: Gettimeofday Function.
+* functions, library, merging arrays into strings: Join Function.
+* functions, library, nextfile statement: Nextfile Function.
+* functions, library, rounding numbers: Round Function.
+* functions, library, user database, reading: Passwd Functions.
+* functions, names of <1>: Definition Syntax.
+* functions, names of: Arrays.
+* functions, recursive: Definition Syntax.
+* functions, return values, setting: Internals.
+* functions, string-translation: I18N Functions.
* functions, undefined: Function Caveats.
+* functions, user-defined: User-defined.
+* functions, user-defined, calling: Function Caveats.
+* functions, user-defined, counts: Profiling.
+* functions, user-defined, library of: Library Functions.
+* functions, user-defined, next/nextfile statements and <1>: Nextfile Statement.
+* functions, user-defined, next/nextfile statements and: Next Statement.
* G-d: Acknowledgments.
* Garfinkle, Scott: Contributors.
-* gawk, coding style: Adding Code.
-* gawk, source code: Getting.
-* General Public License <1>: Glossary.
-* General Public License <2>: New Ports.
-* General Public License <3>: Other Versions.
-* General Public License: Manual History.
-* gensub built-in function: String Functions.
-* gensub, escape processing: Gory Details.
+* gawk, awk and <1>: This Manual.
+* gawk, awk and: Preface.
+* gawk, bitwise operations in: Bitwise Functions.
+* gawk, break statement in: Break Statement.
+* gawk, built-in variables and: Built-in Variables.
+* gawk, character classes and: Character Lists.
+* gawk, coding style in: Adding Code.
+* gawk, command-line options: GNU Regexp Operators.
+* gawk, comparison operators and: Typing and Comparison.
+* gawk, configuring: Configuration Philosophy.
+* gawk, configuring, options: Additional Configuration Options.
+* gawk, continue statement in: Continue Statement.
+* gawk, debugging: Known Bugs.
+* gawk, distribution: Distribution contents.
+* gawk, escape sequences: Escape Sequences.
+* gawk, extensions, disabling: Options.
+* gawk, features, adding: Adding Code.
+* gawk, features, advanced: Advanced Features.
+* gawk, fflush function in: I/O Functions.
+* gawk, field separators and: User-modified.
+* gawk, FIELDWIDTHS variable in: User-modified.
+* gawk, file names in: Special Files.
+* gawk, format-control characters: Control Letters.
+* gawk, function arguments and: Calling Built-in.
+* gawk, functions, adding: Dynamic Extensions.
+* gawk, hexadecimal numbers and: Nondecimal-numbers.
+* gawk, IGNORECASE variable in: User-modified.
+* gawk, implementation issues: Notes.
+* gawk, implementation issues, debugging: Compatibility Mode.
+* gawk, implementation issues, downward compatibility: Compatibility Mode.
+* gawk, implementation issues, limits: Getline Notes.
+* gawk, implementation issues, pipes: Redirection.
+* gawk, installing: Installation.
+* gawk, internals: Internals.
+* gawk, internationalization and, See internationalization: Internationalization.
+* gawk, interpreter, adding code to <1>: Future Extensions.
+* gawk, interpreter, adding code to: Using Internal File Ops.
+* gawk, interval expressions and: Regexp Operators.
+* gawk, line continuation in: Conditional Exp.
+* gawk, LINT variable in: User-modified.
+* gawk, list of contributors to: Contributors.
+* gawk, MS-DOS version of: PC Using.
+* gawk, newlines in: Statements/Lines.
+* gawk, next file statement in: Nextfile Statement.
+* gawk, nextfile statement in <1>: Nextfile Function.
+* gawk, nextfile statement in: Nextfile Statement.
+* gawk, octal numbers and: Nondecimal-numbers.
+* gawk, OS/2 version of: PC Using.
+* gawk, regexp constants and: Using Constant Regexps.
+* gawk, regular expressions, case sensitivity: Case-sensitivity.
+* gawk, regular expressions, operators: GNU Regexp Operators.
+* gawk, regular expressions, precedence: Regexp Operators.
+* gawk, See Also awk: Preface.
+* gawk, source code, obtaining: Getting.
+* gawk, splitting fields and: Constant Size.
+* gawk, string-translation functions: I18N Functions.
+* gawk, timestamps: Time Functions.
+* gawk, uses for: Preface.
+* gawk, versions of, information about, printing: Options.
+* gawk, word-boundary operator: GNU Regexp Operators.
+* General Public License (GPL): Glossary.
+* General Public License, See GPL: Manual History.
+* gensub function (gawk) <1>: String Functions.
+* gensub function (gawk): Using Constant Regexps.
+* gensub function (gawk), escape processing: Gory Details.
* get_argument internal function: Internals.
-* getgrent C library function: Group Functions.
+* getgrent function (C library): Group Functions.
* getgrent user-defined function: Group Functions.
+* getgrgid function (C library): Group Functions.
* getgrgid user-defined function: Group Functions.
+* getgrnam function (C library): Group Functions.
* getgrnam user-defined function: Group Functions.
-* getgruser user-defined function: Group Functions.
-* getline built-in function: Getline.
-* getline, return values: Getline.
-* getline, setting FILENAME: Getline Notes.
-* getopt C library function: Getopt Function.
+* getgruser function (C library): Group Functions.
+* getgruser function, user-defined: Group Functions.
+* getline command: Reading Files.
+* getline command, _gr_init user-defined function: Group Functions.
+* getline command, _pw_init function: Passwd Functions.
+* getline command, coprocesses, using from <1>: Close Files And Pipes.
+* getline command, coprocesses, using from: Getline/Coprocess.
+* getline command, deadlock and: Two-way I/O.
+* getline command, explicit input with: Getline.
+* getline command, FILENAME variable and: Getline Notes.
+* getline command, return values: Getline.
+* getline command, variants: Getline Summary.
+* getopt function (C library): Getopt Function.
* getopt user-defined function: Getopt Function.
-* getpwent C library function: Passwd Functions.
+* getpwent function (C library): Passwd Functions.
* getpwent user-defined function: Passwd Functions.
+* getpwnam function (C library): Passwd Functions.
* getpwnam user-defined function: Passwd Functions.
+* getpwuid function (C library): Passwd Functions.
* getpwuid user-defined function: Passwd Functions.
-* getservbyname C library function: TCP/IP Networking.
-* gettext C library function: Explaining gettext.
-* gettext, how it works: Explaining gettext.
+* getservbyname function (C library): TCP/IP Networking.
+* gettext function (C library): Explaining gettext.
+* gettext library: Explaining gettext.
+* gettext library, locale categories: Explaining gettext.
* gettimeofday user-defined function: Gettimeofday Function.
-* getting gawk: Getting.
* GNITS mailing list: Acknowledgments.
+* GNU awk, See gawk: Preface.
* GNU Free Documentation License: GNU Free Documentation License.
-* GNU General Public License <1>: Glossary.
-* GNU General Public License <2>: New Ports.
-* GNU General Public License <3>: Other Versions.
-* GNU General Public License: Manual History.
-* GNU Lesser General Public License <1>: Glossary.
-* GNU Lesser General Public License: Other Versions.
+* GNU General Public License: Glossary.
+* GNU Lesser General Public License: Glossary.
+* GNU long options <1>: Options.
+* GNU long options: Command Line.
+* GNU long options, printing list of: Options.
* GNU Project <1>: Glossary.
* GNU Project: Manual History.
* GNU/Linux <1>: Glossary.
-* GNU/Linux <2>: Using Internal File Ops.
-* GNU/Linux <3>: Internal File Ops.
-* GNU/Linux <4>: Dynamic Extensions.
-* GNU/Linux <5>: Atari Compiling.
-* GNU/Linux <6>: Additional Configuration Options.
-* GNU/Linux <7>: Installation.
-* GNU/Linux <8>: I18N Example.
+* GNU/Linux <2>: Atari Compiling.
+* GNU/Linux <3>: Additional Configuration Options.
+* GNU/Linux <4>: I18N Example.
* GNU/Linux: Manual History.
-* GPL <1>: Glossary.
-* GPL <2>: New Ports.
-* GPL <3>: Other Versions.
-* GPL: Manual History.
+* GPL (General Public License) <1>: Glossary.
+* GPL (General Public License): Manual History.
+* GPL (General Public License), printing: Options.
* grcat program: Group Functions.
* Grigera, Juan <1>: Bugs.
* Grigera, Juan: Contributors.
+* group database, reading: Group Functions.
* group file: Group Functions.
-* group information: Group Functions.
-* gsub built-in function: String Functions.
-* gsub, escape processing: Gory Details.
-* gsub, third argument of: String Functions.
+* groups, information about: Group Functions.
+* gsub function <1>: String Functions.
+* gsub function: Using Constant Regexps.
+* gsub function, arguments of: String Functions.
+* gsub function, escape processing: Gory Details.
* Hankerson, Darrel <1>: Bugs.
* Hankerson, Darrel <2>: Contributors.
* Hankerson, Darrel: Acknowledgments.
* Hartholz, Elaine: Acknowledgments.
* Hartholz, Marshall: Acknowledgments.
-* hexadecimal numbers: Non-decimal-numbers.
-* historical features <1>: String Functions.
-* historical features <2>: Continue Statement.
-* historical features <3>: Break Statement.
-* historical features: Command Line Field Separator.
-* history of awk: History.
+* Hasegawa, Isamu <1>: Contributors.
+* Hasegawa, Isamu: Acknowledgments.
+* hexadecimal numbers: Nondecimal-numbers.
+* hexadecimal, values, enabling interpretation of: Options.
* histsort.awk program: History Sorting.
-* how awk works: Two Rules.
* Hughes, Phil: Acknowledgments.
* HUP signal: Profiling.
-* I/O, binary: User-modified.
-* I/O, from BEGIN and END: I/O And BEGIN/END.
-* I/O, two-way: Two-way I/O.
+* hyphen (-), - operator: Precedence.
+* hyphen (-), -- (decrement/increment) operators: Precedence.
+* hyphen (-), -- operator: Increment Ops.
+* hyphen (-), -= operator <1>: Precedence.
+* hyphen (-), -= operator: Assignment Ops.
+* hyphen (-), filenames beginning with: Options.
+* hyphen (-), in character lists: Character Lists.
* id utility: Id Program.
* id.awk program: Id Program.
-* if-else statement: If Statement.
+* if statement <1>: If Statement.
+* if statement: Regexp Usage.
+* if statement, actions, changing: Ranges.
* igawk.sh program: Igawk Program.
-* IGNORECASE variable <1>: Array Sorting.
-* IGNORECASE variable <2>: Array Intro.
-* IGNORECASE variable <3>: User-modified.
+* IGNORECASE variable <1>: User-modified.
* IGNORECASE variable: Case-sensitivity.
-* IGNORECASE, and array sorting: Array Sorting.
-* IGNORECASE, and array subscripts: Array Intro.
-* ignoring case: Case-sensitivity.
-* implementation limits <1>: Redirection.
-* implementation limits: Getline Notes.
+* IGNORECASE variable, array sorting and: Array Sorting.
+* IGNORECASE variable, array subscripts and: Array Intro.
+* IGNORECASE variable, in example programs: Library Functions.
+* implementation issues, gawk: Notes.
+* implementation issues, gawk, debugging: Compatibility Mode.
+* implementation issues, gawk, limits <1>: Redirection.
+* implementation issues, gawk, limits: Getline Notes.
* in operator <1>: Id Program.
-* in operator <2>: Scanning an Array.
-* in operator <3>: For Statement.
-* in operator <4>: Precedence.
+* in operator <2>: For Statement.
+* in operator <3>: Precedence.
* in operator: Typing and Comparison.
+* in operator, arrays and <1>: Scanning an Array.
+* in operator, arrays and: Reference to Elements.
* increment operators: Increment Ops.
-* index built-in function: String Functions.
+* index function: String Functions.
+* indexing arrays: Array Intro.
* initialization, automatic: More Complex.
-* input: Reading Files.
-* input file, sample: Sample Data Files.
+* input files: Reading Files.
+* input files, closing: Close Files And Pipes.
+* input files, counting elements in: Wc Program.
+* input files, examples: Sample Data Files.
+* input files, reading: Reading Files.
+* input files, running awk without: Read Terminal.
* input files, skipping: Nextfile Function.
+* input files, variable assignments and: Other Arguments.
* input pipeline: Getline/Pipe.
* input redirection: Getline/File.
+* input, data, nondecimal: Nondecimal Data.
* input, explicit: Getline.
-* input, getline command: Getline.
-* input, multiple line records: Multiple Line.
+* input, files, See input files: Multiple Line.
+* input, multiline records: Multiple Line.
+* input, splitting into records: Records.
+* input, standard <1>: Special FD.
* input, standard: Read Terminal.
+* input/output, binary: User-modified.
+* input/output, from BEGIN and END: I/O And BEGIN/END.
+* input/output, two-way: Two-way I/O.
* insomnia, cure for: Alarm Program.
* installation, amiga: Amiga Installation.
* installation, atari: Atari Installation.
* installation, beos: BeOS Installation.
-* installation, pc operating systems: PC Installation.
* installation, tandem: Tandem Installation.
-* installation, unix: Quick Installation.
* installation, vms: VMS Installation.
-* int built-in function: Numeric Functions.
-* integer, definition of: Basic Data Typing.
-* integer, unsigned: Basic Data Typing.
-* interaction, awk and other programs: I/O Functions.
-* interactive buffering vs. non-interactive: I/O Functions.
-* internal function, assoc_clear: Internals.
-* internal function, assoc_lookup: Internals.
-* internal function, dupnode: Internals.
-* internal function, force_number: Internals.
-* internal function, force_string: Internals.
-* internal function, get_argument: Internals.
-* internal function, make_builtin: Internals.
-* internal function, make_number: Internals.
-* internal function, make_string: Internals.
-* internal function, set_value: Internals.
-* internal function, tmp_number: Internals.
-* internal function, tmp_string: Internals.
-* internal function, update_ERRNO: Internals.
-* internal macro, free_temp: Internals.
-* internal type, AWKNUM: Internals.
-* internal type, NODE: Internals.
-* internal variable, param_cnt: Internals.
-* internal variable, stlen: Internals.
-* internal variable, stptr: Internals.
-* internal variable, type: Internals.
-* internal variable, vname: Internals.
+* installing gawk: Installation.
+* int function: Numeric Functions.
+* INT signal (MS-DOS): Profiling.
+* integers: Basic Data Typing.
+* integers, unsigned: Basic Data Typing.
+* interacting with other programs: I/O Functions.
* internationalization <1>: I18N and L10N.
-* internationalization: User-modified.
-* internationalization features in gawk: Internationalization.
-* internationalization of awk programs, portability issues: I18N Portability.
-* internationalization, marked strings: Programmer i18n.
+* internationalization: I18N Functions.
+* internationalization, localization <1>: Internationalization.
+* internationalization, localization: User-modified.
+* internationalization, localization, character classes: Character Lists.
+* internationalization, localization, gawk and: Internationalization.
+* internationalization, localization, locale categories: Explaining gettext.
+* internationalization, localization, marked strings: Programmer i18n.
+* internationalization, localization, portability and: I18N Portability.
* internationalizing a program: Explaining gettext.
* interpreted programs <1>: Glossary.
* interpreted programs: Basic High Level.
* interval expressions: Regexp Operators.
* inventory-shipped file: Sample Data Files.
-* invocation of gawk: Command Line.
* ISO: Glossary.
-* ISO 8601: Time Functions.
-* ISO 8859-1 <1>: Glossary.
-* ISO 8859-1: Case-sensitivity.
-* ISO Latin-1 <1>: Glossary.
-* ISO Latin-1: Case-sensitivity.
+* ISO 8859-1: Glossary.
+* ISO Latin-1: Glossary.
* Jacobs, Andrew: Passwd Functions.
* Jaegermann, Michal <1>: Contributors.
* Jaegermann, Michal: Acknowledgments.
@@ -21260,371 +21764,505 @@ Index
* Kernighan, Brian <6>: Acknowledgments.
* Kernighan, Brian <7>: Conventions.
* Kernighan, Brian: History.
-* kill command: Profiling.
+* kill command, dynamic profiling: Profiling.
* Knights, jedi: Undocumented.
-* known bugs: Known Bugs.
* Kwok, Conrad: Contributors.
* labels.awk program: Labels Program.
-* language, awk: This Manual.
-* language, data-driven <1>: Basic High Level.
-* language, data-driven: Getting Started.
-* language, procedural: Getting Started.
+* languages, data-driven: Basic High Level.
* LC_ALL locale category: Explaining gettext.
* LC_COLLATE locale category: Explaining gettext.
* LC_CTYPE locale category: Explaining gettext.
* LC_MESSAGES locale category: Explaining gettext.
+* LC_MESSAGES locale category, bindtextdomain function (gawk): Programmer i18n.
* LC_MONETARY locale category: Explaining gettext.
* LC_NUMERIC locale category: Explaining gettext.
* LC_RESPONSE locale category: Explaining gettext.
* LC_TIME locale category: Explaining gettext.
+* left angle bracket (<), < operator <1>: Precedence.
+* left angle bracket (<), < operator: Typing and Comparison.
+* left angle bracket (<), < operator (I/O): Getline/File.
+* left angle bracket (<), <= operator <1>: Precedence.
+* left angle bracket (<), <= operator: Typing and Comparison.
* left shift, bitwise: Bitwise Functions.
-* leftmost longest match <1>: Multiple Line.
-* leftmost longest match: Leftmost Longest.
-* length built-in function: String Functions.
-* Lesser General Public License <1>: Glossary.
-* Lesser General Public License: Other Versions.
-* LGPL <1>: Glossary.
-* LGPL: Other Versions.
-* limitations <1>: Redirection.
-* limitations: Getline Notes.
-* line break: Statements/Lines.
-* line continuation <1>: Conditional Exp.
-* line continuation <2>: Boolean Ops.
-* line continuation <3>: Print Examples.
-* line continuation: Statements/Lines.
-* lint checks <1>: Options.
-* lint checks <2>: Command Line.
-* lint checks <3>: Function Caveats.
-* lint checks <4>: Uninitialized Subscripts.
-* lint checks <5>: Delete.
-* lint checks <6>: User-modified.
-* lint checks: Format Modifiers.
+* leftmost longest match: Multiple Line.
+* length function: String Functions.
+* Lesser General Public License (LGPL): Glossary.
+* LGPL (Lesser General Public License): Glossary.
+* libraries of awk functions: Library Functions.
+* libraries of awk functions, assertions: Assert Function.
+* libraries of awk functions, associative arrays and: Library Names.
+* libraries of awk functions, character values as numbers: Ordinal Functions.
+* libraries of awk functions, command-line options: Getopt Function.
+* libraries of awk functions, example program for using: Igawk Program.
+* libraries of awk functions, group database, reading: Group Functions.
+* libraries of awk functions, managing, data files: Data File Management.
+* libraries of awk functions, managing, time: Gettimeofday Function.
+* libraries of awk functions, merging arrays into strings: Join Function.
+* libraries of awk functions, nextfile statement: Nextfile Function.
+* libraries of awk functions, rounding numbers: Round Function.
+* libraries of awk functions, user database, reading: Passwd Functions.
+* line breaks: Statements/Lines.
+* line continuations: Boolean Ops.
+* line continuations, gawk: Conditional Exp.
+* line continuations, in print statement: Print Examples.
+* line continuations, with C shell: More Complex.
+* lines, blank, printing: Print.
+* lines, counting: Wc Program.
+* lines, duplicate, removing: History Sorting.
+* lines, matching ranges of: Ranges.
+* lines, skipping between markers: Ranges.
+* lint checking: User-modified.
+* lint checking, array elements: Delete.
+* lint checking, array subscripts: Uninitialized Subscripts.
+* lint checking, empty programs: Command Line.
+* lint checking, issuing warnings: Options.
+* lint checking, POSIXLY_CORRECT environment variable: Options.
+* lint checking, undefined functions: Function Caveats.
* LINT variable: User-modified.
* Linux <1>: Glossary.
-* Linux <2>: Using Internal File Ops.
-* Linux <3>: Internal File Ops.
-* Linux <4>: Dynamic Extensions.
-* Linux <5>: Atari Compiling.
-* Linux <6>: Additional Configuration Options.
-* Linux <7>: Installation.
-* Linux <8>: I18N Example.
+* Linux <2>: Atari Compiling.
+* Linux <3>: Additional Configuration Options.
+* Linux <4>: I18N Example.
* Linux: Manual History.
* locale categories: Explaining gettext.
-* locale, definition of: Time Functions.
* localization: I18N and L10N.
-* log built-in function: Numeric Functions.
-* logical false: Truth Values.
-* logical operators: Boolean Ops.
-* logical true: Truth Values.
+* localization, See internationalization, localization: I18N and L10N.
+* log files, timestamps in: Time Functions.
+* log function: Numeric Functions.
+* logical false/true: Truth Values.
+* logical operators, See Boolean expressions: Boolean Ops.
* login information: Passwd Functions.
* long options: Command Line.
-* loop: While Statement.
+* loops: While Statement.
+* loops, continue statements and: For Statement.
+* loops, count for header: Profiling.
* loops, exiting: Break Statement.
+* loops, See Also while statement: While Statement.
* Lost In Space: Dynamic Extensions.
* ls utility: More Complex.
-* lshift built-in function: Bitwise Functions.
-* lvalue: Assignment Ops.
+* lshift function (gawk): Bitwise Functions.
+* lvalues/rvalues: Assignment Ops.
+* mailing labels, printing: Labels Program.
+* mailing list, GNITS: Acknowledgments.
* make_builtin internal function: Internals.
* make_number internal function: Internals.
* make_string internal function: Internals.
* mark parity: Ordinal Functions.
* marked string extraction (internationalization): String Extraction.
-* marked strings for internationalization: Programmer i18n.
+* marked strings, extracting: String Extraction.
* Marx, Groucho: Increment Ops.
-* match built-in function: String Functions.
-* matching ranges of lines: Ranges.
-* matching, leftmost longest <1>: Multiple Line.
-* matching, leftmost longest: Leftmost Longest.
-* matching, the null string: Gory Details.
-* mawk, source code: Other Versions.
-* merging strings: Join Function.
-* message object files (gettext): Explaining gettext.
-* metacharacters: Regexp Operators.
-* mistakes, common <1>: Options.
-* mistakes, common <2>: String Functions.
-* mistakes, common <3>: Typing and Comparison.
-* mistakes, common <4>: Concatenation.
-* mistakes, common <5>: Arithmetic Ops.
-* mistakes, common <6>: Special FD.
-* mistakes, common <7>: Redirection.
-* mistakes, common <8>: Print Examples.
-* mistakes, common <9>: Field Separators.
-* mistakes, common <10>: Computed Regexps.
-* mistakes, common: Escape Sequences.
-* mktime built-in function: Time Functions.
-* modifiers (in format specifiers): Format Modifiers.
+* match function: String Functions.
+* match function, RSTART/RLENGTH variables: String Functions.
+* matching, expressions, See comparison expressions: Typing and Comparison.
+* matching, leftmost longest: Multiple Line.
+* matching, null strings: Gory Details.
+* mawk program: Other Versions.
+* memory, releasing: Internals.
+* memory, setting limits: Options.
+* message object files: Explaining gettext.
+* message object files, converting from portable object files: I18N Example.
+* message object files, specifying directory of <1>: Programmer i18n.
+* message object files, specifying directory of: Explaining gettext.
+* metacharacters, escape sequences for: Escape Sequences.
+* mktime function (gawk): Time Functions.
+* modifiers, in format specifiers: Format Modifiers.
+* monetary information, localization: Explaining gettext.
* msgfmt utility: I18N Example.
-* multidimensional subscripts: Multi-dimensional.
-* multiple line records: Multiple Line.
-* multiple passes over data: Other Arguments.
-* multiple statements on one line: Statements/Lines.
-* multiplication: Arithmetic Ops.
-* mv utility: Redirection.
-* names, use of <1>: Library Names.
-* names, use of <2>: Definition Syntax.
-* names, use of: Arrays.
-* namespace issues in awk <1>: Library Names.
-* namespace issues in awk <2>: Definition Syntax.
-* namespace issues in awk: Arrays.
+* names, arrays/variables <1>: Library Names.
+* names, arrays/variables: Arrays.
+* names, functions <1>: Library Names.
+* names, functions: Definition Syntax.
+* namespace issues <1>: Library Names.
+* namespace issues: Arrays.
+* namespace issues, functions: Definition Syntax.
+* nawk utility: Names.
* negative zero: Floating Point Issues.
-* NetBSD <1>: Glossary.
-* NetBSD: Manual History.
-* networking, TCP/IP: TCP/IP Networking.
-* new awk: History.
-* new awk vs. old awk: Names.
-* newline: Statements/Lines.
-* newlines, embedded in dynamic regexps: Computed Regexps.
-* next file statement <1>: POSIX/GNU.
-* next file statement: Nextfile Statement.
-* next statement: Next Statement.
-* next, inside a user-defined function: Next Statement.
+* NetBSD: Glossary.
+* networks, programming: TCP/IP Networking.
+* networks, support for: Special Network.
+* newlines <1>: Options.
+* newlines <2>: Boolean Ops.
+* newlines: Statements/Lines.
+* newlines, as field separators: Field Separators.
+* newlines, as record separators: Records.
+* newlines, in dynamic regexps: Computed Regexps.
+* newlines, in regexp constants: Computed Regexps.
+* newlines, printing: Print Examples.
+* newlines, separating statements in actions <1>: Statements.
+* newlines, separating statements in actions: Action Overview.
+* next file statement: POSIX/GNU.
+* next file statement, deprecated: Obsolete.
+* next file statement, in gawk: Nextfile Statement.
+* next statement <1>: Next Statement.
+* next statement: Boolean Ops.
+* next statement, BEGIN/END patterns and: I/O And BEGIN/END.
+* next statement, user-defined functions and: Next Statement.
* nextfile statement: Nextfile Statement.
+* nextfile statement, BEGIN/END patterns and: I/O And BEGIN/END.
+* nextfile statement, implementing: Nextfile Function.
+* nextfile statement, in gawk: Nextfile Statement.
+* nextfile statement, next file statement and: Obsolete.
+* nextfile statement, user-defined functions and: Nextfile Statement.
* nextfile user-defined function: Nextfile Function.
-* nextfile, inside a user-defined function: Nextfile Statement.
* NF variable <1>: Auto-set.
* NF variable: Fields.
+* NF variable, decrementing: Changing Fields.
* noassign.awk program: Ignoring Assigns.
* NODE internal type: Internals.
-* non-interactive buffering vs. interactive: I/O Functions.
-* non-readable data files, skipping: File Checking.
-* NOT logical operator: Boolean Ops.
+* nodes, duplicating: Internals.
+* not Boolean-logic operator: Boolean Ops.
* NR variable <1>: Auto-set.
* NR variable: Records.
-* null string <1>: Truth Values.
-* null string <2>: Conversion.
-* null string: Regexp Field Splitting.
-* null string, as array subscript: Uninitialized Subscripts.
-* null string, definition of: Basic Data Typing.
-* number of fields, NF: Fields.
-* number of records, NR, FNR: Records.
-* numbers, hexadecimal: Non-decimal-numbers.
-* numbers, octal: Non-decimal-numbers.
-* numbers, used as subscripts: Numeric Array Subscripts.
-* numeric character values: Ordinal Functions.
-* numeric constant: Scalar Constants.
-* numeric output format: OFMT.
-* numeric string: Typing and Comparison.
-* numeric value: Scalar Constants.
+* NR variable, changing: Auto-set.
+* null strings <1>: Basic Data Typing.
+* null strings <2>: Truth Values.
+* null strings <3>: Regexp Field Splitting.
+* null strings: Records.
+* null strings, array elements and: Delete.
+* null strings, as array subscripts: Uninitialized Subscripts.
+* null strings, converting numbers to strings: Conversion.
+* null strings, matching: Gory Details.
+* null strings, quoting and: Quoting.
+* number sign (#), #! (executable scripts): Executable Scripts.
+* number sign (#), #! (executable scripts), portability issues with: Executable Scripts.
+* number sign (#), commenting: Comments.
+* numbers: Internals.
+* numbers, as array subscripts: Numeric Array Subscripts.
+* numbers, as values of characters: Ordinal Functions.
+* numbers, Cliff random: Cliff Random Function.
+* numbers, converting: Conversion.
+* numbers, converting, to strings <1>: Bitwise Functions.
+* numbers, converting, to strings: User-modified.
+* numbers, floating-point: Basic Data Typing.
+* numbers, floating-point, AWKNUM internal type: Internals.
+* numbers, hexadecimal: Nondecimal-numbers.
+* numbers, NODE internal type: Internals.
+* numbers, octal: Nondecimal-numbers.
+* numbers, random: Numeric Functions.
+* numbers, rounding: Round Function.
+* numeric, constants: Scalar Constants.
+* numeric, output format: OFMT.
+* numeric, strings: Typing and Comparison.
+* numeric, values: Internals.
+* oawk utility: Names.
* obsolete features: Obsolete.
-* obsolete options: Obsolete.
-* octal numbers: Non-decimal-numbers.
+* octal numbers: Nondecimal-numbers.
+* octal values, enabling interpretation of: Options.
* OFMT variable <1>: User-modified.
* OFMT variable <2>: Conversion.
* OFMT variable: OFMT.
+* OFMT variable, POSIX awk and: OFMT.
* OFS variable <1>: User-modified.
-* OFS variable: Output Separators.
-* old awk: History.
-* old awk vs. new awk: Names.
-* one-liners: Very Simple.
-* online documentation: Manual History.
-* OpenBSD <1>: Glossary.
-* OpenBSD: Manual History.
-* operator precedence <1>: Precedence.
-* operator precedence: Increment Ops.
+* OFS variable <2>: Output Separators.
+* OFS variable: Changing Fields.
+* OpenBSD: Glossary.
+* operating systems, BSD-based <1>: Portal Files.
+* operating systems, BSD-based: Manual History.
+* operating systems, PC, gawk on: PC Using.
+* operating systems, PC, gawk on, installing: PC Installation.
+* operating systems, porting gawk to: New Ports.
+* operating systems, See Also GNU/Linux, PC operating systems, Unix: Installation.
+* operations, bitwise: Bitwise Functions.
* operators, arithmetic: Arithmetic Ops.
* operators, assignment: Assignment Ops.
-* operators, boolean: Boolean Ops.
-* operators, decrement: Increment Ops.
-* operators, increment: Increment Ops.
-* operators, logical: Boolean Ops.
-* operators, regexp matching: Regexp Usage.
-* operators, relational: Typing and Comparison.
+* operators, assignment, evaluation order: Assignment Ops.
+* operators, Boolean, See Boolean expressions: Boolean Ops.
+* operators, decrement/increment: Increment Ops.
+* operators, GNU-specific: GNU Regexp Operators.
+* operators, input/output <1>: Precedence.
+* operators, input/output <2>: Redirection.
+* operators, input/output <3>: Getline/Coprocess.
+* operators, input/output <4>: Getline/Pipe.
+* operators, input/output: Getline/File.
+* operators, logical, See Boolean expressions: Boolean Ops.
+* operators, precedence <1>: Precedence.
+* operators, precedence: Increment Ops.
+* operators, relational, See operators, comparison: Typing and Comparison.
* operators, short-circuit: Boolean Ops.
* operators, string: Concatenation.
* operators, string-matching: Regexp Usage.
-* options, command-line: Command Line.
+* operators, string-matching, for buffers: GNU Regexp Operators.
+* operators, word-boundary (gawk): GNU Regexp Operators.
+* options, command-line <1>: Options.
+* options, command-line <2>: Command Line Field Separator.
+* options, command-line: Long.
+* options, command-line, end of: Options.
+* options, command-line, invoking awk: Command Line.
+* options, command-line, processing: Getopt Function.
+* options, deprecated: Obsolete.
+* options, long <1>: Options.
* options, long: Command Line.
+* options, printing list of: Options.
* OR bitwise operation: Bitwise Functions.
-* or built-in function: Bitwise Functions.
-* OR logical operator: Boolean Ops.
+* or Boolean-logic operator: Boolean Ops.
+* or function (gawk): Bitwise Functions.
* ord user-defined function: Ordinal Functions.
-* order of evaluation: Calling Built-in.
* order of evaluation, concatenation: Concatenation.
* ORS variable <1>: User-modified.
* ORS variable: Output Separators.
-* other awk implementations: Other Versions.
-* output: Printing.
-* output field separator, OFS: Output Separators.
-* output format specifier, OFMT: OFMT.
-* output record separator, ORS: Output Separators.
+* output field separator, See OFS variable: Changing Fields.
+* output record separator, See ORS variable: Output Separators.
* output redirection: Redirection.
* output, buffering: I/O Functions.
+* output, duplicating into files: Tee Program.
+* output, files, closing: Close Files And Pipes.
+* output, format specifier, OFMT: OFMT.
* output, formatted: Printf.
-* output, piping: Redirection.
+* output, pipes: Redirection.
+* output, printing, See printing: Printing.
+* output, records: Output Separators.
+* output, standard: Special FD.
* P1003.2 POSIX standard: Glossary.
* param_cnt internal variable: Internals.
-* passes, multiple: Other Arguments.
+* parameters, number of: Internals.
+* parentheses (): Regexp Operators.
+* parentheses (), pgawk program: Profiling.
* password file: Passwd Functions.
-* path, search <1>: VMS Running.
-* path, search <2>: PC Using.
-* path, search <3>: Igawk Program.
-* path, search: AWKPATH Variable.
-* pattern, BEGIN: BEGIN/END.
-* pattern, default: Very Simple.
-* pattern, definition of: Patterns and Actions.
-* pattern, empty: Empty.
-* pattern, END: BEGIN/END.
-* pattern, range: Ranges.
-* pattern, regular expressions: Regexp.
+* patterns: Patterns and Actions.
+* patterns, comparison expressions as: Expression Patterns.
+* patterns, counts: Profiling.
+* patterns, default: Very Simple.
+* patterns, empty: Empty.
+* patterns, expressions as: Regexp Patterns.
+* patterns, ranges in: Ranges.
+* patterns, regexp constants as: Expression Patterns.
* patterns, types of: Pattern Overview.
-* per file initialization and cleanup: Filetrans Function.
+* PC operating systems, gawk on: PC Using.
+* PC operating systems, gawk on, installing: PC Installation.
+* percent sign (%), % operator: Precedence.
+* percent sign (%), %= operator <1>: Precedence.
+* percent sign (%), %= operator: Assignment Ops.
+* period (.): Regexp Operators.
* PERL: Future Extensions.
* Peters, Arno: Contributors.
* Peterson, Hal: Contributors.
* pgawk program: Profiling.
-* pipeline, input: Getline/Pipe.
-* pipes for output: Redirection.
-* piping commands into the shell: Redirection.
-* portability issues <1>: Library Functions.
-* portability issues <2>: I18N Portability.
-* portability issues <3>: Function Caveats.
-* portability issues <4>: Definition Syntax.
-* portability issues <5>: I/O Functions.
-* portability issues <6>: String Functions.
-* portability issues <7>: Delete.
-* portability issues <8>: Precedence.
-* portability issues <9>: Increment Ops.
-* portability issues <10>: Assignment Ops.
-* portability issues <11>: Arithmetic Ops.
-* portability issues <12>: Close Files And Pipes.
-* portability issues <13>: Changing Fields.
-* portability issues <14>: Records.
-* portability issues <15>: Escape Sequences.
-* portability issues <16>: Statements/Lines.
-* portability issues: Executable Scripts.
-* portability issues, internationalization of awk programs: I18N Portability.
-* portable object files (gettext): Explaining gettext.
+* pgawk program, awkprof.out file: Profiling.
+* pgawk program, dynamic profiling: Profiling.
+* pipes, closing: Close Files And Pipes.
+* pipes, input: Getline/Pipe.
+* pipes, output: Redirection.
+* plus sign (+): Regexp Operators.
+* plus sign (+), + operator: Precedence.
+* plus sign (+), ++ operator <1>: Precedence.
+* plus sign (+), ++ operator: Increment Ops.
+* plus sign (+), += operator <1>: Precedence.
+* plus sign (+), += operator: Assignment Ops.
+* plus sign (+), decrement/increment operators: Increment Ops.
+* portability: Escape Sequences.
+* portability, #! (executable scripts): Executable Scripts.
+* portability, ** operator and: Arithmetic Ops.
+* portability, **= operator and: Assignment Ops.
+* portability, ARGV variable: Executable Scripts.
+* portability, backslash continuation and: Statements/Lines.
+* portability, backslash in escape sequences: Escape Sequences.
+* portability, close function and: Close Files And Pipes.
+* portability, data files as single record: Records.
+* portability, deleting array elements: Delete.
+* portability, example programs: Library Functions.
+* portability, fflush function and: I/O Functions.
+* portability, functions, defining: Definition Syntax.
+* portability, gawk: New Ports.
+* portability, gettext library and: Explaining gettext.
+* portability, internationalization and: I18N Portability.
+* portability, length function: String Functions.
+* portability, new awk vs. old awk: Conversion.
+* portability, next statement in user-defined functions: Function Caveats.
+* portability, NF variable, decrementing: Changing Fields.
+* portability, operators: Increment Ops.
+* portability, operators, not in POSIX awk: Precedence.
+* portability, POSIXLY_CORRECT environment variable: Options.
+* portability, substr function: String Functions.
+* portable object files <1>: Translator i18n.
+* portable object files: Explaining gettext.
+* portable object files, converting to message object files: I18N Example.
+* portable object files, generating: Options.
* portal files: Portal Files.
* porting gawk: New Ports.
-* positional specifier, printf <1>: Printf Ordering.
-* positional specifier, printf: Format Modifiers.
-* positional specifiers, mixing with regular formats (printf): Printf Ordering.
+* positional specifiers, printf statement <1>: Printf Ordering.
+* positional specifiers, printf statement: Format Modifiers.
+* positional specifiers, printf statement, mixing with regular formats: Printf Ordering.
* positive zero: Floating Point Issues.
-* POSIX awk <1>: Definition Syntax.
-* POSIX awk <2>: Gory Details.
-* POSIX awk <3>: String Functions.
-* POSIX awk <4>: User-modified.
-* POSIX awk <5>: Next Statement.
-* POSIX awk <6>: Continue Statement.
-* POSIX awk <7>: Break Statement.
-* POSIX awk <8>: Precedence.
-* POSIX awk <9>: Assignment Ops.
-* POSIX awk <10>: Arithmetic Ops.
-* POSIX awk <11>: Conversion.
-* POSIX awk <12>: Format Modifiers.
-* POSIX awk <13>: OFMT.
-* POSIX awk <14>: Field Splitting Summary.
-* POSIX awk <15>: Character Lists.
-* POSIX awk <16>: Regexp Operators.
-* POSIX awk: Escape Sequences.
+* POSIX awk <1>: Assignment Ops.
+* POSIX awk: This Manual.
+* POSIX awk, **= operator and: Assignment Ops.
+* POSIX awk, < operator and: Getline/File.
+* POSIX awk, arithmetic operators and: Arithmetic Ops.
+* POSIX awk, backslashes in string constants: Escape Sequences.
+* POSIX awk, BEGIN/END patterns: I/O And BEGIN/END.
+* POSIX awk, break statement and: Break Statement.
+* POSIX awk, changes in awk versions: POSIX.
+* POSIX awk, character lists and: Character Lists.
+* POSIX awk, character lists and, character classes: Character Lists.
+* POSIX awk, continue statement and: Continue Statement.
+* POSIX awk, CONVFMT variable and: User-modified.
+* POSIX awk, date utility and: Time Functions.
+* POSIX awk, field separators and <1>: Field Splitting Summary.
+* POSIX awk, field separators and: Fields.
+* POSIX awk, FS variable and: User-modified.
+* POSIX awk, function keyword in: Definition Syntax.
+* POSIX awk, functions and, gsub/sub: Gory Details.
+* POSIX awk, functions and, length: String Functions.
+* POSIX awk, GNU long options and: Options.
+* POSIX awk, interval expressions in: Regexp Operators.
+* POSIX awk, next/nextfile statements and: Next Statement.
+* POSIX awk, numeric strings and: Typing and Comparison.
+* POSIX awk, OFMT variable and <1>: Conversion.
+* POSIX awk, OFMT variable and: OFMT.
+* POSIX awk, period (.), using: Regexp Operators.
+* POSIX awk, pipes, closing: Close Files And Pipes.
+* POSIX awk, printf format strings and: Format Modifiers.
+* POSIX awk, regular expressions and: Regexp Operators.
+* POSIX awk, timestamps and: Time Functions.
+* POSIX awk, | I/O operator and: Getline/Pipe.
* POSIX mode: Options.
+* POSIX, awk and: Preface.
+* POSIX, gawk extensions not included in: POSIX/GNU.
+* POSIX, programs, implementing in awk: Clones.
* POSIXLY_CORRECT environment variable: Options.
* precedence <1>: Precedence.
* precedence: Increment Ops.
* precedence, regexp operators: Regexp Operators.
-* print statement: Print.
-* printf statement: Printf.
+* print statement: Printing.
+* print statement, BEGIN/END patterns and: I/O And BEGIN/END.
+* print statement, commas, omitting: Print Examples.
+* print statement, I/O operators in: Precedence.
+* print statement, line continuations and: Print Examples.
+* print statement, OFMT variable and: User-modified.
+* print statement, See Also redirection, of output: Redirection.
+* print statement, sprintf function and: Round Function.
+* printf statement <1>: Printf.
+* printf statement: Printing.
+* printf statement, columns, aligning: Print Examples.
+* printf statement, format-control characters: Control Letters.
+* printf statement, I/O operators in: Precedence.
+* printf statement, modifiers: Format Modifiers.
+* printf statement, positional specifiers <1>: Printf Ordering.
+* printf statement, positional specifiers: Format Modifiers.
+* printf statement, positional specifiers, mixing with regular formats: Printf Ordering.
+* printf statement, See Also redirection, of output: Redirection.
+* printf statement, sprintf function and: Round Function.
* printf statement, syntax of: Basic Printf.
-* printf, format-control characters: Control Letters.
-* printf, mixing positional specifiers with regular formats: Printf Ordering.
-* printf, modifiers: Format Modifiers.
-* printf, positional specifier <1>: Printf Ordering.
-* printf, positional specifier: Format Modifiers.
* printing: Printing.
-* problem reports: Bugs.
-* procedural languages: Getting Started.
-* process information: Special Process.
-* processing arguments: Getopt Function.
+* printing, list of options: Options.
+* printing, mailing labels: Labels Program.
+* printing, unduplicated lines of text: Uniq Program.
+* printing, user information: Id Program.
+* private variables: Library Names.
+* process information, files for: Special Process.
+* processes, two-way communications with: Two-way I/O.
* processing data: Basic High Level.
-* PROCINFO variable: Auto-set.
+* PROCINFO array <1>: Group Functions.
+* PROCINFO array <2>: Passwd Functions.
+* PROCINFO array <3>: Auto-set.
+* PROCINFO array: Special Caveats.
* profiling awk programs: Profiling.
-* profiling output file (awkprof.out): Profiling.
-* profiling, dynamic: Profiling.
-* program file: Long.
-* program, awk: This Manual.
+* profiling awk programs, dynamically: Profiling.
+* profiling gawk, See pgawk program: Profiling.
* program, definition of: Getting Started.
-* program, self-contained: Executable Scripts.
-* programming concepts, basic: Basic Concepts.
-* programming conventions <1>: Internal File Ops.
-* programming conventions <2>: Nextfile Function.
-* programming conventions <3>: Library Names.
-* programming conventions <4>: Non-decimal Data.
-* programming conventions <5>: Return Statement.
-* programming conventions <6>: Definition Syntax.
-* programming conventions <7>: Calling Built-in.
-* programming conventions <8>: Auto-set.
-* programming conventions: Exit Statement.
+* programmers, attractiveness of: Two-way I/O.
+* programming conventions, --non-decimal-data option: Nondecimal Data.
+* programming conventions, ARGC/ARGV variables: Auto-set.
+* programming conventions, exit statement: Exit Statement.
+* programming conventions, function parameters: Return Statement.
+* programming conventions, functions, calling: Calling Built-in.
+* programming conventions, functions, writing: Definition Syntax.
+* programming conventions, gawk internals: Internal File Ops.
+* programming conventions, nextfile statement: Nextfile Function.
+* programming conventions, private variable names: Library Names.
* programming language, recipe for: History.
+* programming languages, data-driven vs. procedural: Getting Started.
* programming, basic steps: Basic High Level.
-* programs, compiled: Basic High Level.
-* programs, documenting <1>: Library Names.
-* programs, documenting: Comments.
-* programs, interpreted: Basic High Level.
+* programming, concepts: Basic Concepts.
* pwcat program: Passwd Functions.
-* quotient: Arithmetic Ops.
-* quoting rules, shell: Quoting.
-* quoting, shell <1>: Comments.
-* quoting, shell <2>: Long.
-* quoting, shell: Read Terminal.
+* question mark (?) <1>: GNU Regexp Operators.
+* question mark (?): Regexp Operators.
+* question mark (?), ?: operator: Precedence.
+* QUIT signal (MS-DOS): Profiling.
+* quoting <1>: Comments.
+* quoting <2>: Long.
+* quoting: Read Terminal.
+* quoting, rules for: Quoting.
+* quoting, tricks for: Quoting.
* Rakitzis, Byron: History Sorting.
-* rand built-in function: Numeric Functions.
+* rand function: Numeric Functions.
* random numbers, Cliff: Cliff Random Function.
+* random numbers, rand/srand functions: Numeric Functions.
* random numbers, seed of: Numeric Functions.
-* range pattern: Ranges.
+* range expressions: Character Lists.
+* range patterns: Ranges.
* Rankin, Pat <1>: Bugs.
* Rankin, Pat <2>: Contributors.
* Rankin, Pat <3>: Assignment Ops.
* Rankin, Pat: Acknowledgments.
+* raw sockets: TCP/IP Networking.
* readable data files, checking: File Checking.
* readable.awk program: File Checking.
-* reading files: Reading Files.
-* reading files, getline command: Getline.
-* reading files, multiple line records: Multiple Line.
* recipe for a programming language: History.
-* record separator, RS: Records.
-* record terminator, RT: Records.
-* record, definition of <1>: Basic High Level.
-* record, definition of: Records.
-* records, multiple line: Multiple Line.
-* recursive function: Definition Syntax.
+* record separators <1>: User-modified.
+* record separators: Records.
+* record separators, changing: Records.
+* record separators, regular expressions as: Records.
+* record separators, with multiline records: Multiple Line.
+* records <1>: Basic High Level.
+* records: Reading Files.
+* records, multiline: Multiple Line.
+* records, printing: Print.
+* records, splitting input into: Records.
+* records, terminating: Records.
+* records, treating files as: Records.
+* recursive functions: Definition Syntax.
* redirection of input: Getline/File.
* redirection of output: Redirection.
-* reference counting: Array Sorting.
-* reference to array: Reference to Elements.
-* regexp: Regexp.
-* regexp as expression: Typing and Comparison.
-* regexp comparison vs. string comparison: Typing and Comparison.
-* regexp constant: Regexp Usage.
-* regexp constants, difference between slashes and quotes: Computed Regexps.
-* regexp operators <1>: Typing and Comparison.
-* regexp operators <2>: Regexp Operators.
-* regexp operators: Regexp Usage.
-* regexp operators, GNU specific: GNU Regexp Operators.
-* regexp operators, precedence of: Regexp Operators.
-* regexp, anchors: Regexp Operators.
-* regexp, dynamic: Computed Regexps.
-* regexp, dynamic, with embedded newlines: Computed Regexps.
-* regexp, effect of command-line options: GNU Regexp Operators.
-* regular expression: Regexp.
-* regular expression metacharacters: Regexp Operators.
+* reference counting, sorting arrays: Array Sorting.
+* regexp constants <1>: Typing and Comparison.
+* regexp constants <2>: Regexp Constants.
+* regexp constants: Regexp Usage.
+* regexp constants, /=.../, /= operator and: Assignment Ops.
+* regexp constants, as patterns: Expression Patterns.
+* regexp constants, in gawk: Using Constant Regexps.
+* regexp constants, slashes vs. quotes: Computed Regexps.
+* regexp constants, vs. string constants: Computed Regexps.
+* regexp, See regular expressions: Regexp.
+* regular expressions: Regexp.
* regular expressions as field separators: Field Separators.
-* regular expressions as patterns: Regexp.
-* regular expressions as record separators: Records.
+* regular expressions, anchors in: Regexp Operators.
+* regular expressions, as field separators: Regexp Field Splitting.
+* regular expressions, as patterns <1>: Regexp Patterns.
+* regular expressions, as patterns: Regexp Usage.
+* regular expressions, as record separators: Records.
+* regular expressions, case sensitivity <1>: User-modified.
+* regular expressions, case sensitivity: Case-sensitivity.
* regular expressions, computed: Computed Regexps.
-* relational operators: Typing and Comparison.
-* remainder: Arithmetic Ops.
-* removing elements of arrays: Delete.
-* reporting bugs: Bugs.
-* reporting problems: Bugs.
-* return statement: Return Statement.
-* return value from close: Close Files And Pipes.
+* regular expressions, constants, See regexp constants: Regexp Usage.
+* regular expressions, dynamic: Computed Regexps.
+* regular expressions, dynamic, with embedded newlines: Computed Regexps.
+* regular expressions, gawk, command-line options: GNU Regexp Operators.
+* regular expressions, interval expressions and: Options.
+* regular expressions, leftmost longest match: Leftmost Longest.
+* regular expressions, operators <1>: Regexp Operators.
+* regular expressions, operators: Regexp Usage.
+* regular expressions, operators, for buffers: GNU Regexp Operators.
+* regular expressions, operators, for words: GNU Regexp Operators.
+* regular expressions, operators, gawk: GNU Regexp Operators.
+* regular expressions, operators, precedence of: Regexp Operators.
+* regular expressions, searching for: Egrep Program.
+* relational operators, See comparison operators: Typing and Comparison.
+* return statement, user-defined functions: Return Statement.
+* return values, close function: Close Files And Pipes.
+* rev user-defined function: Function Example.
* rewind user-defined function: Rewind Function.
-* RFC 1036: Time Functions.
-* RFC 822: Time Functions.
+* right angle bracket (>), > operator <1>: Precedence.
+* right angle bracket (>), > operator: Typing and Comparison.
+* right angle bracket (>), > operator (I/O): Redirection.
+* right angle bracket (>), >= operator <1>: Precedence.
+* right angle bracket (>), >= operator: Typing and Comparison.
+* right angle bracket (>), >> operator (I/O) <1>: Precedence.
+* right angle bracket (>), >> operator (I/O): Redirection.
* right shift, bitwise: Bitwise Functions.
* Ritchie, Dennis: Basic Data Typing.
-* RLENGTH variable <1>: String Functions.
* RLENGTH variable: Auto-set.
+* RLENGTH variable, match function and: String Functions.
* Robbins, Arnold <1>: Future Extensions.
* Robbins, Arnold <2>: Bugs.
* Robbins, Arnold <3>: Contributors.
@@ -21640,573 +22278,683 @@ Index
* Robbins, Miriam: Acknowledgments.
* Robinson, Will: Dynamic Extensions.
* robot, the: Dynamic Extensions.
-* Rommel, Kai Uwe <1>: Bugs.
-* Rommel, Kai Uwe <2>: Contributors.
+* Rommel, Kai Uwe <1>: Contributors.
* Rommel, Kai Uwe: Acknowledgments.
* round user-defined function: Round Function.
* rounding: Round Function.
+* rounding numbers: Round Function.
* RS variable <1>: User-modified.
* RS variable: Records.
-* rshift built-in function: Bitwise Functions.
-* RSTART variable <1>: String Functions.
+* RS variable, multiline records and: Multiple Line.
+* rshift function (gawk): Bitwise Functions.
* RSTART variable: Auto-set.
+* RSTART variable, match function and: String Functions.
* RT variable <1>: Auto-set.
* RT variable <2>: Multiple Line.
* RT variable: Records.
* Rubin, Paul <1>: Contributors.
* Rubin, Paul: History.
* rule, definition of: Getting Started.
-* running awk programs: Running gawk.
-* running long programs: Long.
-* rvalue: Assignment Ops.
-* sample input files: Sample Data Files.
-* scalar, definition of: Basic Data Typing.
-* scanning an array: Scanning an Array.
+* rvalues/lvalues: Assignment Ops.
+* scalar values: Basic Data Typing.
* Schreiber, Bert: Acknowledgments.
* Schreiber, Rita: Acknowledgments.
-* script, definition of: Getting Started.
-* scripts, executable: Executable Scripts.
-* search path <1>: VMS Running.
-* search path <2>: PC Using.
-* search path <3>: Igawk Program.
-* search path: AWKPATH Variable.
-* search path, for source files <1>: VMS Running.
-* search path, for source files <2>: PC Using.
-* search path, for source files <3>: Igawk Program.
-* search path, for source files: AWKPATH Variable.
+* search paths <1>: VMS Running.
+* search paths: PC Using.
+* search paths, for source files <1>: VMS Running.
+* search paths, for source files <2>: Igawk Program.
+* search paths, for source files: AWKPATH Variable.
+* searching: String Functions.
+* searching, files for regular expressions: Egrep Program.
+* searching, for words: Dupword Program.
* sed utility <1>: Glossary.
* sed utility <2>: Igawk Program.
* sed utility <3>: Simple Sed.
* sed utility: Field Splitting Summary.
-* seed for random numbers: Numeric Functions.
-* self-contained programs: Executable Scripts.
+* semicolon (;): Statements/Lines.
+* semicolon (;), AWKPATH variable and: PC Using.
+* semicolon (;), separating statements in actions <1>: Statements.
+* semicolon (;), separating statements in actions: Action Overview.
+* separators, field: User-modified.
+* separators, field, FIELDWIDTHS variable and: User-modified.
+* separators, field, POSIX and: Fields.
+* separators, for records: Records.
+* separators, for records, regular expressions as: Records.
+* separators, for statements in actions: Action Overview.
+* separators, record: User-modified.
+* separators, subscript: User-modified.
* set_value internal function: Internals.
-* sex, comparisons with <1>: Manual History.
-* sex, comparisons with: This Manual.
-* sex, programmer attractiveness: Two-way I/O.
-* shell and awk interaction: Using Shell Variables.
-* shell quoting <1>: Comments.
-* shell quoting <2>: Long.
-* shell quoting: Read Terminal.
-* shell quoting rules: Quoting.
-* shell quoting, tricks: Quoting.
-* shell varibles, using in awk programs: Using Shell Variables.
-* shell, piping commands into: Redirection.
+* shells, piping commands into: Redirection.
+* shells, quoting: Using Shell Variables.
+* shells, quoting, rules for: Quoting.
+* shells, scripts: One-shot.
+* shells, variables: Using Shell Variables.
* shift, bitwise: Bitwise Functions.
* short-circuit operators: Boolean Ops.
-* side effects <1>: Array Sorting.
-* side effects <2>: Reference to Elements.
-* side effects <3>: Action Overview.
-* side effects <4>: Function Calls.
-* side effects <5>: Conditional Exp.
-* side effects <6>: Boolean Ops.
-* side effects <7>: Increment Ops.
-* side effects <8>: Assignment Ops.
-* side effects <9>: Concatenation.
-* side effects: Getline Notes.
-* SIGHUP signal: Profiling.
-* signals, SIGHUP: Profiling.
-* signals, SIGUSR1: Profiling.
-* SIGUSR1 signal: Profiling.
-* simple stream editor: Simple Sed.
-* sin built-in function: Numeric Functions.
-* single quotes, why needed: One-shot.
+* side effects <1>: Increment Ops.
+* side effects: Concatenation.
+* side effects, array indexing: Reference to Elements.
+* side effects, asort function: Array Sorting.
+* side effects, assignment expressions: Assignment Ops.
+* side effects, Boolean operators: Boolean Ops.
+* side effects, conditional expressions: Conditional Exp.
+* side effects, decrement/increment operators: Increment Ops.
+* side effects, FILENAME variable: Getline Notes.
+* side effects, function calls: Function Calls.
+* side effects, statements: Action Overview.
+* signals, HUP/SIGHUP: Profiling.
+* signals, INT/SIGINT (MS-DOS): Profiling.
+* signals, QUIT/SIGQUIT (MS-DOS): Profiling.
+* signals, USR1/SIGUSR1: Profiling.
+* sin function: Numeric Functions.
+* single quote (') <1>: Quoting.
+* single quote (') <2>: Long.
+* single quote ('): One-shot.
+* single quote ('), vs. apostrophe: Comments.
+* single quote ('), with double quotes: Quoting.
* single-character fields: Single Character Fields.
-* single-precision floating-point, definition of: Basic Data Typing.
-* skipping input files: Nextfile Function.
-* skipping lines between markers: Ranges.
+* single-precision floating-point: Basic Data Typing.
* Skywalker, Luke: Undocumented.
* sleep utility: Alarm Program.
+* sockets: TCP/IP Networking.
+* sort function, arrays, sorting: Array Sorting.
* sort utility: Word Sorting.
+* sort utility, coprocesses and: Two-way I/O.
+* sorting characters in different languages: Explaining gettext.
* source code, awka: Other Versions.
-* source code, gawk: Getting.
+* source code, Bell Laboratories awk: Other Versions.
+* source code, gawk: Gawk Distribution.
* source code, mawk: Other Versions.
-* source code, Unix awk: Other Versions.
+* source code, mixing: Options.
+* source files, search path for: Igawk Program.
* sparse arrays: Array Intro.
* Spencer, Henry: Glossary.
-* split built-in function: String Functions.
+* split function: String Functions.
+* split function, array elements, deleting: Delete.
* split utility: Split Program.
* split.awk program: Split Program.
-* sprintf built-in function: String Functions.
-* sqrt built-in function: Numeric Functions.
-* srand built-in function: Numeric Functions.
+* sprintf function <1>: String Functions.
+* sprintf function: OFMT.
+* sprintf function, OFMT variable and: User-modified.
+* sprintf function, print/printf statements and: Round Function.
+* sqrt function: Numeric Functions.
+* square brackets ([]): Regexp Operators.
+* srand function: Numeric Functions.
* Stallman, Richard <1>: Glossary.
* Stallman, Richard <2>: Contributors.
* Stallman, Richard <3>: Acknowledgments.
* Stallman, Richard: Manual History.
-* standard error output: Special FD.
* standard input <1>: Special FD.
-* standard input <2>: Reading Files.
* standard input: Read Terminal.
* standard output: Special FD.
-* statement, compound: Statements.
+* stat function, implementing in gawk: Sample Library.
+* statements, compound, control statements and: Statements.
+* statements, control, in actions: Statements.
+* statements, multiple: Statements/Lines.
* stlen internal variable: Internals.
* stptr internal variable: Internals.
-* stream editor <1>: Igawk Program.
-* stream editor <2>: Simple Sed.
-* stream editor: Field Splitting Summary.
-* stream editor, simple: Simple Sed.
-* strftime built-in function: Time Functions.
-* string comparison vs. regexp comparison: Typing and Comparison.
+* stream editors <1>: Igawk Program.
+* stream editors <2>: Simple Sed.
+* stream editors: Field Splitting Summary.
+* strftime function (gawk): Time Functions.
* string constants: Scalar Constants.
+* string constants, vs. regexp constants: Computed Regexps.
* string extraction (internationalization): String Extraction.
* string operators: Concatenation.
* string-matching operators: Regexp Usage.
-* strtonum built-in function: String Functions.
-* sub built-in function: String Functions.
-* sub, escape processing: Gory Details.
-* sub, third argument of: String Functions.
-* subscripts in arrays: Multi-dimensional.
-* SUBSEP variable <1>: Multi-dimensional.
+* strings: Internals.
+* strings, converting: Conversion.
+* strings, converting, numbers to <1>: Bitwise Functions.
+* strings, converting, numbers to: User-modified.
+* strings, empty, See null strings: Records.
+* strings, extracting: String Extraction.
+* strings, for localization: Programmer i18n.
+* strings, length of: Scalar Constants.
+* strings, merging arrays into: Join Function.
+* strings, NODE internal type: Internals.
+* strings, null: Regexp Field Splitting.
+* strings, numeric: Typing and Comparison.
+* strings, splitting: String Functions.
+* strtonum function (gawk): String Functions.
+* strtonum function (gawk), --non-decimal-data option and: Nondecimal Data.
+* sub function <1>: String Functions.
+* sub function: Using Constant Regexps.
+* sub function, arguments of: String Functions.
+* sub function, escape processing: Gory Details.
+* subscript separators: User-modified.
+* subscripts in arrays, multidimensional: Multi-dimensional.
+* subscripts in arrays, multidimensional, scanning: Multi-scanning.
+* subscripts in arrays, numbers as: Numeric Array Subscripts.
+* subscripts in arrays, uninitialized variables as: Uninitialized Subscripts.
* SUBSEP variable: User-modified.
-* substr built-in function: String Functions.
-* subtraction: Arithmetic Ops.
+* SUBSEP variable, multidimensional arrays: Multi-dimensional.
+* substr function: String Functions.
* Sumner, Andrew: Other Versions.
* syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops.
-* system built-in function: I/O Functions.
-* systime built-in function: Time Functions.
+* system function: I/O Functions.
+* systime function (gawk): Time Functions.
* tandem: Tandem Installation.
* Tcl: Library Names.
-* TCP/IP networking <1>: Portal Files.
-* TCP/IP networking: TCP/IP Networking.
+* TCP/IP: TCP/IP Networking.
+* TCP/IP, support for: Special Network.
* tee utility: Tee Program.
* tee.awk program: Tee Program.
-* terminator, record: Records.
+* terminating records: Records.
* testbits.awk program: Bitwise Functions.
* Texinfo <1>: Adding Code.
* Texinfo <2>: Distribution contents.
* Texinfo <3>: Extract Program.
* Texinfo <4>: Dupword Program.
* Texinfo <5>: Library Functions.
-* Texinfo <6>: Regexp Operators.
-* Texinfo <7>: Sample Data Files.
-* Texinfo <8>: Acknowledgments.
+* Texinfo <6>: Sample Data Files.
* Texinfo: Conventions.
-* textdomain C library function: Explaining gettext.
+* Texinfo, chapter beginnings in files: Regexp Operators.
+* Texinfo, extracting programs from source files: Extract Program.
+* text, printing: Print.
+* text, printing, unduplicated lines of: Uniq Program.
+* textdomain function (C library): Explaining gettext.
* TEXTDOMAIN variable <1>: Programmer i18n.
* TEXTDOMAIN variable: User-modified.
-* time of day: Time Functions.
+* TEXTDOMAIN variable, BEGIN pattern and: Programmer i18n.
+* TEXTDOMAIN variable, portability and: I18N Portability.
+* tilde (~), ~ operator <1>: Expression Patterns.
+* tilde (~), ~ operator <2>: Precedence.
+* tilde (~), ~ operator <3>: Typing and Comparison.
+* tilde (~), ~ operator <4>: Regexp Constants.
+* tilde (~), ~ operator <5>: Computed Regexps.
+* tilde (~), ~ operator <6>: Case-sensitivity.
+* tilde (~), ~ operator: Regexp Usage.
+* time, alarm clock example program: Alarm Program.
+* time, localization and: Explaining gettext.
+* time, managing: Gettimeofday Function.
+* time, retrieving: Time Functions.
* timestamps: Time Functions.
-* timestamps, converting from dates: Time Functions.
+* timestamps, converting dates to: Time Functions.
* timestamps, formatted: Gettimeofday Function.
* tmp_number internal function: Internals.
* tmp_string internal function: Internals.
-* tolower built-in function: String Functions.
-* Torvalds, Linus: Manual History.
-* toupper built-in function: String Functions.
+* tolower function: String Functions.
+* toupper function: String Functions.
* tr utility: Translate Program.
* translate.awk program: Translate Program.
+* troubleshooting, --non-decimal-data option: Options.
+* troubleshooting, -F option: Known Bugs.
+* troubleshooting, == operator: Typing and Comparison.
+* troubleshooting, awk uses FS not IFS: Field Separators.
+* troubleshooting, backslash before nonspecial character: Escape Sequences.
+* troubleshooting, division: Arithmetic Ops.
+* troubleshooting, fatal errors, field widths, specifying: Constant Size.
+* troubleshooting, fatal errors, printf format strings: Format Modifiers.
+* troubleshooting, fflush function: I/O Functions.
+* troubleshooting, function call syntax: Function Calls.
+* troubleshooting, gawk <1>: Compatibility Mode.
+* troubleshooting, gawk: Known Bugs.
+* troubleshooting, gawk, bug reports: Bugs.
+* troubleshooting, gawk, fatal errors, function arguments: Calling Built-in.
+* troubleshooting, getline function: File Checking.
+* troubleshooting, gsub/sub functions: String Functions.
+* troubleshooting, match function: String Functions.
+* troubleshooting, print statement, omitting commas: Print Examples.
+* troubleshooting, printing: Redirection.
+* troubleshooting, quotes with file names: Special FD.
+* troubleshooting, readable data files: File Checking.
+* troubleshooting, regexp constants vs. string constants: Computed Regexps.
+* troubleshooting, string concatenation: Concatenation.
+* troubleshooting, substr function: String Functions.
+* troubleshooting, system function: I/O Functions.
+* troubleshooting, typographical errors, global variables: Options.
+* true, logical: Truth Values.
* Trueman, David <1>: Contributors.
* Trueman, David <2>: Acknowledgments.
* Trueman, David: History.
+* trunc-mod operation: Arithmetic Ops.
* truth values: Truth Values.
-* two-way I/O: Two-way I/O.
* type conversion: Conversion.
* type internal variable: Internals.
-* types of variables <1>: Typing and Comparison.
-* types of variables: Assignment Ops.
* undefined functions: Function Caveats.
+* underscore (_), _ C macro: Explaining gettext.
+* underscore (_), in names of private variables: Library Names.
+* underscore (_), translatable string: Programmer i18n.
* undocumented features: Undocumented.
* uninitialized variables, as array subscripts: Uninitialized Subscripts.
* uniq utility: Uniq Program.
* uniq.awk program: Uniq Program.
* Unix: Glossary.
-* Unix awk, source code: Other Versions.
+* Unix awk, backslashes in escape sequences: Escape Sequences.
+* Unix awk, close function and: Close Files And Pipes.
+* Unix awk, password files, field separators and: Command Line Field Separator.
+* Unix, awk scripts and: Executable Scripts.
* unsigned integers: Basic Data Typing.
* update_ERRNO internal function: Internals.
-* use of comments: Comments.
-* user information: Passwd Functions.
-* user-defined functions: User-defined.
-* user-defined variables: Using Variables.
-* uses of awk <1>: When.
-* uses of awk: Preface.
-* uses of gawk: Preface.
-* using shell variables in awk programs: Using Shell Variables.
-* using this book: This Manual.
+* user database, reading: Passwd Functions.
+* user-defined, functions: User-defined.
+* user-defined, functions, counts: Profiling.
+* user-defined, variables: Variables.
+* user-modifiable variables: User-modified.
+* users, information about, printing: Id Program.
+* users, information about, retrieving: Passwd Functions.
* USR1 signal: Profiling.
-* values of characters as numbers: Ordinal Functions.
* values, numeric: Basic Data Typing.
* values, string: Basic Data Typing.
-* variable shadowing: Definition Syntax.
* variable typing: Typing and Comparison.
-* variable, definition of: Basic Data Typing.
-* variables, user-defined: Using Variables.
+* variables <1>: Basic Data Typing.
+* variables: Other Features.
+* variables, assigning on command line: Assignment Options.
+* variables, built-in <1>: Built-in Variables.
+* variables, built-in: Using Variables.
+* variables, built-in, -v option, setting with: Options.
+* variables, built-in, conveying information: Auto-set.
+* variables, flag: Boolean Ops.
+* variables, getline command into, using <1>: Getline/Variable/Coprocess.
+* variables, getline command into, using <2>: Getline/Variable/Pipe.
+* variables, getline command into, using <3>: Getline/Variable/File.
+* variables, getline command into, using: Getline/Variable.
+* variables, global, for library functions: Library Names.
+* variables, global, printing list of: Options.
+* variables, initializing: Using Variables.
+* variables, names of: Arrays.
+* variables, private: Library Names.
+* variables, setting: Options.
+* variables, shadowing: Definition Syntax.
+* variables, types of: Assignment Ops.
+* variables, types of, comparison expressions and: Typing and Comparison.
+* variables, uninitialized, as array subscripts: Uninitialized Subscripts.
+* variables, user-defined: Variables.
+* vertical bar (|): Regexp Operators.
+* vertical bar (|), | operator (I/O) <1>: Precedence.
+* vertical bar (|), | operator (I/O): Getline/Pipe.
+* vertical bar (|), |& I/O operator (I/O): Two-way I/O.
+* vertical bar (|), |& operator (I/O) <1>: Precedence.
+* vertical bar (|), |& operator (I/O): Getline/Coprocess.
+* vertical bar (|), |& operator (I/O), two-way communications: Portal Files.
+* vertical bar (|), || operator <1>: Precedence.
+* vertical bar (|), || operator: Boolean Ops.
* vname internal variable: Internals.
* w utility: Constant Size.
* Wall, Larry: Future Extensions.
-* warnings, automatic <1>: Options.
-* warnings, automatic <2>: I/O Functions.
-* warnings, automatic <3>: String Functions.
-* warnings, automatic <4>: Using Constant Regexps.
-* warnings, automatic <5>: Special Caveats.
-* warnings, automatic <6>: Special Process.
-* warnings, automatic: Escape Sequences.
+* warnings, issuing: Options.
* wc utility: Wc Program.
* wc.awk program: Wc Program.
* Weinberger, Peter <1>: Contributors.
* Weinberger, Peter: History.
-* while statement: While Statement.
+* while statement <1>: While Statement.
+* while statement: Regexp Usage.
+* whitespace, as field separators: Field Separators.
+* whitespace, functions, calling: Calling Built-in.
+* whitespace, newlines as: Options.
* Williams, Kent: Contributors.
* Woods, John: Contributors.
* word boundaries, matching: GNU Regexp Operators.
* word, regexp definition of: GNU Regexp Operators.
+* word-boundary operator (gawk): GNU Regexp Operators.
* wordfreq.awk program: Word Sorting.
+* words, counting: Wc Program.
+* words, duplicate, searching for: Dupword Program.
+* words, usage counts, generating: Word Sorting.
* xgettext utility: String Extraction.
* XOR bitwise operation: Bitwise Functions.
-* xor built-in function: Bitwise Functions.
+* xor function (gawk): Bitwise Functions.
* Zaretskii, Eli: Acknowledgments.
* zero, negative vs. positive: Floating Point Issues.
* Zoulas, Christos: Contributors.
-* | I/O operator <1>: Precedence.
-* | I/O operator <2>: Redirection.
-* | I/O operator: Getline/Pipe.
-* |& I/O operator <1>: Two-way I/O.
-* |& I/O operator <2>: Precedence.
-* |& I/O operator <3>: Redirection.
-* |& I/O operator: Getline/Coprocess.
-* || operator <1>: Precedence.
-* || operator: Boolean Ops.
-* ~ operator <1>: Precedence.
-* ~ operator <2>: Typing and Comparison.
-* ~ operator <3>: Regexp Constants.
-* ~ operator <4>: Computed Regexps.
-* ~ operator <5>: Case-sensitivity.
-* ~ operator: Regexp Usage.
+* {} (braces), actions and: Action Overview.
+* {} (braces), pgawk program: Profiling.
+* {} (braces), statements, grouping: Statements.
+* | (vertical bar): Regexp Operators.
+* | (vertical bar), | operator (I/O) <1>: Precedence.
+* | (vertical bar), | operator (I/O) <2>: Redirection.
+* | (vertical bar), | operator (I/O): Getline/Pipe.
+* | (vertical bar), |& operator (I/O) <1>: Two-way I/O.
+* | (vertical bar), |& operator (I/O) <2>: Precedence.
+* | (vertical bar), |& operator (I/O) <3>: Redirection.
+* | (vertical bar), |& operator (I/O): Getline/Coprocess.
+* | (vertical bar), |& operator (I/O), pipes, closing: Close Files And Pipes.
+* | (vertical bar), |& operator (I/O), two-way communications: Portal Files.
+* | (vertical bar), || operator <1>: Precedence.
+* | (vertical bar), || operator: Boolean Ops.
+* ~ (tilde), ~ operator <1>: Expression Patterns.
+* ~ (tilde), ~ operator <2>: Precedence.
+* ~ (tilde), ~ operator <3>: Typing and Comparison.
+* ~ (tilde), ~ operator <4>: Regexp Constants.
+* ~ (tilde), ~ operator <5>: Computed Regexps.
+* ~ (tilde), ~ operator: Case-sensitivity.

Tag Table:
-Node: Top1365
-Node: Foreword25650
-Node: Preface29974
-Ref: Preface-Footnote-132860
-Node: History33092
-Node: Names35352
-Ref: Names-Footnote-136853
-Node: This Manual36925
-Ref: This Manual-Footnote-142290
-Node: Conventions42397
-Node: Manual History44274
-Ref: Manual History-Footnote-148037
-Ref: Manual History-Footnote-248078
-Node: How To Contribute48152
-Node: Acknowledgments48750
-Node: Getting Started52540
-Node: Running gawk54933
-Node: One-shot56139
-Node: Read Terminal57398
-Ref: Read Terminal-Footnote-159051
-Node: Long59222
-Node: Executable Scripts60623
-Ref: Executable Scripts-Footnote-162359
-Ref: Executable Scripts-Footnote-262510
-Node: Comments62955
-Node: Quoting65349
-Node: Sample Data Files69331
-Node: Very Simple72427
-Node: Two Rules77034
-Node: More Complex79239
-Ref: More Complex-Footnote-182161
-Ref: More Complex-Footnote-282647
-Node: Statements/Lines82730
-Ref: Statements/Lines-Footnote-187094
-Node: Other Features87403
-Node: When88268
-Node: Regexp90257
-Node: Regexp Usage91648
-Node: Escape Sequences93713
-Node: Regexp Operators99658
-Ref: Regexp Operators-Footnote-1106811
-Ref: Regexp Operators-Footnote-2106957
-Node: Character Lists107055
-Node: GNU Regexp Operators111565
-Node: Case-sensitivity115046
-Ref: Case-sensitivity-Footnote-1118168
-Node: Leftmost Longest118403
-Node: Computed Regexps119717
-Node: Reading Files123108
-Node: Records124895
-Ref: Records-Footnote-1132790
-Node: Fields132827
-Ref: Fields-Footnote-1135886
-Node: Non-Constant Fields135972
-Node: Changing Fields138227
-Node: Field Separators142929
-Node: Regexp Field Splitting146473
-Node: Single Character Fields148974
-Node: Command Line Field Separator150037
-Node: Field Splitting Summary153467
-Ref: Field Splitting Summary-Footnote-1155571
-Node: Constant Size155672
-Node: Multiple Line160252
-Node: Getline165684
-Node: Plain Getline167748
-Node: Getline/Variable169804
-Node: Getline/File170964
-Node: Getline/Variable/File172389
-Node: Getline/Pipe173999
-Node: Getline/Variable/Pipe176195
-Node: Getline/Coprocess177411
-Node: Getline/Variable/Coprocess178683
-Node: Getline Notes179431
-Node: Getline Summary180780
-Node: Printing181485
-Node: Print183174
-Node: Print Examples184554
-Node: Output Separators187451
-Node: OFMT189267
-Node: Printf190669
-Node: Basic Printf191583
-Node: Control Letters193166
-Node: Format Modifiers195752
-Node: Printf Examples200802
-Node: Redirection203572
-Node: Special Files210306
-Node: Special FD210935
-Node: Special Process213978
-Node: Special Network216264
-Node: Special Caveats217177
-Ref: Special Caveats-Footnote-1218387
-Node: Close Files And Pipes218770
-Ref: Close Files And Pipes-Footnote-1225952
-Node: Expressions226100
-Node: Constants228288
-Node: Scalar Constants228984
-Ref: Scalar Constants-Footnote-1229845
-Node: Non-decimal-numbers230027
-Node: Regexp Constants233200
-Node: Using Constant Regexps233665
-Node: Variables236825
-Node: Using Variables237476
-Node: Assignment Options239017
-Node: Conversion240962
-Ref: Conversion-Footnote-1244196
-Node: Arithmetic Ops244305
-Node: Concatenation246802
-Node: Assignment Ops249497
-Node: Increment Ops255817
-Node: Truth Values259304
-Node: Typing and Comparison260350
-Ref: Typing and Comparison-Footnote-1266904
-Node: Boolean Ops267049
-Node: Conditional Exp271158
-Node: Function Calls272954
-Node: Precedence275921
-Node: Patterns and Actions279365
-Node: Pattern Overview280418
-Node: Regexp Patterns282034
-Node: Expression Patterns282593
-Node: Ranges286199
-Node: BEGIN/END289297
-Node: Using BEGIN/END290037
-Ref: Using BEGIN/END-Footnote-1292821
-Node: I/O And BEGIN/END292927
-Node: Empty295266
-Node: Using Shell Variables295566
-Node: Action Overview297926
-Node: Statements300510
-Node: If Statement302216
-Node: While Statement303723
-Node: Do Statement305746
-Node: For Statement306887
-Node: Break Statement310075
-Node: Continue Statement312179
-Node: Next Statement314127
-Node: Nextfile Statement316496
-Node: Exit Statement319250
-Node: Built-in Variables321359
-Node: User-modified322455
-Ref: User-modified-Footnote-1330031
-Node: Auto-set330093
-Ref: Auto-set-Footnote-1338167
-Node: ARGC and ARGV338372
-Node: Arrays342234
-Node: Array Intro344164
-Node: Reference to Elements348432
-Node: Assigning Elements350323
-Node: Array Example350785
-Node: Scanning an Array352508
-Node: Delete354839
-Ref: Delete-Footnote-1357290
-Node: Numeric Array Subscripts357347
-Node: Uninitialized Subscripts359626
-Node: Multi-dimensional361248
-Node: Multi-scanning364298
-Node: Array Sorting365968
-Node: Functions368782
-Node: Built-in369519
-Node: Calling Built-in370502
-Node: Numeric Functions372481
-Ref: Numeric Functions-Footnote-1376235
-Ref: Numeric Functions-Footnote-2376561
-Node: String Functions376831
-Ref: String Functions-Footnote-1393299
-Ref: String Functions-Footnote-2393460
-Node: Gory Details393544
-Ref: Gory Details-Footnote-1400132
-Ref: Gory Details-Footnote-2400183
-Node: I/O Functions400390
-Ref: I/O Functions-Footnote-1407133
-Node: Time Functions407224
-Ref: Time Functions-Footnote-1418026
-Ref: Time Functions-Footnote-2418098
-Ref: Time Functions-Footnote-3418257
-Ref: Time Functions-Footnote-4418368
-Ref: Time Functions-Footnote-5418493
-Ref: Time Functions-Footnote-6418752
-Node: Bitwise Functions419017
-Ref: Bitwise Functions-Footnote-1423725
-Node: I18N Functions423909
-Node: User-defined425173
-Node: Definition Syntax425949
-Node: Function Example430340
-Node: Function Caveats432982
-Node: Return Statement436894
-Node: Dynamic Typing439564
-Node: Internationalization440300
-Node: I18N and L10N441718
-Node: Explaining gettext442427
-Ref: Explaining gettext-Footnote-1447361
-Ref: Explaining gettext-Footnote-2447600
-Node: Programmer i18n447766
-Node: Translator i18n451569
-Node: String Extraction452354
-Ref: String Extraction-Footnote-1453304
-Node: Printf Ordering453501
-Ref: Printf Ordering-Footnote-1456293
-Node: I18N Portability456357
-Ref: I18N Portability-Footnote-1458617
-Node: I18N Example458680
-Ref: I18N Example-Footnote-1461302
-Node: Gawk I18N461374
-Node: Advanced Features462202
-Node: Non-decimal Data463636
-Node: Two-way I/O465248
-Ref: Two-way I/O-Footnote-1469889
-Node: TCP/IP Networking469966
-Node: Portal Files472445
-Node: Profiling473108
-Node: Invoking Gawk480308
-Node: Command Line481485
-Node: Options482284
-Ref: Options-Footnote-1494190
-Node: Other Arguments494215
-Node: AWKPATH Variable496967
-Ref: AWKPATH Variable-Footnote-1499758
-Node: Obsolete500017
-Node: Undocumented501098
-Node: Known Bugs501350
-Node: Library Functions501969
-Ref: Library Functions-Footnote-1505152
-Node: Library Names505323
-Ref: Library Names-Footnote-1508932
-Ref: Library Names-Footnote-2509152
-Node: General Functions509238
-Node: Nextfile Function510174
-Node: Assert Function514638
-Node: Round Function517974
-Node: Cliff Random Function519529
-Ref: Cliff Random Function-Footnote-1520512
-Node: Ordinal Functions520583
-Ref: Ordinal Functions-Footnote-1523661
-Node: Join Function523877
-Ref: Join Function-Footnote-1525682
-Node: Gettimeofday Function525882
-Node: Data File Management529660
-Node: Filetrans Function530220
-Node: Rewind Function533772
-Node: File Checking535396
-Node: Ignoring Assigns536442
-Node: Getopt Function538026
-Ref: Getopt Function-Footnote-1549173
-Node: Passwd Functions549374
-Ref: Passwd Functions-Footnote-1558085
-Node: Group Functions558173
-Node: Sample Programs566271
-Node: Running Examples567001
-Node: Clones567772
-Node: Cut Program568897
-Node: Egrep Program578768
-Ref: Egrep Program-Footnote-1586632
-Node: Id Program586742
-Node: Split Program590434
-Node: Tee Program593950
-Node: Uniq Program596621
-Node: Wc Program604115
-Ref: Wc Program-Footnote-1608430
-Node: Miscellaneous Programs608654
-Node: Dupword Program609643
-Node: Alarm Program611699
-Node: Translate Program616315
-Ref: Translate Program-Footnote-1620617
-Ref: Translate Program-Footnote-2620854
-Node: Labels Program620988
-Ref: Labels Program-Footnote-1624355
-Node: Word Sorting624439
-Node: History Sorting628742
-Node: Extract Program630612
-Node: Simple Sed638193
-Node: Igawk Program641394
-Ref: Igawk Program-Footnote-1654472
-Node: Language History654610
-Node: V7/SVR3.1655977
-Node: SVR4658572
-Node: POSIX660219
-Node: BTL662007
-Node: POSIX/GNU663824
-Node: Contributors672461
-Node: Installation675554
-Node: Gawk Distribution676533
-Node: Getting677033
-Node: Extracting678270
-Node: Distribution contents679650
-Node: Unix Installation685262
-Node: Quick Installation685848
-Node: Additional Configuration Options687595
-Node: Configuration Philosophy688708
-Node: Non-Unix Installation691091
-Node: Amiga Installation691673
-Node: BeOS Installation692818
-Node: PC Installation693990
-Node: PC Binary Installation695019
-Node: PC Compiling696017
-Node: PC Using697840
-Node: VMS Installation701526
-Node: VMS Compilation702045
-Node: VMS Installation Details703634
-Node: VMS Running705251
-Node: VMS POSIX706835
-Node: Unsupported708099
-Node: Atari Installation708497
-Node: Atari Compiling709818
-Node: Atari Using711747
-Node: Tandem Installation714611
-Node: Bugs716417
-Node: Other Versions719667
-Ref: Other Versions-Footnote-1723253
-Node: Notes723295
-Node: Compatibility Mode723968
-Node: Additions724809
-Node: Adding Code725581
-Node: New Ports731627
-Node: Dynamic Extensions735742
-Node: Internals736758
-Node: Sample Library743097
-Node: Internal File Description743747
-Node: Internal File Ops747499
-Ref: Internal File Ops-Footnote-1752915
-Node: Using Internal File Ops753063
-Node: Future Extensions755084
-Node: Basic Concepts759427
-Node: Basic High Level760165
-Ref: Basic High Level-Footnote-1764332
-Node: Basic Data Typing764526
-Node: Floating Point Issues769020
-Ref: Floating Point Issues-Footnote-1772943
-Ref: Floating Point Issues-Footnote-2772994
-Node: Glossary773103
-Node: Copying797415
-Node: GNU Free Documentation License816614
-Node: Index836506
+Node: Top353
+Node: Foreword26454
+Node: Preface30778
+Ref: Preface-Footnote-133660
+Node: History33892
+Node: Names36151
+Ref: Names-Footnote-137660
+Node: This Manual37732
+Ref: This Manual-Footnote-142925
+Node: Conventions43025
+Node: Manual History44902
+Ref: Manual History-Footnote-148588
+Ref: Manual History-Footnote-248629
+Node: How To Contribute48703
+Node: Acknowledgments49301
+Node: Getting Started53106
+Node: Running gawk55499
+Node: One-shot56704
+Node: Read Terminal57961
+Ref: Read Terminal-Footnote-159610
+Node: Long59781
+Node: Executable Scripts61182
+Ref: Executable Scripts-Footnote-162918
+Ref: Executable Scripts-Footnote-263069
+Node: Comments63520
+Node: Quoting65912
+Node: Sample Data Files69890
+Node: Very Simple72968
+Node: Two Rules77588
+Node: More Complex79787
+Ref: More Complex-Footnote-182710
+Ref: More Complex-Footnote-283186
+Node: Statements/Lines83269
+Ref: Statements/Lines-Footnote-187628
+Node: Other Features87937
+Node: When88802
+Node: Regexp90791
+Node: Regexp Usage92181
+Node: Escape Sequences94272
+Node: Regexp Operators100184
+Ref: Regexp Operators-Footnote-1107325
+Ref: Regexp Operators-Footnote-2107472
+Node: Character Lists107570
+Node: GNU Regexp Operators112039
+Node: Case-sensitivity115534
+Ref: Case-sensitivity-Footnote-1118659
+Node: Leftmost Longest118894
+Node: Computed Regexps120208
+Node: Reading Files123599
+Node: Records125385
+Ref: Records-Footnote-1133263
+Node: Fields133300
+Ref: Fields-Footnote-1136355
+Node: Nonconstant Fields136441
+Node: Changing Fields138693
+Node: Field Separators143403
+Node: Regexp Field Splitting146947
+Node: Single Character Fields149448
+Node: Command Line Field Separator150511
+Node: Field Splitting Summary153962
+Ref: Field Splitting Summary-Footnote-1156065
+Node: Constant Size156166
+Node: Multiple Line160740
+Node: Getline166171
+Node: Plain Getline168234
+Node: Getline/Variable170284
+Node: Getline/File171416
+Node: Getline/Variable/File172841
+Node: Getline/Pipe174464
+Node: Getline/Variable/Pipe176671
+Node: Getline/Coprocess177887
+Node: Getline/Variable/Coprocess179161
+Node: Getline Notes179909
+Node: Getline Summary181258
+Node: Printing181965
+Node: Print183679
+Node: Print Examples185060
+Node: Output Separators187957
+Node: OFMT189773
+Node: Printf191175
+Node: Basic Printf192089
+Node: Control Letters193673
+Node: Format Modifiers196260
+Node: Printf Examples201312
+Node: Redirection204082
+Node: Special Files210806
+Node: Special FD211435
+Node: Special Process214474
+Node: Special Network216760
+Node: Special Caveats217675
+Ref: Special Caveats-Footnote-1218885
+Node: Close Files And Pipes219268
+Ref: Close Files And Pipes-Footnote-1226450
+Node: Expressions226598
+Node: Constants228786
+Node: Scalar Constants229482
+Ref: Scalar Constants-Footnote-1230346
+Node: Nondecimal-numbers230528
+Node: Regexp Constants233704
+Node: Using Constant Regexps234168
+Node: Variables237328
+Node: Using Variables237979
+Node: Assignment Options239520
+Node: Conversion241460
+Ref: Conversion-Footnote-1244691
+Node: Arithmetic Ops244800
+Node: Concatenation247297
+Node: Assignment Ops249992
+Node: Increment Ops256308
+Node: Truth Values259796
+Node: Typing and Comparison260841
+Ref: Typing and Comparison-Footnote-1267395
+Node: Boolean Ops267540
+Node: Conditional Exp271648
+Node: Function Calls273444
+Node: Precedence276417
+Node: Patterns and Actions279861
+Node: Pattern Overview280914
+Node: Regexp Patterns282527
+Node: Expression Patterns283086
+Node: Ranges286692
+Node: BEGIN/END289793
+Node: Using BEGIN/END290533
+Ref: Using BEGIN/END-Footnote-1293318
+Node: I/O And BEGIN/END293432
+Node: Empty295771
+Node: Using Shell Variables296070
+Node: Action Overview298430
+Node: Statements300996
+Node: If Statement302702
+Node: While Statement304211
+Node: Do Statement306234
+Node: For Statement307374
+Node: Break Statement310562
+Node: Continue Statement312666
+Node: Next Statement314605
+Node: Nextfile Statement316994
+Node: Exit Statement319748
+Node: Built-in Variables321857
+Node: User-modified322947
+Ref: User-modified-Footnote-1330533
+Node: Auto-set330595
+Ref: Auto-set-Footnote-1338618
+Node: ARGC and ARGV338823
+Node: Arrays342685
+Node: Array Intro344615
+Node: Reference to Elements348885
+Node: Assigning Elements350770
+Node: Array Example351232
+Node: Scanning an Array352955
+Node: Delete355279
+Ref: Delete-Footnote-1357729
+Node: Numeric Array Subscripts357786
+Node: Uninitialized Subscripts360065
+Node: Multi-dimensional361687
+Node: Multi-scanning364734
+Node: Array Sorting366406
+Node: Functions369220
+Node: Built-in369954
+Node: Calling Built-in370937
+Node: Numeric Functions372912
+Ref: Numeric Functions-Footnote-1376652
+Ref: Numeric Functions-Footnote-2376978
+Node: String Functions377247
+Ref: String Functions-Footnote-1393843
+Ref: String Functions-Footnote-2394002
+Node: Gory Details394089
+Ref: Gory Details-Footnote-1400676
+Ref: Gory Details-Footnote-2400727
+Node: I/O Functions400934
+Ref: I/O Functions-Footnote-1407611
+Node: Time Functions407702
+Ref: Time Functions-Footnote-1418476
+Ref: Time Functions-Footnote-2418544
+Ref: Time Functions-Footnote-3418702
+Ref: Time Functions-Footnote-4418813
+Ref: Time Functions-Footnote-5418938
+Ref: Time Functions-Footnote-6419197
+Node: Bitwise Functions419459
+Ref: Bitwise Functions-Footnote-1424157
+Node: I18N Functions424341
+Node: User-defined426085
+Node: Definition Syntax426861
+Node: Function Example431253
+Node: Function Caveats433894
+Node: Return Statement437794
+Node: Dynamic Typing440452
+Node: Internationalization441190
+Node: I18N and L10N442608
+Node: Explaining gettext443317
+Ref: Explaining gettext-Footnote-1448253
+Ref: Explaining gettext-Footnote-2448492
+Node: Programmer i18n448661
+Node: Translator i18n453007
+Node: String Extraction453792
+Ref: String Extraction-Footnote-1454794
+Node: Printf Ordering454920
+Ref: Printf Ordering-Footnote-1457711
+Node: I18N Portability457775
+Ref: I18N Portability-Footnote-1460213
+Node: I18N Example460276
+Ref: I18N Example-Footnote-1462913
+Node: Gawk I18N462985
+Node: Advanced Features463807
+Node: Nondecimal Data465239
+Node: Two-way I/O466846
+Ref: Two-way I/O-Footnote-1471508
+Node: TCP/IP Networking471585
+Node: Portal Files474048
+Node: Profiling474711
+Node: Invoking Gawk482337
+Node: Command Line483514
+Node: Options484314
+Ref: Options-Footnote-1496204
+Node: Other Arguments496229
+Node: AWKPATH Variable498981
+Ref: AWKPATH Variable-Footnote-1501764
+Node: Obsolete502024
+Node: Undocumented503105
+Node: Known Bugs503357
+Node: Library Functions503976
+Ref: Library Functions-Footnote-1507160
+Node: Library Names507331
+Ref: Library Names-Footnote-1510940
+Ref: Library Names-Footnote-2511159
+Node: General Functions511245
+Node: Nextfile Function512181
+Node: Assert Function516646
+Node: Round Function519977
+Node: Cliff Random Function521536
+Ref: Cliff Random Function-Footnote-1522519
+Node: Ordinal Functions522590
+Ref: Ordinal Functions-Footnote-1525664
+Node: Join Function525880
+Ref: Join Function-Footnote-1527684
+Node: Gettimeofday Function527884
+Node: Data File Management531662
+Node: Filetrans Function532223
+Node: Rewind Function535774
+Node: File Checking537398
+Node: Ignoring Assigns538444
+Node: Getopt Function540028
+Ref: Getopt Function-Footnote-1551177
+Node: Passwd Functions551378
+Ref: Passwd Functions-Footnote-1560100
+Node: Group Functions560188
+Node: Sample Programs568287
+Node: Running Examples569017
+Node: Clones569788
+Node: Cut Program570913
+Node: Egrep Program580778
+Ref: Egrep Program-Footnote-1588643
+Node: Id Program588753
+Node: Split Program592438
+Node: Tee Program595947
+Node: Uniq Program598618
+Node: Wc Program606128
+Ref: Wc Program-Footnote-1610442
+Node: Miscellaneous Programs610664
+Node: Dupword Program611653
+Node: Alarm Program613704
+Node: Translate Program618328
+Ref: Translate Program-Footnote-1622644
+Ref: Translate Program-Footnote-2622881
+Node: Labels Program623015
+Ref: Labels Program-Footnote-1626372
+Node: Word Sorting626456
+Node: History Sorting630759
+Node: Extract Program632628
+Node: Simple Sed640210
+Node: Igawk Program643407
+Ref: Igawk Program-Footnote-1656434
+Node: Language History656572
+Node: V7/SVR3.1657939
+Node: SVR4660534
+Node: POSIX662181
+Node: BTL663969
+Node: POSIX/GNU665786
+Node: Contributors674410
+Node: Installation677662
+Node: Gawk Distribution678641
+Node: Getting679141
+Node: Extracting680387
+Node: Distribution contents681766
+Node: Unix Installation687363
+Node: Quick Installation687949
+Node: Additional Configuration Options689696
+Node: Configuration Philosophy690791
+Node: Non-Unix Installation693174
+Node: Amiga Installation693756
+Node: BeOS Installation694901
+Node: PC Installation696073
+Node: PC Binary Installation697206
+Node: PC Compiling699060
+Node: PC Using703514
+Node: Cygwin708232
+Ref: Cygwin-Footnote-1709245
+Node: VMS Installation709277
+Node: VMS Compilation709796
+Node: VMS Installation Details711385
+Node: VMS Running713002
+Node: VMS POSIX714586
+Node: Unsupported715850
+Node: Atari Installation716248
+Node: Atari Compiling717569
+Node: Atari Using719498
+Node: Tandem Installation722362
+Node: Bugs724168
+Node: Other Versions727453
+Ref: Other Versions-Footnote-1731039
+Node: Notes731081
+Node: Compatibility Mode731754
+Node: Additions732596
+Node: Adding Code733368
+Node: New Ports739410
+Node: Dynamic Extensions743513
+Node: Internals744529
+Node: Sample Library750865
+Node: Internal File Description751515
+Node: Internal File Ops755267
+Ref: Internal File Ops-Footnote-1760683
+Node: Using Internal File Ops760831
+Node: Future Extensions762852
+Node: Basic Concepts767195
+Node: Basic High Level767933
+Ref: Basic High Level-Footnote-1772094
+Node: Basic Data Typing772288
+Node: Floating Point Issues776778
+Ref: Floating Point Issues-Footnote-1780701
+Ref: Floating Point Issues-Footnote-2780753
+Node: Glossary780862
+Node: Copying805171
+Node: GNU Free Documentation License824368
+Node: Index844250

End Tag Table