Thanks Anchal Khare.
That script is now almost doing what I need. Sorry - I should have explained it better. If the value in the output file is 0 then the backup will have been successful as there are no errors. Any value greater than that signifies an error has occured and I need to investigate.
I have recieved a mail which had a value of 0 in it and "Backup Failed" as the subject.
Basically what is to test the value in the output file and if it is equal to 0 then the backup was successful. Anything more than 0 and the backup failed.
grep -i error $LOG_FILE| wc -l > $OUTPUT_FILE
-bash-3.00$ cat $OUTPUT_FILE
0
Subject: BACKUP FAILED ----> This needs to be a successful backup
as there are no errors. Anything
greater than 0 is a backup failure.
Thanks for looking into this for me.
Sparcman.