I’m not very good at writing shell scripts, mainly because of my ignorance to the power of the shell. Today I learned you can write a pretty complex shell script as an ssh command. For example,

ssh $REMOTE_USER$h /bin/bash << EOF
[ -d $Build ] || {
echo "ERROR: Build environment $Build missing" >&2
exit -1
}
...
EOF

I found that cool.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s