![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to break within a case/esac and stay in script | tumblez | UNIX for Dummies Questions & Answers | 4 | 04-12-2009 09:22 AM |
| Reset environment - ".. /etc/.environment dev_env" | zzwu3591 | UNIX for Advanced & Expert Users | 7 | 01-12-2007 09:27 AM |
| Unix server will not stay up on the network | jback | UNIX for Dummies Questions & Answers | 3 | 05-05-2005 02:45 PM |
| What can I do,if I want windows me and unix stay in the same computer? | David | UNIX for Dummies Questions & Answers | 2 | 01-07-2001 12:44 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How does the environment stay set
I am running this pre-script with a post scripts that needs to share the same variables. How do I keep the environment variable settings for the next script to access from the RMAN Script?
Prescript #1 #RMAN Script #!/bin/ksh ORACLE_SID=INVPRD;export ORACLE_SID DBNAME=$ORACLE_SID;export DBNAME LOGDIR=/u01/app/oracle/product/10.2.0/scripts/logs/rman;export LOGDIR CURRTIME=`date +"%y%m%d%H%M%S"`;export CURRTIME LOGF=$LOGDIR/bkp_${DBNAME}_FULL_${CURRTIME}.log;export LOGF START=`date +"%m/%d %H:%M"` rman msglog $LOGF <<EOF RMAN script# 2 connect target backup_admin/emcnw@INVPRD.WORLD RUN { ALLOCATE CHANNEL t1 TYPE 'SBT_TAPE'; backup database; release CHANNEL t1; } exit; Post script # 3 EOF RC=$? STATUS=OK if [ $RC -ne 0 ] then STATUS=Error fi END=`date +"%H:%M"` MSG="$STATUS $DBNAME RMAN_Full Backup $START-$END";export MSG #mailx -s "$MSG " romptechteam@txu.com,vviswan1@txu.com < $LOGF mailx -s "$MSG " vviswan1@txu.com < $LOGF |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|