aboutsummaryrefslogtreecommitdiff
path: root/man/secindex
blob: 6dd0d51eaf86f8071f4cc01fe6eaad21c5bd8f79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/local/plan9/bin/rc
builtin cd $1
for (i in [a-z0-9:]*) {
	b=`{echo $i | sed 's/\..*//'}
	9sed -n '
	/SH *NAM/,/SH/{
		/SH/d
		s/, *$//
		ty
		:y
		s/ *\\*-.*//
		tx
		s/ *\\\(mi.*//
		tx
		s/, */\
/g
		s/\n\\n/\
/g
		s/$/ '$i'/g
		p
	}
	/SH *DES/q
	d
	:x
	s/ *\\*-.*//
	s/ *\\\(mi.*//
	/^$/d
	s/, */\
/g
	s/\n\n/\
/g
	s/$/ '$i'/g
	p
	q
' $i
echo $b $i
} |sort -u