Skip to content

Instantly share code, notes, and snippets.

@marcwittke
Last active April 18, 2021 10:17
Show Gist options
  • Save marcwittke/3703944bd1808c978db9c675e989d0ae to your computer and use it in GitHub Desktop.
Save marcwittke/3703944bd1808c978db9c675e989d0ae to your computer and use it in GitHub Desktop.
Bash-Fu

move one up recursively

find . -type f -execdir mv -i {} .. \;

unzip each zip into separate directory named after zip archive

find . -name "*.zip" | while read filename; do unzip -o -d "${filename%.*}" "$filename"; done;

delete empty directories

find . -type d -empty -print [-delete]

@marcwittke
Copy link
Author

crop footer
find . -name '*.jpg' -exec convert -gravity North -crop -0-50 {} {} \;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment