#! /bin/ksh # Here we write a blank line to the log file . . . echo `date` > /oracle/SA9/scripts/oracheck.log # Now we run the check, writing errors to the oracheck.log file /oracle/SA9/scripts/oracheck.ksh >> /oracle/SA9/scripts/oracheck.log # If errors messages exist (2 or more lines), then go on . . . if [ `cat /oracle/SA9/scripts/oracheck.log|wc -l` -gt 1 ] then # Now, be sure that we don't clog the mailbox. # the following ststement checks to look for existing mail, # and only sends mail when mailbox is empty . . . if [ ! -s /var/spool/mail/oracle ] then cat /oracle/SA9/scripts/oracheck.log | mail oracle fi fi