Skip to content

Instantly share code, notes, and snippets.

@timf
Created November 5, 2012 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timf/4017885 to your computer and use it in GitHub Desktop.
Save timf/4017885 to your computer and use it in GitHub Desktop.
jargrep
#!/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