summaryrefslogtreecommitdiff
path: root/gnu/dist/postfix/mantools/man2html
blob: 56355712ea6ad07865820dc6fc6f59a7abd6dc90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

# Crude script to convert formatted manual pages to HTML

echo '<html> <head> </head> <body> <pre>'

sed '
	s/\([<>&]\)\1/\1/g
	s/&/\&amp;/g
	s/</\&lt;/g
	s/>/\&gt;/g
	s;_\(.\);<i>\1</i>;g
	s;.\(.\);<b>\1</b>;g
	s;</i><i>;;g
	s;</b><b>;;g
' "$@"

echo '</pre> </body> </html>'