troubleshooting Question

unix script

Avatar of bkreynolds48
bkreynolds48 asked on
Unix OS
3 Comments1 Solution412 ViewsLast Modified:
can someone tell me why my unix script does not work?
when I run it and then do an

env|grep ORA

nothing comes back so I know it is not working

system is aix 6.1
I use Kornshell


#!/bin/ksh
#Terminal settings
REV=`tput rev`
BLINK=`tput blink`
BEL=`tput bel`
BOLD=`tput bold`
ULINE=`tput smul`
DIM=`tput dim`
OFF=`tput sgr0`
MACH=`uname -n`
#
 while true
 do

clear
echo "Select which oracle database you would like to user..."
echo
echo "1)  parprd"
echo "2)  karprd"
echo
echo "Enter Choice: \c"
read CHOICE
echo;echo
case $CHOICE in
1) echo "$REV$BOLD Setting env for parprd ... $OFF"
echo
sleep 1
export ORACLE_SID=parprd
export ORACLE_BASE=/oracle/product
export ORACLE_ADMIN=/oracle/product/admin
export ORACLE_HOME=/oracle/product/10.2.0
export PATH=$ORACLE_HOME/bin:$PATH
echo $ORACLE_SID
break;;
2)echo "$REV$BOLD Setting env for karprd ... $OFF"
echo
sleep 1
export ORACLE_SID=karprd
export ORACLE_BASE=/u01/oracle/product
export ORACLE_ADMIN=/u01/oracle/product/admin
export ORACLE_HOME=/u01/oracle/product/11.2.0
export PATH=$ORACLE_HOME/bin:$PATH
echo $ORACLE_SID
*) echo "Invalid choice..."
echo "Press <CR> to continue."
read ans
continue
esac
don
echo
#
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros