SIZE=$1 resize () { convert -resize 640x480 $1 small_$1 } for i in *.jpg; do echo $i resize $i done