日期:2014-05-16  浏览次数:20610 次

linux命令-cut/sed

一、cut:从一行上移除部分内容,选择性显示

1)cut -cnum1-num2 filename

?  Downloads  cat example 
helloworld!usa!china!
?  Downloads  cut -c6-13 example 
world!us

?2)cut -d 'sep' -f cnum filename

?  Downloads  cut -d '!' -f 3 example
china

?