Skip to content

Instantly share code, notes, and snippets.

@jeremy-rutman
Last active November 6, 2021 06:26
Show Gist options
  • Save jeremy-rutman/0b9d66e7c56c1ac0e51d1a60ff9d1959 to your computer and use it in GitHub Desktop.
Save jeremy-rutman/0b9d66e7c56c1ac0e51d1a60ff9d1959 to your computer and use it in GitHub Desktop.
#crop bottom 10 pixels off all files that look like ffefd224-f72b-47e7-9671-c79fbebe25fd.jpg
# ie 8 digits hex, dash, 4 digits ....jpg
for f in $(ls|grep -E '^([a-f0-9]){8}\-([a-f0-9]){4}.*.jpg'); do echo $f; convert $f -gravity south -chop 0x10 $f;done
# grep -E is extended regex which requires less slashes iiuc, () around capture group you want to appear {n} times, . matches anyting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment