On 5/18/07, jan gestre <[EMAIL PROTECTED]> wrote:
On 5/18/07, joebert jacaba <[EMAIL PROTECTED]> wrote: > im curious, your script doesnt echo something. the behavior you are > getting are just right to m. where would i place echo in the script? or where would i place it when run outside the script?
Something like this: MYSQLDUMP=/path/to/mysqldump . . . $MYSQLDUMP [options] if [ "$?" == "0" ]; then MSG="Successful" else MSG="Failed" fi mail -s $MSG [EMAIL PROTECTED] Better if you set up a log file where you can track all backups: LOGFILE=/path/to/logfile echo `date` >> $LOGFILE echo "Start backup" >> $LOGFILE $MYSQLDUMP [options] if [ "$?" == "0" ]; then MSG="Successful" else MSG="Failed" fi echo $MSG >> $LOGFILE mail -s $MSG [EMAIL PROTECTED] < $LOGFILE -- Ian Dexter R. Marquez http://iandexter.net | [EMAIL PROTECTED] http://feeds.feedburner.com/Coredump _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

