Sponsored Content
Full Discussion: flags to avoid restart
Top Forums Shell Programming and Scripting flags to avoid restart Post 302705825 by crazy_max on Tuesday 25th of September 2012 02:57:14 PM
Old 09-25-2012
yes you are totaly right, I was editing part of the script...and i missed out something...so the egrep is like below...its looking for a word called NBU at end of each line...if there is one then it obviously greps it...i will edit the original post as well...thanks...
Code:
egrep -i ":NBU" $ORATAB | grep -v "^#" | grep -v "\*" | cut -d":" -f1 | sort | uniq

Quote:
Originally Posted by Don Cragun
I'm missing something here. You have:
Code:
 ... ... ...
export ORATAB=/etc/oratab

###START OF LOOP
for db in `egrep -i $ORATAB | grep -v "^#" | grep -v "\*" | cut -d":" -f1 | sort | uniq`
do
 ... ... ...
done

which means that you are asking egrep to look for the string "/etc/oratab" (matching uppercase or lowercase letters) from lines it reads from standard input. What input are you feeding into this script?

If instead you are grepping /etc/oratab and just didn't show us the ERE your looking for in /etc/oratab, please tell us what the ERE is and show us the contents of /etc/oratab.
---------- Post updated at 01:57 PM ---------- Previous update was at 01:53 PM ----------

here is output of /etc/oratab

Code:
test1:/oracle/ORAHOME/112_64:N:NBU
ptst:/oracle/ORAHOME/REP:N:NBU
alpd:/oracle/alpd/REP:Y
dsd:/oracle/ORAHOME/112_64:Y:NBU
yyd:/oracle/ORAHOME/112_64:Y:NBU
u1u:/oracle/ORAHOME/u1u:Y:NBU


Last edited by Corona688; 09-25-2012 at 04:04 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

if flags

Hi folks. I'm just starting to teach myself shell scripting and am having some trouble with an if statement. I am working with a directory where only one file will reside at a time and need to evaluate if this file is compressed to determine subsequent steps. I'm using echo for testing purposes.... (2 Replies)
Discussion started by: kristy
2 Replies

2. Shell Programming and Scripting

makefile not taking -D flags

Hi, I found this strange behaviour while using one of the makefiles. Here is the snippet of the unix.mak that is necessary for this context SO = SvSocket.o SvStmt.o SvOdbcWrapper.o \ OdbcCallReader.o MgrCalls.o OdbcSvProxy.o \ OdbcSvApp.o... (4 Replies)
Discussion started by: vino
4 Replies

3. AIX

question concerning Grep flags

Hey all. I am trying to find a process that is running and appending it to a file. The comman I am using is ps -eaf |grep tctl. The problem is, it returns the tctl process as well as the grep process that I just ran. Is there a flag that will prevent the command from returning itself? ... (2 Replies)
Discussion started by: jalge2
2 Replies

4. Shell Programming and Scripting

Making flags for my script

I have no idea how to make my own flags. (6 Replies)
Discussion started by: rcunn87
6 Replies

5. UNIX for Advanced & Expert Users

Processes Communication Only with flags!

hello everybody and a happy new year! i am trying the client-server model...i have no problem with sockets etc... especially for server:there is a father who is listening for TCP connections from clients,the later send commands which parent shares to his children. then children execute... (1 Reply)
Discussion started by: vaggelakis
1 Replies

6. UNIX for Dummies Questions & Answers

Question about Setting Flags

I have a script which will look for a test folder under the parent directory. If the folder contains test folder then create the same directory structure in other remote machine. Once the directories are created then transfer all the contents of that test folder. this is what i am doing :- ... (2 Replies)
Discussion started by: chris1234
2 Replies

7. IP Networking

arp output (flags)

I'm running an arp -an on a Solaris 10 box. We're using IPMP. One of the systems is not able to see a host on the same network. The only difference between the two systems (one is having a problem, the other isn't) at least so far is the output of arp: # arp -an | grep 224.55 e1000g5... (1 Reply)
Discussion started by: BOFH
1 Replies

8. Shell Programming and Scripting

Need help to identify the flags by scripts.

Hi, I have two different scripts sap_ftp.sh and sap_ftp_dd.sh which are running continously in background. I am using another script called start.sh to launch these two scripts. Either one script will process files at a time . During that time other script will sleep.. Each script will... (1 Reply)
Discussion started by: bhargav20
1 Replies

9. UNIX for Dummies Questions & Answers

WHat are flags?

Can anybody actually tell, what is flag? I know they are termed as permission flags and various others. Please explain (3 Replies)
Discussion started by: nixhead
3 Replies

10. UNIX for Dummies Questions & Answers

Ifconfig Flags

Hi there, I need your help in understanding the below Solaris 10 ifconfig output; athnetspns02>ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 e1000g0:... (2 Replies)
Discussion started by: wthomas
2 Replies
BACKUP.D(5)							backupninja package						       BACKUP.D(5)

NAME
BACKUP.D - Action configuration files for backupninja(1). SYNOPSIS
/etc/backup.d/* DESCRIPTION
To preform the actual backup actions, backupninja processes each action configuration file in /etc/backup.d according to the file's suffix. .sh run this file as a shell script. .rdiff backup action for rdiff-backup. .dup backup action for duplicity. .maildir backup action for slow, incremental rsyncs of tens of thousands of maildirs. .mysql backup action for safe MySQL dumps. .pgsql backup action for safe PostgreSQL dumps. .sys backup action for general system reports and hardware information. .svn backup action for safe backups of subversion repositories. .trac backup action for safe backups of trac repositories. .makecd backup action for burning backups to CD/DVD or creating ISOs. These files must be owned by root and must not be world or group readable/writable. Support for additional configuration types can be added by dropping bash scripts with the name of the suffix into /usr/share/backupninja. The configuration files are processed in alphabetical order. However, it is suggested that you name the config files in "sysvinit style." For example: 10-local.pgsql.disabled 15-runthisfirst.sh 20-runthisnext.mysql 90-runthislast.rdiff Typically, you will put a '.rdiff' config file last, so that any database dumps you make are included in the filesystem backup. Action con- figurations which end with .disabled are skipped. Example templates for the action configuration files can be found in /usr/share/doc/backupninja/examples. You can also use ninjahelper(1), a console based "wizard" for creating backup actions. SCHEDULING
By default, each configuration file is processed everyday at 01:00 (1 AM). This can be changed by specifying the 'when' option in a backup action's config file or in the global configuration file. Special value 'manual' will disable scheduling for the backup action. It is pos- sible to run the backup action manually by invoking ninjahelper(1) with --run command line argument. For example: when = sundays at 02:00 when = 30th at 22 when = 30 at 22:00 when = everyday at 01 when = Tuesday at 05:00 when = hourly when = manual These values for "when" are invalid: when = tuesday at 2am when = tuesday at 2 when = tues at 02 A configuration file will be processed at the time(s) specified by the "when" option. If multiple "when" options are present, then they all apply. If two configurations files are scheduled to run in the same hour, then we fall back on the alphabetical ordering specified above. The "when" must occur before any sections in the action configuration file. FILE FORMAT
The file format of the action configuration files is "ini style." Sections are created by using square bracket. Long lines are connected with a backslash. For example: # this is a comment [fishes] fish = red fish = blue [fruit] apple = yes pear = no thanks i will not have a pear. SEE ALSO
backupninja(1), ninjahelper(1), backupninja.conf(5), AUTHOR
BACKUPNINJA was written by the riseup.net collective. riseup October 10, 2005 BACKUP.D(5)
All times are GMT -4. The time now is 05:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy