for f in $(ls *{jpg,png}); do if [ ! -f "../thumbs/$f" ]; then convert "$f" -resize 180x180 "../thumbs/$f"; fi done