Cool tools, pt. 2

[linkstandalone]

This one is useful when you want to copy some source code to an HTML page (like these series) and you want to do it from a shell.

#!/bin/bash
cat $1 | sed 's/\&/\&amp\;/g; s/</\&lt\;/g; s/>/\&gt\;/g; s/\\/\&bsol\;/g'