摘要:
(1) vi--:%s/str//gn(:%s/w//gn) (2) grep -o 'str' filename |wc -l(grep -o 'w' test1.txt |wc -l)--查找一个字符 (3) grep -o 'str1|str2' filename |wc -l(grep -o 阅读全文
摘要:
sed -i 's/old/new/g' filename vi/vim里面 :%s/old/new/g 修改文件中第n行到第m行以new代替old sed -i 'n,ms/old/new/g' filename 阅读全文