Let\'s say, you have a Bash alias
like:
alias rxvt=\'urxvt\'
which works fine.
However:
If you have GNU Parallel installed you can use its internal quoting:
$ parallel --shellquote
L's 12" record
'L'"'"'s 12" record'
$ echo 'L'"'"'s 12" record'
L's 12" record
From version 20190222 you can even --shellquote
multiple times:
$ parallel --shellquote --shellquote --shellquote
L's 12" record
'"'"'"'"'"'"'L'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'s 12" record'"'"'"'"'"'"'
$ eval eval echo '"'"'"'"'"'"'L'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'s 12" record'"'"'"'"'"'"'
L's 12" record
It will quote the string in all supported shells (not only bash
).