Bash The cut command Extracting, not manipulating


Example

You can only extract portions of lines, not reorder or repeat fields.

$ cut -d, -f2,1 <<<'John,Smith,USA' ## Just like -f1,2
John,Smith
$ cut -d, -f2,2 <<<'John,Smith,USA' ## Just like -f2
Smith