From: Alan Jack Pippin Date: Sat, 31 Dec 2005 15:33:09 +0000 (-0700) Subject: Changed grep -v against $logfile to throw out lines with control characters. X-Git-Tag: release-0.5~4 X-Git-Url: http://git.pippins.net/embedvideo/.git/images/x.gif?a=commitdiff_plain;h=4affe710e9e3a4ea439ead2ad604a3450451200b;p=backups%2F.git Changed grep -v against $logfile to throw out lines with control characters. --- diff --git a/scripts/burn-imgs.sh b/scripts/burn-imgs.sh index da5b11b..f4b8649 100755 --- a/scripts/burn-imgs.sh +++ b/scripts/burn-imgs.sh @@ -39,7 +39,7 @@ cdrecord-wrapper.sh $cdrecordopts dev=$sdev $img > $logfile 2>&1 if [ "0" != "$?" ]; then echo >&2 "cdrecord failed!" $cronstopstart start - cat $logfile | grep -v "MB written" | grep -v "to quit" | mailx -s "backups: failed to burn $img!!!" $mailto + cat $logfile | grep -v -e '[ ]' | mailx -s "backups: failed to burn $img!!!" $mailto exit 1 fi @@ -59,7 +59,7 @@ if ! cmp $md5sum $img.md5sum; then echo "md5sum check FAILED" >> $logfile echo "dd if=$dev bs=1M count=$imagesizemb 2>>$logfile | md5sum | awk '{print\$1}' > $md5sum" >> $logfile e2label $dev >> $logfile - cat $logfile | grep -v "MB written" | grep -v "to quit" | mailx -s "DVD md5sum doesn't match image file!!!" $mailto + cat $logfile | grep -v -e '[ ]' | mailx -s "DVD md5sum doesn't match image file!!!" $mailto exit 1 fi @@ -76,7 +76,7 @@ date >> $img.stat cat $img.stat echo cat $logfile -} | grep -v "MB written" | grep -v "to quit" | mailx -s "DVD burned. File as $(basename ${img%.*})" $mailto > $logfile 2>&1 +} | grep -v -e '[ ]' | mailx -s "DVD burned. File as $(basename ${img%.*})" $mailto > $logfile 2>&1 # Two lines in the stat file indicate two successful burns. Clean-up the image. if [ "$(wc -l $img.stat 2>/dev/null | awk '{print$1}')" == "$makeXcopies" ]; then