作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我想找到具有字符串“hello”但不应包含字符串“helloworld”的 jar 。我尝试了如下命令,
find . -iname '*.jar' -printf "unzip -c %p | grep -q 'hello' && grep -qL 'helloworld' && echo %p\n" | sh
没有提供正确的 jars。想知道在 grep 中传递两个条件的命令吗?
最佳答案
find . -name "*.jar" -exec bash -c 'f={};jar tf $f| grep "hello" | grep -q -v "helloworld" && echo $f' \;
关于linux - 如何在 linux 中找到一个字符串匹配和一个字符串不匹配的 jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38246227/
我是一名优秀的程序员,十分优秀!