AWK · Lesson 3

Fields: $0, $1, NF, FS and OFS

Split records into fields, read them with $1 and $NF, change the input separator FS and the output separator OFS, and rebuild records.

Lessons · AWK · Lesson 3 of 10

Fields: $0, $1, NF, FS and OFS

Split records into fields, read them with $1 and $NF, change the input separator FS and the output separator OFS, and rebuild records.

Illustration for AWK
Split records into fields, read them with $1 and $NF, change the input separator FS and the output separator OFS, and rebuild records.