Last active
August 4, 2016 21:05
-
-
Save olivierpierre/fa8f9008fab07db7eced9dd1f01eda60 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
set -euo pipefail | |
SCRIPT_RUN_SINGLE="/root/Xen_scripts/vm_run_cmd.sh" | |
if [ "$#" -lt 4 ]; then | |
echo "usage: $0 <prefix> <start> <stop> <cmd>" | |
exit | |
fi | |
for i in `seq $2 $3`; do | |
( ssh root@$1$i ${*:4} 2>&1 | sed "s/^/[$1$i] /" ) & | |
done | |
wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment