What did you NOT understand about Mike's and pdreyer's solution?
Adding to those alternatives, you could just add code at the end of the script to e-mail the log:
Code:
#!/bin/ksh
# this is myScript.sh
#
LOG_FILE=/path/to/logs/myScript.log
#
dosomething.sh >$LOG_FILE
if [ $? -ne 0]
then
cat $LOG_FILE| mailx -s "$0 !ERROR, something happened." oper@mydomain.com
exit 1
fi
#-- Etc --
dosomethingelse.sh >>$LOG_FILE
#-- Etc --
# At end of the script add:
cat $LOG_FILE| mailx -s "$0 All OK!" oper@mydomain.com
exit 0
