UNIX scripting assistance
The script below reports errors in the RMAN logs by searching for the
"RMAN-00571" text. I was hoping to get a simple script that greps
for the text and if the text is not found then it will send an email to
the DBALIST stating "All RMAN backups completed successfully".
Thanks!
#!/bin/ksh
#
# Report RMAN errors and send email to DBA -
#
export DBALIST=dba@test.com
export date=`date`
grep -i "RMAN-00571" /u002/LOG/*/* > /u002/LOG/RMAN_error.log
mailx -s "${date} RMAN errors" $DBALIST < /u002/LOG/RMAN_error.log
Fnews-brouse 1.9(20180406) -- by Mizuno, MWE <mwe@ccsf.jp>
GnuPG Key ID = ECC8A735
GnuPG Key fingerprint = 9BE6 B9E9 55A5 A499 CD51 946E 9BDC 7870 ECC8 A735