I have the following XML:
<smtng attr="bla"><desc>bla 12" bla</desc></smtng>
And I would like to use some command (preferably executable from bash) to replace the "
after 12
with "
, but leave it as it is for the attr="bla"
part...
Any ideas?
This may work, but you should really use the proper tools.
sed 's|</\?desc>|\n&|g; s/\(<desc>[^"]*\)"\([^\n]*\n\)/\1\"\2/g;s/\n//g' inputfile