Skip to content

Instantly share code, notes, and snippets.

@surrealroad
Last active December 12, 2016 12: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 surrealroad/9533968be52fa0f942bd0be0fc836734 to your computer and use it in GitHub Desktop.
Save surrealroad/9533968be52fa0f942bd0be0fc836734 to your computer and use it in GitHub Desktop.
Given a directory of zip files, loop through each file and extract a jpeg within the zip called {zipname}/{zipname}.jpg
cd $SRC;
find . -name '*.zip' -exec sh -c 'unzip -j "{}" `basename {} .zip`/`basename {} .zip`.jpg -d "`dirname \"{}\"`"' ';'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment