May 2017
Beginner
552 pages
28h 47m
English
By default, the delimiter for fields is a space. The -F option defines a different field delimiter.
$ awk -F: '{ print $NF }' /etc/passwd
Or:
awk 'BEGIN { FS=":" } { print $NF }' /etc/passwd
We can set the output field separator by setting OFS="delimiter" in the BEGIN block.