Skip to content

Instantly share code, notes, and snippets.

@gogl92
Created September 12, 2017 18:55
Show Gist options
  • Save gogl92/ef0b1da85e19e8204984b18d0c8049c3 to your computer and use it in GitHub Desktop.
Save gogl92/ef0b1da85e19e8204984b18d0c8049c3 to your computer and use it in GitHub Desktop.
Image Edition in Terminal
change names to a consecutive list 0.jpg .... n.jpg
ls | cat -n | while read n f; do mv "$f" "$n.jpg"; done
Reduce quality
convert -quality 85% 0.jpg 0.jpg
For multiple files
ls | cat -n | while read n f; do convert -quality 85% "$f" "$n.jpg"; done
@gogl92
Copy link
Author

gogl92 commented Sep 12, 2017

Not ready for production

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