Select a list of columns or fields from one or more
Option -c or -f must be specified.
list is a sequence of integers. Use a comma between separate values
and a hyphen to specify a range (e.g., 1-10,15,20 or 50-).
See also paste, join, and newform.
Cut the column positions identified in
Use with -f to specify field delimiter as character
(default is tab); special characters (e.g., a space) must be quoted.
Cut the fields identified in
Use with -f to suppress lines without delimiters.
Extract usernames and real names from /etc/passwd:
cut -d: -f1,5 /etc/passwd
Find out who is logged on, but list only login names:
who | cut -d" " -f1
Cut characters in the fourth column of
file, and paste them
back as the first column in the same file:
file| paste -