【bash_profile 带参命令】在指定后缀文件中查找指定内容的命令

来源:互联网 发布:linux编辑shell脚本 编辑:程序博客网 时间:2024/05/17 01:08

说明

在指定后缀文件中查找指定内容的命令


代码

在~/.bash_profile文件中加入以下内容

# @usage : myfind cpp contentmyfind () { find ./ -name "*.$1" | xargs grep -n --color $2 ; } 



0 0
原创粉丝点击