-
-
Save stigkj/365920 to your computer and use it in GitHub Desktop.
Find class in all jars recursively
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
#!/bin/sh | |
#Example Usage: findjars com/ambientideas/groovy | |
CLASSNAMETOFIND="$1" | |
echo "Searching all JARs recursively..." | |
for eachjar in `find . -iname "*.jar"` | |
do | |
#echo "Searching in $eachjar ..." | |
jar tvf $eachjar | grep $CLASSNAMETOFIND > /dev/null | |
if [ $? == 0 ] | |
then | |
echo "******* Located \"$CLASSNAMETOFIND\" in $eachjar *******" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment