Cut command

The cut command has the feature of being able to cut characters and fields, with the possibility of using delimiters and other options, to finally extract selected from each file to standard output parties.

The cut command offers the following arguments;

-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

–complement complement the set of selected bytes, characters or fields

-s, –only-delimited do not print lines not containing delimiters

use STRING as the output delimiter the default is to use the input delimiter

–help display this help and exit

–version output version information and exit

Some example:

1 - Remove the first field in a delimited file screen by a space


2 - Remove the first and third display field in a delimited file by spaces :


3 - Take the first 4 characters of a file



more information cut

Leave a Reply

Your email address will not be published.