Skip to content

Instantly share code, notes, and snippets.

@rahearn
Created September 13, 2012 14:08
Show Gist options
  • Save rahearn/3714541 to your computer and use it in GitHub Desktop.
Save rahearn/3714541 to your computer and use it in GitHub Desktop.
Search through a directory of jar files for a class
#!/bin/sh
if [ $# -eq 0 ]; then
search_for="."
else
search_for=$1
fi
for file in `find . -type f -name "*.jar"`; do
echo "Scanning $file..."
jar tfv $file | grep $search_for
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment