diff options
Diffstat (limited to 'man/secindex')
-rwxr-xr-x | man/secindex | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/man/secindex b/man/secindex new file mode 100755 index 00000000..6dd0d51e --- /dev/null +++ b/man/secindex @@ -0,0 +1,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 |