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 ... |
Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.