
awk(1) | awk(1) |
an element of ARGV to null means that it will not be treated as an input ®le. The name - indicates the standard input. If an argument matches the format of an assignment operand, this argument will be treated as an assignment rather than a ®le argument.
ENVIRON Array of environment variables; subscripts are names. For example, if environment variable V=thing, ENVIRON["V"] produces thing.
RSTART The starting position of the string matched by the match function, numbering from 1. This is always equivalent to the return value of the match function.
RLENGTH | The length of the string matched by the match function. |
Functions can be de®ned (at the position of a
function foo(a, b, c) { ...; return x }
Parameters are passed by value if scalar, and by reference if array name. Functions can be called recur- sively. Parameters are local to the function; all other variables are global.
Note that if
length > 72
The same pattern action statement used as an argument to the awk command is quoted in this manner:
awk 'length > 72'
EXTERNAL INFLUENCES
Environment Variables
LANG Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the default value of "C" (see lang(5)) is used. If any of the internationalization variables contains an invalid setting, awk will behave as if all internationalization variables are set to "C". See environ(5).
LC_ALL If set to a
LC_CTYPE Determines the interpretation of text as single and/or
LC_NUMERIC Determines the radix character used when interpreting numeric input, performing conversion between numeric and string values and formatting numeric output. Regardless of locale, the period character (the
LC_COLLATE Determines the locale for the behavior of ranges, equivalence classes and
LC_MESSAGES
Determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error and informative messages written to standard output.
NLSPATH | Determines the location of message catalogues for the processing of LC_MESSAGES. |
PATH | Determines the search path when looking for commands executed by system(cmd) , or |
| input and output pipes. |
In addition, all environment variables will be visible via the awk variable ENVIRON.
International Code Set Support
Single- and
a
− 4 − | Section 1−37 |