#!/bin/bash SIG="$HOME/sig.png" CONVERT_OPTIONS="-gravity SouthEast" while [[ $# > 0 ]] do echo -n "Signing $1... " convert "$1" $CONVERT_OPTIONS $SIG -composite "signed $1" exit=$? if [[ $exit != 0 ]] then echo "convert returned with bad status $exit." exit $exit else echo "done." fi shift done