Skip to content

Instantly share code, notes, and snippets.

@dfparker2002
Forked from thomashartm/findinjar.sh
Created February 11, 2016 20:34
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 dfparker2002/ea210ce43e94c2431fb6 to your computer and use it in GitHub Desktop.
Save dfparker2002/ea210ce43e94c2431fb6 to your computer and use it in GitHub Desktop.
#!/bin/bash
# first argument: file
# second argument: searchstring
#
find "$1" -name "*.jar" -exec sh -c 'jar -tf {}|grep -H --label {} '$2'' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment