ITeye博客

linux命令-cut/sed

mingren135 · 2013-06-23 15:53 · Linux · 移动开发 · Markdown

一、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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。