This question already has an answer here:
How can I properly escape arbitrary commands?
sudo -u chris sh -c 'echo "\"leftright\""'
The above echos:
How would I echo out:
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.