blob: 0baca18d991bf4462c0554b59acc469c894e8e31 (
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
38
39
40
41
42
43
44
45
|
#!/bin/rc
owd=`{pwd}
cd $1
for (i in *){
sed -n '
/^.TH *[^ ]* */{
s///
s/ .*//
h
}
/SH.*NAM/{
N
s/.*\n//
:x
N
/\n.SH.*/{
s///
s/^/'$i' /
s/\n/ /g
s/ */ /g
G
s/([^ ]*)(.*)\n(.*)/\1(\3)\2/
s/[A-Z]\)/)/
p
d
}
s/\n\.[^ ]* */ /
bx
}
' $i
}
cd $owd
exit
# add to shell script to get file references
# in this case, pipe output thru uniq
/^\.RF *[^ ]*/s//.F/
/^\.FR(.* ).*/s//.F \1/
/^\.F */{
s//$i /
s/\.[^ .]*//
G
s/([^ ]*)(.*)\n(.*)/\1(\3)\2/
s/[A-Z+]\)/)/
p
}
|