Skip to content

Instantly share code, notes, and snippets.

@junkdog
Created October 15, 2013 10:42
Show Gist options
  • Save junkdog/6989736 to your computer and use it in GitHub Desktop.
Save junkdog/6989736 to your computer and use it in GitHub Desktop.
Search jars for specified class, printing jar files that match.
#!/bin/bash
if [[ $# != 1 ]]; then
echo "Usage: `basename $0` <ClassName>"
exit 1
fi
find -name "*.jar" -exec sh -c "unzip -l '{}' | grep -q $1" \; -print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment