Sponsored Content
Top Forums Shell Programming and Scripting Usage of disc group to kick off Oracle RMAN backup Post 302941356 by sub on Wednesday 15th of April 2015 11:54:43 AM
Old 04-15-2015
Thanks Don. that gave same error as well.I have put set -x to debug. it gives following o/p.

Code:
++ df -kh
++ grep oraarch
++ awk '{ print$4 " " $5 }'
+ mountpoint='
1% /oraarch'
+ '[' 1% /oraarch -ge 50 ']'
./rman_backup.sh: line 4: [: too many arguments

I tried modifying the script by changing it to:

Code:
mountpoint=(df -kh|grep \oraarch|awk '{ print$4 " " $5 }')
threshold=20
if [ $mountpoint -gt $threshold ]; then


the it errors out to
Code:
./rman_backup.sh: line 3: syntax error near unexpected token `|'
./rman_backup.sh: line 3: `mountpoint=(df -kh|grep \oraarch|awk '{ print$4 " " $5 }')'

not sure what am i doing wrong.

Last edited by sub; 05-07-2015 at 11:32 AM..
 

8 More Discussions You Might Find Interesting

1. Linux

How to Burn .gp Oracle 9.2.0.4.0 to Compact Disc Media on Windows Box

Hi All, I Downloaded Oracle 9.2.0.4.0 for Linux AS 4 and the file format is Directions to extract the files 1. Run "gunzip <filename>" on all the files. Eg. ship_9204_linux_disk1.cpio.gz 2. Extract the cpio archives with the command "cpio -idmv < <filename>" Eg. cpio -idmv... (0 Replies)
Discussion started by: prakashpichika
0 Replies

2. Shell Programming and Scripting

Shell Script for RMAN Backup

Hi Experts, Can anyone help me to write shell script for taking backup with RMAN in oracle 9i or suggests me any site which has this kind of scripts Thanks shaan (1 Reply)
Discussion started by: shaan_dmp
1 Replies

3. Solaris

Ultra 10 - Copying Files From Disc After Booting Up With Recovery Disc?

Hello, I'm still learning unix and I have what is probably a simple question but I can't seem to find the question to. I have an Ultra 10 Sparc Server running solaris 8 and the drive may have crashed (I hope not). Currently, it appears some files in the /etc folder are missing. I have a backup... (1 Reply)
Discussion started by: ideffects
1 Replies

4. AIX

How to backup and restore more than 1 volume group

Hello, Could someone tell me if I have this correct. If I have 2 volume groups rootvg and datavg and wish to back these up to 21 tape how do I accomplish this. I am currently using mksysb /dev/rmt0.1 -V savevg -f /dev/rmt0 datavg I think this may be overwriting the rootvg however as... (3 Replies)
Discussion started by: pobman
3 Replies

5. UNIX and Linux Applications

Running RMAN backups from grid control but using oracle account with rsa keys vs a password ?

I'm a sysadmin trying to help out one of our DBA's setup the RMAN backups (Oracle 11g on rhel5 ) so they can schedule and control them from the OEM grid control. But we want the oracle user to use ssh keys instead of a password. I have the working rsa keys in place for the user but the GUI seems to... (0 Replies)
Discussion started by: samael00
0 Replies

6. UNIX for Advanced & Expert Users

any quicker way to list disc usage by users?

Hi: it takes a long time for "du -sh list_of_users" to give you the output. Is there a quicker way to get this info? Thanks! N.B. Phil (4 Replies)
Discussion started by: phil518
4 Replies

7. Solaris

Solaris 11 - how to backup and restore system disc

I have installed Solaris 11 Express on my machine and now I am wondering what is the best way to backup (to another hard disc) and restore the system hard disc content. The backup should to be done every night using a script launched by cron and all previously done backups should be available to... (8 Replies)
Discussion started by: RychnD
8 Replies

8. UNIX for Dummies Questions & Answers

Help on parsing Oracle RMAN output for string and print sections of a file

Hi, I need some advise on how to print 'sections' of the attached file. I am searching for some that says Marked Corrupt and print some lines after it. At the moment I am running the command below: sed -n -e '/Marked Corrupt/{N;N;p;}' rman_list_validate.txtThis gives me the following... (1 Reply)
Discussion started by: newbie_01
1 Replies
All times are GMT -4. The time now is 03:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy