Built-in Variables
All awk variables are included in gawk.
|
Version |
Variable |
Description |
|
awk |
|
Number of arguments on the command line. |
|
|
An array containing the command-line
arguments, indexed from 0 to | |
|
|
String conversion format for numbers
( | |
|
|
An associative array of environment variables. | |
|
|
Current filename. | |
|
|
Like NR, but relative to the current file. | |
|
|
Field separator (a space). | |
|
|
Number of fields in current record. | |
|
|
Number of the current record. | |
|
|
Output format for numbers ( | |
|
|
Output field separator (a space). | |
|
|
Output record separator (a newline). | |
|
|
Length of the string matched by
| |
|
|
Record separator (a newline). | |
|
|
First position in the string matched
by | |
|
|
Separator character for array
subscripts ( | |
|
|
Entire input record. | |
|
|
nth field in
current record; fields are separated by | |
|
gawk |
|
Index in |
|
|
Controls binary I/O for input and
output files. Use values of | |
|
|
A string indicating the error when a
redirection fails for | |
|
|
A space-separated ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access