(no subject)
May. 24th, 2004 03:59 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
# this is kind of painful using only BREs nroff -man "$1" | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/@/\@/g; s!\(.\)^H\1!<b>\1</b>!g; s!\(&[#0-9a-z][0-9a-z]*;\)^H\1!<b>\1</b>!g; s!_^H\(.\)!<i>\1</i>!g; s!_^H\(&[#0-9a-z][0-9a-z]*;\)!<i>\1</i>!g; s!</\([bi]\)><\1>!!g'
(^H means a single character 8, not the two characters ^ and H.)