In Bash, printf kan de ontsnapping voor je doen:
$ a=''\''"\;:#[]{}()|&^example@sqldat.com!?, .<>abc123'
$ printf -v var "%q" "$a"
$ echo "$var"
\'\"\\\;:#\[\]\{\}\(\)\|\&\^\example@sqldat.com\!\?\,\ .\<\>abc123
Ik laat het aan jou over om te beslissen of dat agressief genoeg is.