Hello All,
The following routine is to Check the input file:
if empty die and send error. OR
if contains ORA-error die and send error. OR
if empty die and send "no mismatch in tables" message.
Please Help suggest how to achieve the last option
The following routine is to Check the input file:
if empty die and send error. OR
if contains ORA-error die and send error. OR
if empty die and send "no mismatch in tables" message.
Please Help suggest how to achieve the last option
Code:
lstoftables=`cat rowcount_sfgm_gtxs.txt`
ora_error=`more rowcount_sfgm_gtxs.txt | grep 'ORA-'`
#change rowcount_xxxx_xxxx_txt
if [ `ls -l rowcount_sfgm_gtxs.txt | awk '{print $5}'` -eq 0 ] || [ -n "$ora_error" ] || [ ! -f "$lstoftables" ];
then
#change and add emails for
mailx -s "Comparing the tables in Shareplex SFGM_GTXS Environment produces no mismatch." XXXXXXX.com << END
However, please fix the errors below if there is any.
$lstoftables
END
rm /orahome/app/oracle/home/shareplex_scripts/rowcount_sfgm_gtxs.txt
exit 1
else