摘要: 用该命令sed删除文件test.txt中包含某个字符串abc的行:sed '/adc/d' test.txt >result.txt在文件test.txt中删除从开头到含有某个字符串abc的行sed'1,/abc/d' test.txt>result.txt获取文件test.txt中包含字符串abc的行cat test.txt |grep "abc" > result.txtsed具体用法如下:用法: sed [选项]... {脚本(如果没有其他脚本)} [输入文件]... -n, --quiet, --silent 取消自 阅读全文
posted @ 2013-06-14 16:13 夏叶星空 阅读(520) 评论(0) 推荐(0) 编辑