How to recognize blocks of text with sed
Archive of posts tagged sed
Using different delimiters in sed
How to make sed programs more readable
How to match newlines in sed
It doesn't work the way you think, but it does work
Using shell variables in sed
How to safely use shell variables in sed