| Version | Variable | Description |
|---|---|---|
| awk | FILENAME | Current filename. |
| FS | Field separator (default is a blank). | |
| NF | Number of fields in current record. | |
| NR | Number of the current record. | |
| OFS | Output field separator (default is a blank). | |
| ORS | Output record separator (default is a newline). | |
| RS | Record separator (default is a newline). | |
| $0 | Entire input record. | |
$
n
|
|
|
| nawk | ARGC | Number of arguments on command line. |
| ARGV | An array containing the command-line arguments. | |
| FNR | Like NR, but relative to the current file. | |
| OFMT | Output format for numbers (default is %.6g). | |
| RSTART | First position in the string matched by match function. | |
| RLENGTH | Length of the string matched by match function. | |
| SUBSEP | Separator character for array subscripts (default is \034). | |
| gawk | ENVIRON | An associative array of environment variables. |
| IGNORECASE | An associative array of environment variables. |