cut

1.cut  remove sections from each line of files (把每行中符合条件的一部分拿出来)

usage:

    cut  [-bn] [file] 或 cut [-c] [file]  或  cut [-df] [file]

    -b 字节分割

    -c 字符分割

    -d 自定义分割符

    -f 与-d一起使用,显示制定区域

    -n 取消分割多字节字符。仅和 -b 标志一起使用。

examples:

      cat a.txt |cut -bn 1-3,5

      cat b.txt|cut -d ' ' -f 2-3,7

  

    

 

原文地址:https://www.cnblogs.com/jycjy/p/8251674.html