Last active
August 4, 2016 21:05
-
-
Save olivierpierre/2c5318a5266aee4fef306e7153bdb498 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 | |
if [ "$1" == "" ] || [ "$2" == "" ]; then | |
echo "usage: $0 <vm_name> <cmd>" | |
exit | |
fi | |
ssh root@$1 ${*:2} 2>&1 | sed "s/^/[$1] /" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment