I want to do the following commands in ruby.
- ssh into another computer using
ssh example@example - set source file
source ~/.profile cd to/some/folder- call my shell script with parameters, a json formatted string ,
./my_script.sh my_hash.to_json
However I am facing these problems: I call them in one line using backticks, it works, but it is a very bad practice in my opinion because it is not readable nor it is maintainable.
On the other hand, when I call my_hash.to_json, the resulted string has non-escaped double quotes, How do I escape them?