Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Find images whose width is greater than X
set -e
# Set the width from the first argument (could do this with getopts).
# Filter the images using a combination of file and awk.
file images/* | awk -v width="$width" '{ if ($5 > width) print $1 }' | tr -d ':'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.