Hi,
I am new to shell scripting.i am trying to mail after my backup completed.
Here is my shell script:
if [ -f ${/backup/RMANBKUP/spool/shelltest.log} ]; then
egrep (ERROR|error|Error|RMAN-) ${/backup/RMANBKUP/spool/shelltest.log} > /dev/null
if [ $? = 0 ]; then
RESULT_MSG=WARNING: Errors occurred during the ${ORACLE_SID} Rman backup full.
mail -s $RESULT_MSG $DBA < ${BACKUP_LOG_FILE}
touch /backup/RMANBKUP/spool/error.txt
else
egrep (Recovery Manager complete) ${/backup/RMANBKUP/spool/shelltest.log} > /dev/null
if [ $? = 0 ]; then
RESULT_MSG=${ORACLE_SID} RMAN Backup Full Completed Successfully.
mail -s $RESULT_MSG $DBA < ${/backup/RMANBKUP/spool/shelltest.log}
else
RESULT_MSG=WARNING: ${ORACLE_SID} RMAN Backup full did not complete.
echo Backup process was terminated. | mail -s $RESULT_MSG $DBA
fi
fi
fi
i got the error:
/backup/RMANBKUP/scripts/shelltest.sh[16]: 0403-057 Syntax error at line 17 : `(' is not expected.
Pls help me get rid of this.