I have to replace all slashes, antislashes, single and double quotes in a variable, possibly in on pass, with their escaped version:
' --> \'
" --> \"
\ --> \\
/ --> \/
At this point, I use this to replace single quote:
${MYVAR//\'/\\\'}
But I'm stucked when I'm trying to replace slashes, antislashes, single and double quotes in one pass.