#! /bin/sh # # $DBA/calcbkup # # Calculate (and print) the backup file system for the $ORACLE_SID # database. If there is an override data file, then the FIRST file system # listed in it will be printed. # if [ "$ORACLE_SID" = "" ] then echo "Error: ORACLE_SID must be defined before running calcbkup\007" exit 2 fi if [ -r $DBA/back$ORACLE_SID.dat ] then # Use first backup file system found in the override file outlin=`grep -v "#" $DBA/back$ORACLE_SID.dat | head -n 1 | awk -F: '{ print $2 }' -` echo "$outlin" else echo "/back$ORACLE_SID" fi