Thanks for this detailed reply. I shall take this further. -----Original Message----- Sent: 13 May 2002 14:53 To: Multiple recipients of list ORACLE-L
Simon, Many cellphone providers provide a service whereby an email recieved at a specific address is sent on to a mobile phone in the form of a page. Here is the routine that I use to scrape my output logs and send a success or failure page to my cellphone: #!/bin/ksh # shell script to run sql scripts and contact the user with succes or failure # Jack Silvey #---Oracle variable section --- export ORACLE_SID=iron export ORACLE_HOME=/u01/app/oracle/product/8.1.7 #---shell variable section --- SCRIPTPATH=/u01/app/oracle/admin/iron/scripts SQLPATH=$SCRIPTPATH/sql SCRIPTNAME=$SQLPATH/$1 OUTPATH=$SCRIPTPATH/output [EMAIL PROTECTED] SCRIPTOUTPUT=$OUTPATH/$1.out USERNAME=$2 PASS=$3 #---Clean out the output file--- cat /dev/null>$SCRIPTOUTPUT #---Run the SQL*Plus script, storing results in a variable--- SQLRESULTS=`sqlplus /nolog @$SCRIPTNAME> $SCRIPTOUTPUT < $SQLPATH/endsql.sql` #---Check the command-line return code--- SCRIPTERROR=$? #---Check to make sure output doesn't contain SQl*PLUS errors--- cat $SCRIPTOUTPUT|grep "SP2-" GREPOUTPUT=$? if [[ $GREPOUTPUT -eq 0 ]] then SCRIPTERROR=`expr $SCRIPTERROR + 1` fi #---Check to make sure output doesn't contain Oracle errors--- cat $SCRIPTOUTPUT|grep "ORA-" GREPOUTPUT=$? if [[ $GREPOUTPUT -eq 0 ]] then SCRIPTERROR=`expr $SCRIPTERROR + 1` fi #---Check to make sure the resulting variable doesn't contain errors--- echo $SQLRESULTS|grep "SP2-" GREPOUTPUT=$? if [[ $GREPOUTPUT -eq 0 ]] then SCRIPTERROR=`expr $SCRIPTERROR + 1` fi echo $SQLRESULTS|grep "ORA-" GREPOUTPUT=$? if [[ $GREPOUTPUT -eq 0 ]] then SCRIPTERROR=`expr $SCRIPTERROR + 1` fi --this section pages the dba with success or failure-- if [[ $SCRIPTERROR -ne 0 ]] then echo $1 failed | mailx $CONTACT exit 99 else echo $1 successful | mailx $CONTACT fi hth, Jack Silvey --- "FOX, Simon" <[EMAIL PROTECTED]> wrote: > We have some UNIX batch processes that send us > e-mails when they have > finished. > > Does anyone have any experience of sending a SMS > message to a mobile phone? > > > Simon Fox > > Room 221 > Furlong House > Queens Drive > NOTTINGHAM > NG2 1AL > > Phone 0115 957 6536 > > Fax 0115 957 6548 > > > > > ___________________________________________________________________________ > This email is confidential and intended solely for > the use of the > individual to whom it is addressed. Any views or > opinions presented are > solely those of the author and do not necessarily > represent those of > SchlumbergerSema. > If you are not the intended recipient, be advised > that you have received this > email in error and that any use, dissemination, > forwarding, printing, or > copying of this email is strictly prohibited. > > If you have received this email in error please > notify the SchlumbergerSema Helpdesk by telephone on > +44 (0) 121 627 5600. > ___________________________________________________________________________ > > __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jack Silvey INET: [EMAIL PROTECTED] Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). ___________________________________________________________________________ This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of SchlumbergerSema. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the SchlumbergerSema Helpdesk by telephone on +44 (0) 121 627 5600. ___________________________________________________________________________ -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: FOX, Simon INET: [EMAIL PROTECTED] Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).