RE: https://oldbytes.space/@drscriptt/116201844724654554
I used #sed in a new way today:
1s/^/<root>/;s/'/“/g;$s/$/<\/root>/
To prepend the root opening tag, append the root closing tag, and to replace all ' with a double quote.
Why double quote vs apostrophe? Because it’s easier from the command line than trying to get escaping correct and it doesn’t matter. My use case is just as happy with:
<node attribute=“value”/>
As it is with:
<node attribute=‘value’/>