awk built-in variables

Variables awk sets for every line: NR counts records read, NF counts fields, FS splits input and OFS joins output.

In more detail

awk 'NR > 1' skips a header line, and setting OFS=, makes print separate fields with commas. They save cutting columns with a second command.

Related terms

Taught in

References

Certification courses