cut命令使用

     cut -b list [-n] [file ...]
     cut -c list [file ...]
     cut -f list [-d delim] [-s] [file ...]

各个参数的含义:

     -b list
             The list specifies byte positions.
			 以字节为单位进行分割
			 
     -c list
             The list specifies character positions.
			 以字符为单位进行分割
			 
     -d delim
             Use delim as the field delimiter character instead of the tab character.
			 自定义分隔符,默认为制表符
			 
     -f list
             The list specifies fields, separated in the input by the field delimiter character (see the -d option.)  Output fields are separated by a single occurrence of the field
             delimiter character.
			 和-d一起使用,指定显示哪个filed。
			 
     -n      Do not split multi-byte characters.  Characters will only be output if at least one byte is selected, and, after a prefix of zero or more unselected bytes, the rest of
             the bytes that form the character are selected.
             取消分割多字节字符。仅和 -b 标志一起使用。
             如果字符的最后一个字节落在由 -b 标志的 List 
             参数指示的<br />范围之内,该字符将被写出;
             否则,该字符将被排除
             
     -s      Suppress lines with no field delimiter characters.  Unless specified, lines with no delimiters are passed through unmodified.
    		 抑制没有字段分隔符的行。 
    		 除非指定,否则没有定界符的行将不加修改地通过。

详细示例请参见:cut命令详解

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值