Linux "cut" Command Line Options and Examples
remove sections from each line of files

Print selected parts of lines from each FILE to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too.


Usage:

cut OPTION... [FILE]...




Command Line Options:

-b
select only these bytes
cut -b ...
-c
select only these characters
cut -c ...
-d
use DELIM instead of TAB for field delimiter
cut -d ...
-f
select only these fields; also print any line that contains no delimiter character, unless the -s option is specified
cut -f ...
--complement
complement the set of selected bytes, characters or fields
cut --complement ...
-s
do not print lines not containing delimiters
cut -s ...
--output-delimiter
use STRING as the output delimiter the default is to use the input delimiter
cut --output-delimiter ...
-z
line delimiter is NUL, not newline
cut -z ...
--help
display this help and exit
cut --help ...
--version
output version information and exitUse one, and only one of -b, -c or -f. Each LIST is made up of one range, or many ranges separated by commas. Selected input iswritten in the same order that it is read, and is written exactly once. Each range is one of:N N'th byte, character or field, counted from 1
cut --version ...
-
character or field to end of line
cut - ...
-M
from N'th to M'th (included) byte, character or field
cut -M ...