cut

remove sections from each line of files

cut Linux gobo 2.6.27.7-smp #2 SMP Thu Nov 20 22:32:43 CST 2008 i686 Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz GenuineIntel GNU/Linux using space as a delimiter on fields 1,3,11,12
copy
21
2
uname -a | cut -d" " -f1,3,11,12cut Linux gobo 2.6.27.7-smp #2 SMP Thu Nov 20 22:32:43 CST 2008 i686 Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz GenuineIntel GNU/Linux using space as a delimiter on fields 1,3,11,12

details |

Result:

Linux 2.6.27.7-smp 2008 i686

Options:

  • cut -f, cut --fields
    -f, --fields=LIST select only these fields; also print any line that contains no delimiter character, unless
  • cut -d, cut --delimiter
    -d, --delimiter=DELIM use DELIM instead of TAB for field delimiter