Created
November 5, 2012 15:45
-
-
Save timf/4017885 to your computer and use it in GitHub Desktop.
jargrep
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/bash | |
if [ "$#" -lt 1 ]; then | |
echo "enter name to grep" | |
exit 1 | |
fi | |
files=`find . -name "*jar"` | |
for file in $files ; do echo "----------"; echo $file; jar tvf $file | grep $@ ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment