#!/bin/ksh # Exit if no first parameter $1 passed if [ -z "$1" ] then echo "Please pass a valid ORACLE_SID\ to this script" exit 99 fi # Validate the Oracle database name with # lookup in /etc/oratab TEMP=`cat /etc/oratab|grep \^$1:|\ cut -f1 -d':'|wc -l` tmp=`expr TEMP` # Convert string to number if [ $tmp -ne 1 ] then echo "Your input $1 is not a valid ORACLE_SID." exit 99 fi