Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help Shell Script Woes
My guess is that you are executing your script rather than
sourcing it.
HTH Helen
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!
Received on Fri Feb 04 2000 - 05:51:04 CST