The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
Passing the values to the secondary script when it invoked by primary script venu_eie UNIX for Advanced & Expert Users 2 07-03-2008 08:10 AM
Passing the values to the secondary script when it invoked by primary script venu_eie Shell Programming and Scripting 1 07-03-2008 07:16 AM
create a shell script that calls another script and and an awk script magikminox Shell Programming and Scripting 0 06-26-2008 03:50 AM
help me in sending parameters from sqlplus script to unix shell script Hara Shell Programming and Scripting 2 01-29-2008 03:31 PM
Shell Script: want to insert values in database when update script runs ring Shell Programming and Scripting 1 10-25-2007 04:06 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-08-2008
rwaite49 rwaite49 is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 2
Question srdf script

I need a script which compares two conditions and depending on the input will output the correct result.
therefore, syntax;
in aix 5.3 - cmdline# symrdf -g HA_DG query | awk '/Split/ {print "SRDF is Not Running " }'
or .... this is where I need the assist....
symrdf -g HA_DG query | awk '/Synch*/ {print "SRDF ENABLED" }'
it is basically a test to determine the state of SRDF/S link at a site. How - what syntax do I use to tie the script together?

Thank you in advance,
Richard
  #2 (permalink)  
Old 12-11-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
How about:


Code:
if symrdf -g HA_DG query | grep -q Split
then
    echo SRDF is not running
fi

if symrdf -g HA_DG query | grep -q 'Synch.*'
then
     echo SRDF Enabled
fi

Note that if you have multiple devices in that output and some are Synched and some are Split then both conditions would be true... is that what you want?
  #3 (permalink)  
Old 12-30-2008
rwaite49 rwaite49 is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 2
Yes - thanks for your efforts _ Il will work with this and modify if I have to...

Happy Holidays!
Richard
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:45 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0