Created
January 20, 2009 15:15
-
-
Save matthewmccullough/49514 to your computer and use it in GitHub Desktop.
Look for JARs containing a class name
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