#! /bin/sh if [ $# -lt 2 ] ;then echo "usage: $0 <degree> <files...>" exit 1 fi deg=$1 if [ $deg -lt 0 ] ;then echo "usage: $0 <degree> <files...>" echo "degree must be greater than 0" exit 2 fi shift echo mogrify -rotate $deg $@