for ((i=0;i<=14;i++)); do if [ $i -lt 10 ]; then mv $i.bmp 0$i.bmp; fi; done # for f in ??.bmp; do convert -crop 300x250+21+72 $f `echo $f | cut -c1-2`-crop.bmp; done # convert -delay 300 ??-crop.bmp mobiles.gif #