In a (ba)sh script of mine, I have, for example:
MYVAR=\'Alice says: \"Hello, Bob.\" But Bob isn\'t listening.\'
This is a syntax error, since
A non-POSIX solution which is supported in bash, at least, is the following:
MYVAR=$'Alice says: "Hello, Bob." But Bob isn\'t listening.'
The $ causes escape processing.
$