I'm looping through a series of HTML files in a bash script and converting each one to PDF using the command line utility, and I was wondering what the proper/recommended way to check for success or failure/warning would be?
result=`prince $file -o $OUTPUT_PDF_DIR/$filename.pdf`
echo "Result: $result"
Is it safe to just test for a non-empty $result in this example and treat that as a failure/warning to be reviewed? Is there a more appropriate way I'm not thinking of?
result=`prince $file -o $OUTPUT_PDF_DIR/$filename.pdf`
echo "Result: $result"
Is it safe to just test for a non-empty $result in this example and treat that as a failure/warning to be reviewed? Is there a more appropriate way I'm not thinking of?