Ethan, I had a similar problem when using the getopts
command when using it in conjuction with nohup and the
&. I found by throwing ksh in the syntax everthing
worked. i.e. nohup ksh setup.ksh -a parameters & 

This may or may not work for you but it's worth a try.

Scott

--- "Post, Ethan" <[EMAIL PROTECTED]> wrote:
> The problem is I am using "getopt" to process the
> switches...
> 
> while getopts :pg: option
> do
>    case $option in
>       p) OPTION_p=Y ;;
>       g) GID=$OPTARG  ;;
>      \?) print $OPTARG is not a valid argument. ;
> exit 0 ;;
>    esac
> done
> 
> shift $(expr $OPTIND - 1)
> 
> After the shift, the $1 arg should be the ORACLE_SID
> passed in. 
> 
> When called directly everything works fine...
> 
> exfail.sh -p -g "dba apps" TEST
> 
> echo $GID returns
> 
> dba apps
> 
> When called from another script echo $GID returns
> 
> "dba
> 
> You can see it thinks the double quote is part of
> the argument for -g, is
> also does not thing apps is part of it.  The reason
> is how it is treating
> the " double quotes.  When called directly it sees
> them as surrounding the
> dba and apps words and all of it is part of the -g
> argment.  When called
> from a script dynaically it treats the double quotes
> as part of the argment.
> I think I will paly around with single ticks to see
> if that works.  I think
> there is a command that will basically expand the
> command once before
> running it, and I think that will work, but I can't
> recall it at the moment.
> I will keep tinkering.
> 
> Thanks,
> Ethan
> 
> -----Original Message-----
> Sent: Wednesday, March 06, 2002 11:15 AM
> To: Multiple recipients of list ORACLE-L
> 
> 
> Ethan --
> 
> As I understand it, your skip isn't working if there
> are multiple parameters
> passed in, so that when you get your parameters and
> do your skip, you are
> skipping one "word" and then the next parameter
> fails.  If that is the case,
> what you may want to do is parse out the
> multi-parameter string with awk -F"
> {'print $2'}.  Then count the words separately and
> skip those.
> 
> HTH.  BTW, I'm tied up with AppsDBA stuff and am not
> monitoring the List as
> I should.  Feel free to email me directly if I can
> provide addition
> assistance.
> 
> Bambi.
> -- 
> -- 
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> -- 
> Author: Post, Ethan
>   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).


__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Scott
  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).

Reply via email to