shell script to grep stuf:
TODO
c style grep
cat fxg.sh
#!/bin/bash
# find + xargs + grep
#find -name *.cc -o -name *.cpp -o -name *.c -o -name *.h -o -name *.hh |xargs egrep --color=always "$1|$2|$3|$4|$5|$6"
find -name *.cc -o -name *.cpp -o -name *.c -o -name *.h -o -name *.hh |xargs egrep -nri --color=always $1

本文介绍了一个使用Shell脚本结合find、xargs及grep命令来搜索特定文件类型的实用案例。该脚本支持彩色高亮显示,并能快速定位到C/C++源代码文件中的指定字符串。

被折叠的 条评论
为什么被折叠?



