자료

instance 여러개인 경우 profile 보기 편하게 수정

by 유주환 posted Apr 18, 2010
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
#!/usr/bin/ksh
#==============================================================================
PS3="Please choose the number of the Database you wish to switch >"
function Title {
print "********************************************************************************"
 print $1 |awk  '{spaces = ""
 for (i = 1; i < (80 - length($0)) / 2; i ++)
 spaces = spaces " "
 print spaces $0 }'
print "********************************************************************************"
}
#==============================================================================
TESTDB()
{
Title "TESTDB LOGIN COMPLETED"
Title "TESTDB Environment Applyed"
. /oracle/unsdb.env
}
#==============================================================================
#==============================================================================
TEST2DB()
{
Title "TEST2DB LOGIN COMPLETED"
Title "TEST2DB Environment Applyed"
. /oracle/TEST2db.env
}
#==============================================================================
#==============================================================================
Quit()
{
Title "USER LOGIN CANCELED"
Title "Environment Not Applyed"
exit
}
#==============================================================================
#==============================================================================
#  Main Menu
#==============================================================================
clear;
select report in TESTDB TEST2DB Quit
do
 case $report in
        TESTDB)TESTDB;break;;
        TEST2DB)TEST2DB;break;;
        Quit)Quit;break;;
 esac
done
## END OF SCRIPT
TAG •