File: man2hlp.sh

package info (click to toggle)
lynx-cur 2.8.7dev4-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 12,748 kB
  • ctags: 10,819
  • sloc: ansic: 120,416; sh: 3,525; makefile: 917; perl: 884
file content (15 lines) | stat: -rwxr-xr-x 431 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
# This script uses rman (Rosetta Man), which complements TkMan, to strip
# nroff headers from a manpage file, and format the result into a VMS help
# file.
for name in $*
do
	NAME=`echo $name |sed -e 's/\.man$/.1/'`
	(echo 1 `echo $NAME | sed -e 's/\..*$//' | tr '[a-z]' '[A-Z]'` ; \
	(echo '.hy 0'; cat $name) |\
	nroff -Tascii -man |\
	rman -n$NAME |\
	sed	-e 's/^[1-9].*$//' \
		-e 's/^\([A-Z]\)/2 \1/' |\
	uniq)
done