mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
38 lines
370 B
Text
38 lines
370 B
Text
|
#!/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
|