Created
January 22, 2016 11:05
-
-
Save soardex/cf30a8d0673ba1e9f4d3 to your computer and use it in GitHub Desktop.
Awk Internal Variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FILENAME: References the current input file. | |
FNR: References the number of the current record relative to the current input file. For instance, if you have two input files, this would tell you the record number of each file instead of as a total. | |
FS: The current field separator used to denote each field in a record. By default, this is set to whitespace. | |
NF: The number of fields in the current record. | |
NR: The number of the current record. | |
OFS: The field separator for the outputted data. By default, this is set to whitespace. | |
ORS: The record separator for the outputted data. By default, this is a newline character. | |
RS: The record separator used to distinguish separate records in the input file. By default, this is a newline character. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment