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.
Hope this helps for a starter to get you in the position of getting an own insight on escaping without try and error.