cut Flashcards
cut
Print selected parts of lines from each FILE to standard output.
cut
- b
- c
- d
- f
- s
- b, –bytes=LIST, Select only these bytes.
- c, –characters=LIST, Select only these characters.
- d, –delimiter=DELIM, Use DELIM instead of TAB for field delimiter.
- f, –fields=LIST, Select only these fields; also print any line that contains no delimiter character, unless the -s option is specified.
- s, –only-delimited, Do not print lines not containing delimiters.
cut
–complement
–output-delimiter=STRING
-z
–complement, Complement the set of selected bytes, characters or fields.
–output-delimiter=STRING, Use STRING as the output delimiter the default is to use the input delimiter.
-z, –zero-terminated
cut [-bcf LIST]
Each LIST is made up of one range, or many ranges separated by commas.
Selected input is written in the same order that it is read. Each range is one of:
N N’th byte, character or field, counted from 1
N- from N’th byte, character or field, to end of line
N-M from N’th to M’th (included) byte, character or field
-M from first to M’th (included) byte, character or field