copperslim
Technical User
I have a backup script that runs every night. When backup finishes it emails me with the path of the backup log.
So the date of the file becomes the current backup log file.
thisprog=$(basename $0)
LOG="/tape/logs/$thisprog.$(date +%d%m%y).log"
I please need a script that will grep “failed” in the log file base on the current backup (+%d%m%y ) and mail me a message Backup failed when ever it reads failed in the log file? If there is no failed in the log file then it mails me with the message backup was successful.
So the date of the file becomes the current backup log file.
thisprog=$(basename $0)
LOG="/tape/logs/$thisprog.$(date +%d%m%y).log"
I please need a script that will grep “failed” in the log file base on the current backup (+%d%m%y ) and mail me a message Backup failed when ever it reads failed in the log file? If there is no failed in the log file then it mails me with the message backup was successful.