I log in through ssh and run bash. In these bash commands, I need to call a specific function in a python file and pass a string argument into this function.
What I have right now:
echo "commands" | ssh into instance
where commands contains
python -c 'from python file import myfunction;
myfunction({}) ' ... .format(myvariable)
myvariable is a string containing multiple words.
However, when ssh completes and the commands are executed, debugging logs show that the quotes around myvariable are gone and when passed into myfunction, I get an error for undefined input variables.
How do I make sure myvariable stays a string?