-
-
Save jarrodhroberson/2f5fa1ac6beffaea8774 to your computer and use it in GitHub Desktop.
bash and windows shell scripts to find classes in .jar files in a directory
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
# Windows (cmd) Command line version | |
forfiles /S /M *.jar /C "cmd /c jar -tvf @file | findstr /C:"$1" && echo @path" |
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
# find things in a jar | |
# taken from http://www.unix.com/shell-programming-scripting/21551-jar-file-search.html | |
find . -name \*jar -print -exec jar -tvf {} \; | nawk '/YOURSEARCHSTRING/ || /jar/ {print} ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment