Unix Shell - Help bash scripting

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > March 2005 > Help bash scripting





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Help bash scripting
carmelomcc

2005-03-28, 6:18 pm

I need help fixing my grep command in this script. I am trying to grep
a file for out put. Once it = synchronized i want to move forard in
the script. Below is the script:

#sP ip address
export SPA=172.18.2.225
export SPB=172.18.2.226
#
date
#
java -jar "c:\program files\emc\navisphere cli\navicli.jar" -User emc
-Password emc -Scope 0 -Address $SPA snapview -syncclone -name test01
-cloneid 0100000000000000 -o
#
echo "Checking Clone Status"
echo "---------------------"
#
#Performing Initial Check to start While Script
#
java -jar "c:\program files\emc\navisphere cli\navicli.jar" -User emc
-Password emc -Scope -0-h $SPA snapview -listclone -Name AD02_CLONE
-CloneState > /tmp/aad02_sync_state.out


#
while :
do
if [ `grep CloneState /tmp/ad02_sync_state.out|cut -d":" -f2` =
Synchronized ]
then

java -jar "c:\program files\emc\navisphere cli\navicli.jar" -User emc
-Password emc -Scope 0 -Address $SPA snapview -fractureclone -name
AD02_CLONE -cloneid 0100000000000000 -o
sleep 120
break
else
sleep 60
java -jar "c:\program files\emc\navisphere cli\navicli.jar" -User emc
-Password emc -Scope 0 -h $SPA snapview -listclone -Name AD02_CLONE
-CloneState > /tmp/aad02_sync_state.out

fi
done

#
sleep 10
#
echo "Syncing clone to remote CX"
navicli -h 10.5.128.14 sancopy -start -name test01
#

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com