#! /bin/sh for x in `ls *.$1`; do y=`basename $x .$1` convert $y.$1 $y.png addd $y convert $y.png $y.bmp done