So I have been running local scripts fine on a remote server:
ssh user@server "`cat local-script.sh`"
However, today I have a script that has both single and double quotes in it. Which causes the script to fail because the output of
cat local-script.sh is wrapped in quotes. With out modifying the script itself, is there a better way to handle this?
I thought this may work:
ssh user@server $(<local-script.sh)
But is does not seem to do anything...