Could you explain what this line of code does?
ssh -t user@example.com "$(< ./my-setup-script.sh)" ssh -t user@example.com "$(< ./my-setup-script.sh)" ssh -t user@example.com /bin/bash < my-setup-script.sh
That is, take the contents of the local file 'my-setup-script.sh' and run them as commands on example.com as the 'user' user (using SSH to authenticate the user & transport the commands).Oh, while transferring!
ssh -t user@example.org bash <( echo "function do_it() {"; cat my-setup-script.sh; echo -e "}\ndo_it" )
No argument limits to worry about, no quoting hassles. ssh -t user@example.com "$(cat ./my-setup-script.sh)"
I'll have to file this away myself![bash] https://www.gnu.org/software/bash/manual/html_node/Command-S...
[posix] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3...