CO UNixware 7.1.1
Hi friends,
I have chopped my case statementt out of my .profile and put it in another script called setsid. The case statement works when run from my .profile but not from my setsid file.
All that the script does is set an environmental variable based on user input. The variable is ORACLE_SID.
Here is my script.
Code:
#! /bin/sh
echo
echo "What do you want to set your ORACLE_SID to ?
1: wmsdata
2: wmstest
3: wmsctl"
echo
read RESPONSE DUMMY
case "$RESPONSE" in
1)
ORACLE_SID=wmsdata
export ORACLE_SID
alias pfile='cd $ORACLE_HOME/admin/wmsdata/pfile/'
alias bdump='cd $ORACLE_HOME/admin/wmsdata/bdump/'
alias udump='cd $ORACLE_HOME/admin/wmsdata/udump/'
;;
2)
ORACLE_SID=wmstest
export ORACLE_SID
alias pfile='cd $ORACLE_HOME/admin/wmstest/pfile/'
alias bdump='cd $ORACLE_HOME/admin/wmstest/bdump/'
alias udump='cd $ORACLE_HOME/admin/wmstest/udump/'
;;
3)
ORACLE_SID=wmsctl
export ORACLE_SID
alias pfile='cd $ORACLE_HOME/admin/wmsctl/pfile/'
alias bdump='cd $ORACLE_HOME/admin/wmsctl/bdump/'
alias udump='cd $ORACLE_HOME/admin/wmsctl/udump/'
;;
*)
ORACLE_SID=wmsdata
export ORACLE_SID
alias pfile='cd $ORACLE_HOME/admin/wmsdata/pfile/'
alias bdump='cd $ORACLE_HOME/admin/wmsdata/bdump/'
alias udump='cd $ORACLE_HOME/admin/wmsdata/udump/'
;;
esac
The problem is that when I run this script the ORACLE_SID stays the same and does not change.
when I set -vx I notice that th list of commands associated with the reponse do run, yet the variable does not change.
Please help.
Thanks in advance
Suresh
added code tags for readability --oombera