Skip to content

Instantly share code, notes, and snippets.

@tmoreira2020
Created April 17, 2011 15:06
Show Gist options
  • Save tmoreira2020/924103 to your computer and use it in GitHub Desktop.
Save tmoreira2020/924103 to your computer and use it in GitHub Desktop.
Search for a class into a subdirectory tree and its jars/zips files.
#!/bin/bash
archives= find . -name '*.jar'
echo $archives
for i in `find . -name '*.jar'`; do
echo $i
jar tf $i | grep --color=always ${1}
#jar tf $i
echo
done
for i in *.zip; do
echo $i
unzip -l $i | grep ${1}
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment