Preformatting html code blocks

When the time comes to put html or xml settings as an example in your blog (or any html for that matter), this sed one-liner really helps out…

Replace the *** with an “&“… the page example won’t render correctly if I use verbatim characters.

cat -v article.xhtml | sed -e “s/^*lt;/\</g” -e “s/>/\*gt;/g” > article.code.xhtml