#!/bin/sh # Find image files in a directory tree. find "${1-.}" -name '*' -exec file {} \; | grep -o -E '^.+: [^:]+ image'