by emmelaich · 6y ago · 0 comments
$ echo !:q
echo '# This string '\''has single'\'' "and double" quotes
and a $'
# This string 'has single' "and double" quotes and a $ $ # here be quote ' " chars
(use :p to print but not execute)
$ :!q:p
'# here be quote '\'' " chars'
(use :s to modify – no :q here because we modify the already quoted text !!, unquoted is now !-2)
$ !:s/be/are/:p
'# here are quote '\'' " chars'echo !:q > doagain.sh