Skip to content

Instantly share code, notes, and snippets.

@edmhs
Created May 24, 2017 06:16
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 edmhs/868cf34618989a780707206102a1ad35 to your computer and use it in GitHub Desktop.
Save edmhs/868cf34618989a780707206102a1ad35 to your computer and use it in GitHub Desktop.
Search string recursively within zipped files, works good with searching string in TB of data.
for file in 201705/prefix*.zip; do
if ( unzip -c "$file" | grep -q "123456789"); then
echo "$file"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment