Created
March 12, 2013 16:52
-
-
Save jarrodhroberson/5144645 to your computer and use it in GitHub Desktop.
A short Bash script to delve through a directory of .jar files and find the ones that contain a given package or class.
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 | |
find . -name '*.[jwes]ar' | while read LINE; do grep -q $1 "$LINE"; if [ $? -eq 0 ];then echo "$LINE"; jar tvf "$LINE" | grep $1;echo;fi;done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment