常用shell命令

以下命令是平时经常用到的命令。 而且这些用法也是很常见的用法。

1. 将当前目录下的所有.c、.h文件中的str1字符串替换为str2字符串。

sed -i 's/simple_stat_dom.h/stat_dom.h/g' `grep "simple_stat_dom.h" -rl --include=*{cpp,h} ./`

 

posted @ 2017-08-10 12:52  chenhuan001  阅读(210)  评论(0编辑  收藏  举报