You can easily google “shell escaping” and get lots of answers for how the linux shell handles strings, either delimited with single or double quotes. Here is an example:
You will also learn, that strings with single quotes are the safe quotes, because there are much less characters interpreted as special characters, whereas with double quotes there are a lot of magic going on.
Last point is, that “/bin/sh” is on most systems a link to “bin/bash” or another default shell, that comes with the system. So bash does have basically the same escaping rules than shell but adds some specialties for bash.
So, if your system is using bash, then you can also consult this article:
Roundup is, that this is not specifically an openHAB topic but of the underlying OS and its installed shell.
One last word on this. The definition of the string is based on the language specification on strings. I cannot tell by your example, if you are using Xtend or JavaScript. Nevertheless, these escaping rules apply to the language specification of the programming language you are using and you will find also well defined descriptions of the syntax.
Hope this helps for a starter to get you in the position of getting an own insight on escaping without try and error.