Created
March 27, 2017 12:07
-
-
Save shanethehat/24d34985f6091d5ff5f6d6b1798eba53 to your computer and use it in GitHub Desktop.
Search for a string within files within jars - stolen from http://www.linuxquestions.org/questions/linux-newbie-8/searching-contents-of-class-file-within-jar-for-strings-705087/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
find . -iname '*.jar' -print | while read jar; do | |
echo "$jar:" | |
unzip -qq -l $jar | sed 's/.* //' | while read cls; do | |
unzip -c $jar $cls | grep -q 'Tag read' && echo " "$cls | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment