Thursday, March 21, 2013

I have a alot of servers that have padded numerics in their names. Here's a quick way to issue SSH commands to all of them. The key is to use good old printf

for i in {1..10}; do ssh cloud-host-$(printf "%02d" $i) iscsiadm -m node -T -u; done

No comments:

Post a Comment