diff --git a/faxreport.sh b/faxreport.sh index 0eff67d..ca54d12 100755 --- a/faxreport.sh +++ b/faxreport.sh @@ -51,10 +51,13 @@ OUTFILE="$DATE-$ID-report.pdf" if [ -z $FILE ] then echo "Fax seems not to be sent successfully (yet). No report available" - read -p "Delete id from history anyways? (y/n) " DIN - if [[ $DF = true && $DIN =~ [yYjJ] ]] + if [ $DF = true ] then - echo "$(grep -v "^$ID$" $BASEPATH/.fax_history)" > $BASEPATH/.fax_history + read -p "Delete id from history anyways? (y/n) " DIN + if [ $DIN =~ [yYjJ] ] + then + echo "$(grep -v "^$ID$" $BASEPATH/.fax_history)" > $BASEPATH/.fax_history + fi fi exit 1 fi