[其他]代码库
cut -- cut out selected portions of each line of a file
cut -b list [-n] [file ...]
cut -c list [file ...]
cut -f list [-d delim] [-s] [file ...]
The list option argument is a comma or whitespace separated set of numbers and/or number ranges.
-d delim
Use delim as the field delimiter character instead of the tab
character.
-f list
The list specifies fields, separated in the input by the field
delimiter character (see the -d option.) Output fields are
separated by a single occurrence of the field delimiter character.
-c list
The list specifies character positions.
example:
cut -d : -f 1 /etc/passwd | sort
who | cut -c 1-16,26-38