Last active
December 13, 2017 22:05
-
-
Save bttf/53c224ed52f3d2523db897587253d458 to your computer and use it in GitHub Desktop.
Filter JPG images in directory recursively that are only greater than 2400 width
This file contains 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
find . -name '*.jpg' -exec magick identify -format '%w %d/%f\n' {} \; | awk 'int($1) > 2400 {for (i=2; i<=NF; i++) printf $i " "; print ""}' > output.log | |
while read -r line; do cp "$line" ../paintings/; done < output.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment