2.cut命令中的-n有什么作用啊?谁能举个例子啊?作者: rdcwayx 时间: 2009-06-24 13:28
-b list The list following -b specifies byte posi-
tions (for instance, -b1-72 would pass the
first 72 bytes of each line). When -b and -n
are used together, list is adjusted so that
no multi-byte character is split.
-c list The list following -c specifies character
positions (for instance, -c1-72 would pass
the first 72 characters of each line).作者: zjgbkhm 时间: 2009-06-24 13:36
这个我也有,能不能举个例子说说到底有什么不同啊作者: 270175100 时间: 2009-06-24 13:39
原帖由 zjgbkhm 于 2009-6-24 13:27 发表
1.cut命令中-b与-c有什么区别啊。
who | cut -b 1-10
who | cut -c 1-10
这两例子也没有看出来有什么区别啊。
2.cut命令中的-n有什么作用啊?谁能举个例子啊?
根据字节
-b, --bytes=LIST
output only these bytes
根据字符
-c, --characters=LIST
output only these characters