Created
October 3, 2014 10:19
-
-
Save jp/fde9c478c07fdc9ad7a3 to your computer and use it in GitHub Desktop.
run ssh command in a loop on an array of IP addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array=( | |
10.0.0.1 | |
10.0.0.2 | |
10.0.0.3 | |
10.0.0.4 | |
10.0.0.5 | |
) | |
for i in "${array[@]}" | |
do | |
ssh root@$i yum install openssl -y | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment