for i in *.bmp; do bmptoppm $i | ppmtojpeg >`basename $i .bmp`.jpg; done