vagrant - How do I call a shell function and pass it to ssh? -
so,
echo 'echo hi;echo hello' | vagrant ssh slave3
works fine. does,
cat scr.sh | vagrant ssh slave3
but want have function contents can pass on vm. like:
echo functionname | vagrant ssh slave3
it says
-bash: line 1: functionname: command not found
i tried
functionname|vagrant ssh slave3
with contents of function:
fn() { echo hi }
but
-bash: line 1: hi: command not found
Comments
Post a Comment