Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Korn Shell Q

RE: Korn Shell Q

From: Post, Ethan <Ethan.Post_at_ps.net>
Date: Tue, 05 Mar 2002 21:28:28 -0800
Message-ID: <F001.00420483.20020305212828@fatcity.com>


Forgot something the call from inside the check_all_exfail.sh script looks like this...

exfail.sh $EXFAIL_OPTIONS $ORACLE_SID

-----Original Message-----
Sent: Tuesday, March 05, 2002 10:23 PM
To: Multiple recipients of list ORACLE-L

I have a shell script called exfail.sh which checks for potential extent failures on a database. The script accepts a couple of command line switches.

exfail.sh -p -g "dba apps" TEST

Basically this says run the exfail.sh script against the "TEST" instance, (-p) page people if there are problems, (-g) send the page/email to everyone in the "dba" and "apps" group.

This works just fine. I have another script which rolls through the oratab file and calls exfail.sh against every database on the host.

check_all_exfail.sh

The scripts sources in some environment files which set up the command line parameters for the host or database.

EXFAIL_OPTIONS="-p -g \"dba apps\""

When I run "set -x" in the script I can see the call from check_all_exfail.sh to exfail.sh is correct just like the first example.

exfail.sh -p -g "dba apps" TEST
exfail.sh -p -g "dba apps" DEV
exfail.sh -p -g "dba apps" FOO

...

However the exfail.sh script parses the command line in an entirely different manner. The -g switch picks up

"dba

as the $OPTARG and not

dba apps

thus

apps"

becomes the $1 argument instead of the correct

TEST I know I need to tell the check_all_exfail.sh file to parse the line twice (I think) bit I can't remember the command off had to do this. Anyone have some ideas for me to try?

Thanks,
Ethan
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Post, Ethan
  INET: Ethan.Post_at_ps.net

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: ListGuru_at_fatcity.com (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).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Post, Ethan
  INET: Ethan.Post_at_ps.net
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: ListGuru_at_fatcity.com (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). Received on Tue Mar 05 2002 - 23:28:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US