Hi Script Gurus,
I am facing issue with while loop in bash. The while loop is running as end less loop even after given criteria does not meet.
STATE_BEFORE_SPLIT () {
for clone in $Clonegroups; do
state=$( $Navicmd -listclone -name $clone -cloneid $Cloneid |awk '/^CloneState:/ {print $2}' |grep Synchronizing )
while [ "$state" = "Synchronizing" ]; do
for clone in $Clonegroups; do
$Navicmd -listclone -name $clone -cloneid $Cloneid -PercentSynced|egrep 'Name|PercentSynced'|paste - - |egrep -v 'N/A|100'
done
sleep 120
done
done
}
In above code while /do loop does not end even after my test strings status changed from "Synchronizing" to some other state.
Any help is appreciated.