1 Star 0 Fork 0

CNCF/devstatscode

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
find.sh 416 Bytes
一键复制 编辑 原始数据 按行查看 历史
Lukasz Gryglicki 提交于 2019-03-18 20:13 +08:00 . Copied sources
#!/bin/bash
if [ -z "$1" ]
then
echo "You need to provide path as first arument"
exit 1
fi
if [ -z "$2" ]
then
echo "You need to provide file name pattern as a second argument"
exit 1
fi
if [ -z "$3" ]
then
echo "You need to provide regexp pattern to search for as a third argument"
exit 1
fi
find "$1" -type f -iname "$2" -not -name "out" -not -path '*.git/*' -exec grep -EHIn "$3" "{}" \; | tee -a out
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cncf/devstatscode.git
git@gitee.com:cncf/devstatscode.git
cncf
devstatscode
devstatscode
master

搜索帮助