Created
October 17, 2015 13:31
-
-
Save breezhang/45c92dcc68647d8c129b to your computer and use it in GitHub Desktop.
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
like perl ruby << | |
How about a "here document" | |
ssh otherhost << EOF | |
ls some_folder; | |
./someaction.sh 'some params' | |
pwd | |
./some_other_action 'other params' | |
EOF | |
To avoid the problems mentioned by @Globalz in the comments, you may be able to (depending what you're doing on the remote site) get away with replacing the first line with | |
ssh otherhost /bin/bash << EOF | |
http://tldp.org/LDP/abs/html/here-docs.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment