reset='\e[39m\e[49m'
green='\e[32m'
red='\e[31m'
white='\e[97m'
Color_yellow='\e[33m'
BB='\e[0;44m'
function cdLOG() {
: 'COMMENT1
1 DB Alert LOG /
/u01/app/oracle/diag/rdbms/orcl/orcl/trace/
2 TNS Log
lsnrctl status
'
if [ $# -eq 0 ]
then
choice=1
else
choice="$1"
fi
case $choice in
0)
echo -e "
****************************************
${green}1 DB Alert LOG** Default ${reset}.${white}cd /u01/app/oracle/diag/rdbms/orcl/orcl/trace/ ${reset}
${green}2 TNS Log ${reset}.${white}cd /u01/app/oracle/diag/tnslsnr/db01/listener/alert/ ${reset}
${green}3${reset}.${white}I need an apple.${reset}
****************************************"
read choice
cdLOG $choice
;;
1) cd /u01/app/oracle/diag/rdbms/orcl/orcl/trace/; pwd ;;
2) cd /u01/app/oracle/diag/tnslsnr/db01/listener/alert/ ; pwd ;;
*) echo 'Bad choice, see yo next time !!';;
esac
}
function LOG() {
: 'COMMENT1
1 DB Alert LOG
2 TNS Log
lsnrctl status
'
if [ $# -eq 0 ]
then
choice=cd1
else
choice="$1"
fi
case $choice in
0)
echo -e "
****************************************
${green}cd1 cd DB Alert LOG** Default ${reset}. ${white}cd /u01/app/oracle/diag/rdbms/orcl/orcl/trace/${reset}
${green}t1 tail DB Alert LOG** Default ${reset}.${white}tail -f /u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log ${reset}
${green}v1 vi DB Alert LOG ${reset}. ${white}vim /u01/app/oracle/diag/tnslsnr/db01/listener/alert/alert_orcl.log ${reset}
${green}L1 less DB Alert LOG ${reset}. ${white}less /u01/app/oracle/diag/tnslsnr/db01/listener/alert/alert_orcl.log ${reset}
${green}3${reset}.${white}I need an apple.${reset}
****************************************"
read choice
;;
"t1"|"T1") tail -f /u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log
;;
"v1"|"V1") vim /u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log
;;
"l1"|"L1") less /u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log
;;
2) cd /u01/app/oracle/diag/tnslsnr/db01/listener/alert/ ; pwd
;;
*) echo 'Bad choice, see yo next time !!'
;;
esac
}
沒有留言:
張貼留言