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

Home -> Community -> Usenet -> c.d.o.server -> Re: Help Shell Script Woes

Re: Help Shell Script Woes

From: <yong321_at_yahoo.com>
Date: Fri, 04 Feb 2000 05:39:45 GMT
Message-ID: <87don1$htq$1@nnrp1.deja.com>


You probably didn't run it as ". yourscript.sh" (no quotes). The dot is important.

--
Yong Huang

(yong321_at_yahoo.com)
(http://www.stormloader.com/yonghuang/)

In article <006fb0e0.68a5070d_at_usw-ex0106-047.remarq.com>,   Van Messner <vmessnerNOvmSPAM_at_discovernet.com.invalid> wrote:
> The following shell script does not reset the ORACLE_SID
> environment variable. What am I doing wrong. This is a Bourne
> shell on Sun Solaris.
>
> #!/bin/sh
> echo "Type the SID for the database you want to shut down"
> echo "Your choices are DNEG GSP2 GSPD ORCL"
> read dbsid
> case $dbsid
> in
> DNEG) echo "van dneg" ;;
> GSP2) echo "van gsp2"
> echo "$dbsid"
> ORACLE_SID=$dbsid
> export ORACLE_SID ;;
> *) echo "no SID entered" ;;
> esac
>
> If I run the script and respond with GSP2:
> The case statement works - I get the echo messages.
> $dbsid is what I expect - I can see it from the echo statement
> and what I see is GSP2
> Thus I assume the assigment to ORACLE_SID is ok.
> But when I look at my environment variables, the ORACLE_SID is
> not changed to GSP2.
>
> Can anyone think why not?
>
> Thanks,
>
> Van
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion
Network *
> The fastest and easiest way to search and participate in Usenet -
Free!
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Feb 03 2000 - 23:39:45 CST

Original text of this message

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