Skip to content

Instantly share code, notes, and snippets.

@strongh
Created January 3, 2014 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save strongh/8231878 to your computer and use it in GitHub Desktop.
Save strongh/8231878 to your computer and use it in GitHub Desktop.
find classes in classpath. assumes a leiningen project. useful for finding bundled deps. usage is e.g. ``` $ ./findclass.sh MyTerribleClass ```
#!/bin/sh
TMPCP=/tmp/badcp.txt
lein cp | tr ':' '\n' > $TMPCP
while read line; do
find "$line" -name "*.jar" -exec sh -c 'jar -tf {}| grep -H --label {} '$1'' \;
done < "$TMPCP"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment