I am preparing a script which executes following things:
1) Logs into 8 cluster one by one.
2) After logging into each cluster,it prints the cluster name & then exit from that cluster.
3) Then it logs to next cluster & peform the same task.
Here is what i have written :
for ((i =1;i<=8;i++))
do
ssh cluster$i
echo "cluster$i"
exit
done
Currently what is happening is it is logging into all the cluster simultaneously without printing the cluster number & exiting from that cluster.
Thanks all for your responses.
I am still not able to get the script works as expected.
I want to login into each of eight cluster & delete the directory work under /opt/space/.
This directory is available in each cluster at same location.