#!/bin/sh echo "start" b=`basename $1` echo "b=$b" mv $1 /tmp/$b echo "mv $1 to /tmp/$b" jpegtran -outfile $1 -rotate $2 /tmp/$b echo "done jpegtran"