I have two bash scripts
main.sh and a
util.sh, and I reference
utils.sh in the
main.sh by using
. util.sh. Now I want to run
main.sh via ssh. Obviously, this won't work:
ssh user@host "bash /dev/stdin < main.sh"
Because remote shell cannot find
util.sh. So how should I do this, without copying
util.sh to remote machine ?