Shell scripting experts ( please help)

Shell scripting experts ( please help)

 

  

Expers,
Below is part of a script to monitor alert log files and send an e-mail about
them. I want to implement this on one of our server and we can’t implement malix
on it because it came from a third party vendor.
The alternative way to do that is to send the file to another server and send it
from there. The alternative server name is ‘dbasvc’, so I am trying (as you see
below) to scp to it, but it didn’t work out. Please, how can I do that?. Please,
help me with this.

Thanks,


#echo ALERTLOG=$ALERTLOG TEMPLOG=$TEMPLOG DIFFLOG=$DIFFLOG
diff ${ALERTLOG} ${TEMPLOG} | grep -i 'ORA\-' > $DIFFLOG
rc=`cat $DIFFLOG | wc -l`
if [ $rc -gt 0 ]
then
scp $DIFFLOG dbasvc
#mailx -s "Errors in Alert Log for $ORACLE_SID" $NOTIFY_LIST < $DIFFLOG
fi
cp -p ${ALERTLOG} ${TEMPLOG}
fi
done


Oracle LazyDBA home page