I spent ages trying to figure this out. As it happens, I don't need to do it any more; I found another way. But for the sake of my sanity, I'd like to know the answer anyway.
It's quite easy to use
sed to replace a marker with some piece of text. What I can't figure out is how to make
sed insert a huge block of text, with complex formatting such as multiple lines, tab characters, etc. How do you do that? Is
sed the best thing to use or what?