Created
December 30, 2021 15:10
-
-
Save bsiegfreid/551722f0ffdf7c39211fe95c25d3c94e to your computer and use it in GitHub Desktop.
Quick script to search for a class in a collection of jar files. Needs work.
This file contains hidden or 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
#!/usr/bin/env bash | |
if ! shopt -q globstar; then | |
echo "Requires bash 4.0" | |
return 1 2>/dev/null || exit "1" | |
fi | |
# globstar requires bash 4.0 | |
shopt -s globstar dotglob nullglob | |
for f in **/*.jar | |
do | |
echo $f | |
jar tvf $f | grep --color $1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment