am a newbie to unix. plz help in understanding this code.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers am a newbie to unix. plz help in understanding this code.
# 1  
Old 12-23-2008
am a newbie to unix. plz help in understanding this code.

hi everybody.
please help me in understanding this code.



echo "************* starting job on `date +\"%d/%m/%Y at %T\"` **************"
#
scriptdir=`dirname $0`
. ${scriptdir}/env_params.sh
#
SHLIB_PATH=${ORACLE_HOME}/lib:
export SHLIB_PATH
export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:/usr/lib
export NLS_LANG=AMERICAN_AMERICA.US7ASCII

BDIR=${hotbackupdir}/`date +%a`
export BDIR

#if instance is not running, abandon

ps -aef | grep pmon_${ORACLE_SID} | grep -v grep > /tmp/check_sid
if [ -s /tmp/check_sid ]
then
echo ' '
echo "**** ${ORACLE_SID} instance is running, hot backup will be run ****"
echo ' '
else
echo "**** ERROR! ${ORACLE_SID} instance is not running, hot backup will not be run ****"
exit 1
fi

cat /tmp/check_sid > /tmp/hb.log
# 2  
Old 12-23-2008
echo current date and time

scriptdir = directory containing script

${ORACLE_HOME} directory where Oracle products are installed

BDIR=${hotbackupdir}
directory of backup created

ps -aef | grep pmon_${ORACLE_SID checks that the oracle database is running
if not the backup will not run


hope the ablove helps

Andy

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Understanding Tetris-game code. newbie

Hi All, Been trying to understand the code in tetris game (in the sticky threads) & i know i have a alot reading /practice to do. it's using advanced methods with arrays and arithmetic and would much appreciate if some one can guide me to good books that's not outdated that would help me take... (0 Replies)
Discussion started by: xcod3r
0 Replies

2. Shell Programming and Scripting

Plz explain the process of this code....

Hi Unix Gurus, Please explain the processing done by the code mentioned below: for (i=1;i<=59;i++) { sub(/ *$/,"", $i) } newrec_key = $2 new_line = $0 if (empty_oldfile==1) { #newly added record ++num_add print "Added key: ", newrec_key > LogFile #print out... (4 Replies)
Discussion started by: ustechie
4 Replies

3. Shell Programming and Scripting

help understanding 'exec' command plz

plz someone explain me what does -exec ls -Fd do? :confused::confused::confused::confused::confused::confused: Thanks in advance !! (3 Replies)
Discussion started by: sears
3 Replies

4. Shell Programming and Scripting

Understanding of a script as a scripting newbie

Hi! I have the following script and do not understand part of it. I have a very little understanding of scripting. The script is for Nagios to check the response of fast-com.de. The guy who has written it is no longer in the company. #!/bin/sh PATH=/adm/bin:/bin:/usr/bin export PATH ... (2 Replies)
Discussion started by: locutus01
2 Replies

5. Solaris

Plz help me in understanding SUDO !!

Hello, I 'am trying to understand how sudo works. OS: Solaris 10 on SPARC I have 3 OS users: Oracle,App,Vendor. User : Group Oracle : oinstall,dba App : oinstall,dba,work Vendor : work What i want to do I need to run sqlplus from VENDOR using APP as... (3 Replies)
Discussion started by: JohnJacobChacko
3 Replies

6. Shell Programming and Scripting

Can any1 plz have a look at this code

Thankyou (2 Replies)
Discussion started by: Freakhan
2 Replies

7. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

8. UNIX for Dummies Questions & Answers

unix script plz help

cdfcxvvbbvnbjmjnhjml. (1 Reply)
Discussion started by: sree11
1 Replies

9. Shell Programming and Scripting

a piece of code, plz help to review

use "getopts" to get params from command. Need replace black with a specified string like "%20 DEFAULT_DELIM=%20 ... while getopts dek:f:t:vh OPTION do case $OPTION in t) DELIM=`tvar=/'"$OPTARG"'/ svar="$DEFAULT_DELIM" awk 'BEGIN{T=ENVIRON;S=ENVIRON; while(index(T,S)!=0){S=S"0"};print... (0 Replies)
Discussion started by: anypager
0 Replies

10. UNIX for Dummies Questions & Answers

plz Help How should I configure cc compiler output file plz help???

i.e configuration of C compiler :confused: (4 Replies)
Discussion started by: atiato
4 Replies
Login or Register to Ask a Question