1 2 3 4
#!/bin/sh echo "<pre>" sed "s|&|\\&|g;s|'|\\'|g;s|\"|\\"|g;s|<|\\<|g;s|>|\\>|g" echo "</pre>"