I've looked at lots of similar questions and answers but hitting a brick wall.
I have an XML file with a line like this:
<blah:formProperty id="_blah" default="%HTML%">
I need to replace %HTML% with about 200+ lines like this:
<style>
blah
</style>
<script>
blah
</script>
Using sed throws an error because it doesn't like multiple lines.
awk seems like a better choice, but can't figure out how to get it done.
Replace a word with multiple lines using sed? is close, but I can't get the awk example to work. How is $DATA defined such that 'echo $DATA' returns multiple lines? Tons of forum topics on this and all say that only
echo "$DATA"
will print multiple lines.
So this is really a 2 part question. How do I solve my problem above? And how did they get that awk example to work?