for SLAVE_CLUSTER,MASTER_CLUSTER in $MASTER_CLUSTERS $SLAVE_CLUSTERS
do
echo "Master cluster boxes are ${!MASTER_CLUSTER}"
echo "Slave cluster boxes are ${!SLAVE_CLUSTER}"
done
I am trying to get value of SLAVE_CLUSTER
,MASTER_CLUSTER
in one for loop but i am getting errors. How can we get both variables in one for
loop?
Here is my master and slave cluster variable
export MASTER_CLUSTER_1="MASTER1 MASTER2"
echo "MASTER_CLUSTER_1 = $MASTER_CLUSTER_1"
export MASTER_CLUSTER_2="MASTER1 MASTER2"
echo "MASTER_CLUSTER_2 = $MASTER_CLUSTER_2"
export SLAVE_CLUSTER_1="SLAVE1 SLAVE2 SLAVE3 SLAVE4"
echo "SLAVE_CLUSTER_1 = $SLAVE_CLUSTER_1"
export SLAVE_CLUSTER_2="SLAVE1 SLAVE2 SLAVE3 SLAVE4"
echo "SLAVE_CLUSTER_2 = $SLAVE_CLUSTER_2"
while
.for
does one thing,while
does anythingwhile
true. – mikeserv Dec 11 '15 at 19:09