实用的shell脚本
2014-08-21 11:41
507 查看
function jgrep() { find . -name .repo -prune -o -name .git -prune -o -type f -name "*\.java" -print0 | xargs -0 grep --color -n "$@" } function cgrep() { find . -name .repo -prune -o -name .git -prune -o -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.h' \) -print0 | xargs -0 grep --color -n "$@" } function resgrep() { for dir in `find . -name .repo -prune -o -name .git -prune -o -name res -type d`; do find $dir -type f -name '*\.xml' -print0 | xargs -0 grep --color -n "$@"; done; } function mangrep() { find . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o -type f -name 'AndroidManifest.xml' -print0 | xargs -0 grep --color -n "$@" } function sepgrep() { find . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o -name sepolicy -type d -print0 | xargs -0 grep --color -n -r --exclude-dir=\.git "$@" }
相关文章推荐
- shell企业级实用基础脚本(汇总2/2)
- shell脚本应用(5)--实用脚本片段
- 5个实用的shell脚本面试题和答案
- 运维工程师工作中实用shell脚本与语句
- 8个非常实用的Linux系统监控shell脚本
- 实用的shell脚本-------修改cfg文件
- 8个非常实用的Linux系统监控shell脚本
- 8个非常实用的Linux系统监控shell脚本
- 工作中实用shell脚本与语句
- 40 个实用的 Mac OS X Shell 脚本和终端命令
- 实用shell脚本命令记录
- 实用脚本----Linux下Jdk和Tomcat自动安装shell脚本总结
- 5个实用的shell脚本面试题和答案
- 运维工程师工作中实用shell脚本与语句
- 5个实用的shell脚本面试题和答案
- Android开发中高效实用的shell命令脚本
- 实用技巧:将PHP作为Shell脚本语言使用
- shell脚本实用知识点
- 8个非常实用的Linux系统监控shell脚本
- 实用shell脚本 安装集群使用