The line
echo xxx | sed "s/xxx/a""b/"
outputs
ab
rather than
a"b
as expected.
What's the fix?
Use below command: $
echo xxx | sed s/xxx/a\"\"b/
output will be : a""b
Please note that ("(quote)should be escaped, so we need to do this twice that's the trick here)