How can I properly escape arbitrary commands?
For example:
sudo -u chris sh -c 'echo "\"leftright\""'
The above echos:
"leftright"
How would I echo out:
"left'right"
I've tried the following which I would expect to work but does not:
sudo -u chris sh -c 'echo "\"left\'right\""'
I can't quite get my head round how it is parsed.