06-12-2012
Quote:
Originally Posted by
Leion
The system_reboot.flg should be a flag file and not a script..
this is what your script is doing:
first it sets up some variables, including the PASS, which is holding the password to log into oracle.
after setting up the variables, it removes/deletes all the files that has a file extension of Z in directory /orabkup/USUP/
Then it checks for the non-existence of the /tmp/system_reboot.flg file.
if this is indeed not present, it will run the commands found in the oracle sql files.(hotback up as you mentioned)
I hope this is clear..
YEs is clearer now.
Check the existence of the flat file system_reboot.flg. From the name , i think is to check whether the last reboot indeed have remove / change the flag? Or is it to check for system reboot. To make sure it is not going to reboot while doing the backing?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello:
I'm a totally newbie here. My company has UNIX. My development team would like me to learn UNIX and shell scripting.
I've worked with Linux in the past, very briefly. I have Ubuntu installed on my laptop. I was wondering whether or not the shell scripting for Linux is the same... (0 Replies)
Discussion started by: hbradshaw
0 Replies
2. Shell Programming and Scripting
# sub: find block (in cols), return line-numbers (begin-end) or 0 if notfound
sub findb{
my ($exp1,$col1,$exp2,$col2)= @_; # $exp = expression to find, $col - column to search in
my $cnt=0;
my ($val1,$val2);
my ($beg,$end);
for($cnt=1;$cnt<=65536;$cnt++){
$val1 =... (3 Replies)
Discussion started by: suvenduperl
3 Replies
3. UNIX for Dummies Questions & Answers
Hi
I've been using Linux (Ubuntu) specifically for about 5 years now and been dabbling with nix for a couple more. I really am worried that with the way distro's are going and package management that i'm starting to loose touch with compiling applications and really understanding how they work.... (4 Replies)
Discussion started by: shitson
4 Replies
4. UNIX for Dummies Questions & Answers
i am trying to understand this script example. the text does not explain it. can someone tell me briefly what each of the functions do. any help will be appreciated.
#!/bin/bash
killtree() {
local _pid=$1
local _sig=${2-TERM}
for _child in $(ps -o pid --no-headers --ppid... (1 Reply)
Discussion started by: iluvsushi
1 Replies
5. Programming
Hi,
I have started reading about Linux kernel. The books also explains about the source code here and there.
I found a file named head.s in the source which i am not able to understand, it looks like some assembly language.
Can anyone confirm this, so that can start looking for assemble... (3 Replies)
Discussion started by: kumaran_5555
3 Replies
6. Shell Programming and Scripting
Hi Guys,
I am new to scripting , I am trying to rebuild a script based on an old script. Can someone help me figure out what the script is doing? This is only a part of the script.
I am looking to interpret these two points in the scripts:-
1)
test=`echo $?`
while
I do not... (3 Replies)
Discussion started by: rajsan
3 Replies
7. Ubuntu
recommend books to understand ubuntu ...... (14 Replies)
Discussion started by: vyom
14 Replies
8. Shell Programming and Scripting
Hi,
New to this forum, as well as to unix scripting..need help to understand below script ...
sendNotice_sp()
{
ATTACH=${LNXLOG:-}
if ; then
if ; then
mail -s "$ERR_MSG" $ERR_EMAIL_TO < $ATTACH
fi
else
mail -s "$ERR_MSG" $ERR_EMAIL_TO < /dev/null
fi
}
afaik this is sm kind of... (6 Replies)
Discussion started by: gnnsprapa
6 Replies
9. Shell Programming and Scripting
Could someone please help me in understanding the code below:
#!/usr/bin/ksh
Month=`date|cut -c5-7`
Day=`date|cut -c9-10`
Year=`date|cut -c27-28`
Rom2Jul() { case $Month in Feb) Day=$(( $Day+31 ));;
Mar) Day=$((... (27 Replies)
Discussion started by: hasn318
27 Replies
10. UNIX for Beginners Questions & Answers
Below script is called as Reducer, I am not sure how it work, can some expert explain me what this script does as i am a beginner.
inputfile:
hi hi how are are you
code:
#!/bin/bash
lastkey=""; -- what does this mean, because i saw in debug mode it is taking value as hi
count=0;... (13 Replies)
Discussion started by: mirwasim
13 Replies
reboot(2) System Calls Manual reboot(2)
NAME
reboot - boot the system
SYNOPSIS
DESCRIPTION
causes the system to reboot. howto is a mask of reboot options (see specified as follows:
A file system sync is performed (unless
is set) and the processor is rebooted from the default device and file.
The processor is simply halted.
A sync of the file system is performed unless the flag is set. should be used with caution.
On systems with cellular architecture, all cells in the partition are
rebooted in order to reconfigure the stable complex configuration data. On systems with non-cellular architec-
ture, the default is A sync of the file system is performed unless the flag is set.
Shut down the system firmware to a "ready to reconfigure" state and do not
reboot. This option can be used only in combination with
A sync of the file system is not performed.
Unless the flag has been specified, reboot(2) unmounts all mounted file systems and marks them clean so that it will not be necessary to
run fsck(1M) on these file systems when the system reboots.
Only users with appropriate privileges can reboot a machine.
RETURN VALUE
If successful, this call never returns. Otherwise, a -1 is returned and is set to indicate the error.
ERRORS
fails if this condition is encountered:
[EPERM] The effective user ID of the caller is not a user with appropriate privileges.
DEPENDENCIES
The default file and device for is on the current root device.
AUTHOR
was developed by HP and the University of California, Berkeley.
SEE ALSO
reboot(1M), privileges(5).
reboot(2)