/appl/dcs/ghostscript/bin/gs -dBATCH -dNOPAUSE -dQUIET \ -sDEVICE=${prn_driver} -sOutputFile=${prn_filename} $prn_res $cmdfile 2>error.txt if [ $? = 0 ] then # Print the file which was created by Ghost script lp -c -d${unix_printer} -o-dp $prn_filename 2>&1 if [ $? -ne 0 ] then echo "`logdate` [ERROR] Failed while Printing the ${stagingdir}/gs.prn file " return 2 fi else echo "`logdate` [ERROR] Failed Creating GhostScript file ${stagingdir}/gs.prn " return 2 fi