
#arg 1: PDF file           
#arg 2: PDF file to append

PATH=$PATH:/usr/local/bin; export PATH
if test ! -r /usr/local/bin/gs -a ! -r /usr/bin/gs; then
    echo "GhostScript NOT INSTALLED - call for support"
    read answer
    exit
    fi

TEMPFILE=${1}.tmp
mv $1 $TEMPFILE

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile="$1" "$TEMPFILE" "$2"

rm $TEMPFILE 

