|
蓝森林 http://www.lslnet.com 2006年6月26日 11:18
在文本文件中,如何把查到的字符串所在的行删除掉??
有此文件:
aaaaaa1234aaaaa
bbb1234bbbbbbb
cccccccccccccccccccc
ddddddddddddddddd
eeeeeeeee1234ddddd
....
把包含”1234“的整行删除掉!!
多谢! |
在文本文件中,如何把查到的字符串所在的行删除掉??
grep -v "1234" file >newfile
or
sed '/1234/d' file >newfile |
| |