Go forward to Arrays Summary.
Go backward to Fields Summary.
Go up to Variables/Fields.
Built-in Variables
------------------
`awk''s built-in variables are:
`ARGC'
The number of command line arguments (not including options or the
`awk' program itself).
`ARGIND'
The index in `ARGV' of the current file being processed. It is
always true that `FILENAME == ARGV[ARGIND]'.
`ARGV'
The array of command line arguments. The array is indexed from 0
to `ARGC' - 1. Dynamically changing the contents of `ARGV' can
control the files used for data.
`CONVFMT'
The conversion format to use when converting numbers to strings.
`FIELDWIDTHS'
A space separated list of numbers describing the fixed-width input
data.
`ENVIRON'
An array containing the values of the environment variables. The
array is indexed by variable name, each element being the value of
that variable. Thus, the environment variable `HOME' would be in
`ENVIRON["HOME"]'. Its value might be `/u/close'.
Changing this array does not affect the environment seen by
programs which `gawk' spawns via redirection or the `system'
function. (This may change in a future version of `gawk'.)
Some operating systems do not have environment variables. The
array `ENVIRON' is empty when running on these systems.
`ERRNO'
The system error message when an error occurs using `getline' or
`close'.
`FILENAME'
The name of the current input file. If no files are specified on
the command line, the value of `FILENAME' is `-'.
`FNR'
The input record number in the current input file.
`FS'
The input field separator, a blank by default.
`IGNORECASE'
The case-sensitivity flag for regular expression operations. If
`IGNORECASE' has a nonzero value, then pattern matching in rules,
field splitting with `FS', regular expression matching with `~'
and `!~', and the `gsub', `index', `match', `split' and `sub'
predefined functions all ignore case when doing regular expression
operations.
`NF'
The number of fields in the current input record.
`NR'
The total number of input records seen so far.
`OFMT'
The output format for numbers for the `print' statement, `"%.6g"'
by default.
`OFS'
The output field separator, a blank by default.
`ORS'
The output record separator, by default a newline.
`RS'
The input record separator, by default a newline. `RS' is
exceptional in that only the first character of its string value
is used for separating records. If `RS' is set to the null
string, then records are separated by blank lines. When `RS' is
set to the null string, then the newline character always acts as
a field separator, in addition to whatever value `FS' may have.
`RSTART'
The index of the first character matched by `match'; 0 if no match.
`RLENGTH'
The length of the string matched by `match'; -1 if no match.
`SUBSEP'
The string used to separate multiple subscripts in array elements,
by default `"\034"'.
See Built-in Variables, for more information.