Created
December 11, 2012 09:54
-
-
Save yaitskov/4257406 to your computer and use it in GitHub Desktop.
concurrent launch scripts on multiple ssh servers
This file contains 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
#!/bin/bash | |
SERVERS=servers.txt | |
SCRIPT="template6.sh" | |
#SCRIPT="test.sh" | |
rm -rf logs | |
mkdir logs | |
for target in `cat $SERVERS` ; do | |
echo connecting to $target | |
ssh root@$target bash < $SCRIPT 2>&1 | tee logs/$target.log & | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment