Skip to content

Instantly share code, notes, and snippets.

@ppdouble
Last active April 28, 2023 08:55
Show Gist options
  • Save ppdouble/49c91bb05c5d12905b7d343794b6d7cc to your computer and use it in GitHub Desktop.
Save ppdouble/49c91bb05c5d12905b7d343794b6d7cc to your computer and use it in GitHub Desktop.
find specific characters in jar files
# the paths of jar files are listed in a text file named "files"
find $(cat files) -print -exec zipgrep "the-characters-needed-to-be-searched" '{}' \;
# search jar files recursively in path the-folder-path
find the-folder-path -name "*.jar" | xargs -I{} sh -c 'echo searching in "{}"; zipgrep "the-characters-needed-to-be-searched" {}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment