Created
April 14, 2018 09:37
-
-
Save rotemtam/bac6a269a71f2f94106dd81701258d14 to your computer and use it in GitHub Desktop.
filter portrait images with imagemagick and bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for f in ./*.jpg | |
do | |
r=$(identify -format '%[fx:(h>w)]' "$f") | |
if [[ r -eq 1 ]] | |
then | |
rm "$f" | |
fi | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment