把cgrep mgrep集成到bashrc
2024-09-01 03:12:37
https://android.googlesource.com/platform/build/+/android-4.4.3_r1/envsetup.sh
在~/.bashrc里面增加:
#Android tool
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 mgrep()
{
find . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o -regextype posix-egrep -iregex '(.*\/Makefile|.*\/Makefile\..*|.*\.make|.*\.mak|.*\.mk)' -type f -print0 | xargs -0 grep --color -n "$@"
}
重新source ~/.bashrc,就可以在任何shell界面使用android的这两个工具了。
最新文章
- Android基础总结(四)
- .net post的参数如果出现乱码如何解决!
- 获取View到顶部的高度
- 1、Python环境安装部署
- js 变量提升和函数提升原理
- Spring3 表达式语言(SpEL)介绍
- OpenGL 简介
- 怎样开发Chrome浏览器的插件
- php 执行linux 命令函数
- C# 语言的两个html解析器
- let和const关键词
- 秒懂JS对象、构造器函数和原型对象之间的关系
- bzoj3728: PA2014Final Zarowki
- dos脚本2
- ES6数字操作
- 网页排版的时候不要忘了table标签
- YUM软件包额外扩展了解项
- 《Java程序设计》第12周课堂实践总结
- axios post 踩坑之 post传参
- Java并发编程(二)为什么需要多线程