#!/bin/bash LIST="jpg jpeg png bmp tiff" for EXT in $LIST do FILES="*.$EXT" for FILE in $FILES do if [ ! -e $FILE ]; then continue fi echo "$FILE" convert -strip "$FILE" "$FILE" done; done;