Hi...
I have this script below :
$ORACLE_HOME/bin/sqlplus "/as sysdba" @/ek_ora/script/rman_error.sh > rman_error.txt
more rman_error.txt | grep -i "FAILED" >> /ek_ora/script/rman_error.tmp
if [ ! -s "/ek_ora/script/rman_error.tmp" ]
then
echo "No error found."
else
echo "Sending mail."
mailx -r
oraadm@jupp.gov.my -c
encass@nc.com.my -s "RMAN Error"
technical@precisionportal.com.my\
< /ek_ora/script/rman_error.tmp
fi
==================================
Based on that script it will grep "FAILED" only. If identified, the script will email to me...if else, it wont send any email..
My question is, in the file rman_error.txt, sometimes there will be another value i need to grep, i need to grep ERRORS and WARNING as well, so how to do this ???