Hello Gurus,
I've searched enough to find what I wanted and finally ended up creating a thread.
I'm in the process of coding something like below
sed -n -e "s/.*\(successfully completed\).*/\1/p" xxx.log
read status
if [[ "$status" = successfully completed ]]
then
#sleep 3;
echo "Export successful and exiting"
else
Send the log file as attachment
/usr/sbin/sendmail -f "expdp error"
name@email.com << END
subject: Expdp error log
`cat <path>/body-message.txt`
`uuencode xxxx.log xxxx.log`
END
fi
I've an issue in string comparison as the condition is not being met in "if " condition, and always sends me an email (that's satisfying the else condition)
Can some one please help.