2 Star 8 Fork 10

LengLeng / wizard-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
find-in-jar1 330 Bytes
一键复制 编辑 原始数据 按行查看 历史
南山一脚 提交于 2017-04-09 09:25 . add all scripts
#!/bin/bash
### find file in jars
if [ $# -lt 2 ];then
echo "Usage : find-in-jar key path";
exit 1;
fi
keyword=$1;
locate=$2;
echo "find $keyword in $locate"
for filename in `find $locate -name '*.jar'`; do
result=`unzip -l "$filename"|grep "$keyword"`
if [ $? = 0 ];then
echo "$filename : $result"
fi
done
Shell
1
https://gitee.com/boding1/wizard-scripts.git
git@gitee.com:boding1/wizard-scripts.git
boding1
wizard-scripts
wizard-scripts
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891