aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2008-12-06 16:46:30 -0800
committerRuss Cox <rsc@swtch.com>2008-12-06 16:46:30 -0800
commita490444938eff6c12b7a7d7a5a8fcd4e68a101a1 (patch)
tree87f38b60fe0a421447e43b766bbbc80e1a44e37c /bin
parent272c1fb2d928168074798cf2a467591121273478 (diff)
downloadplan9port-a490444938eff6c12b7a7d7a5a8fcd4e68a101a1.tar.gz
plan9port-a490444938eff6c12b7a7d7a5a8fcd4e68a101a1.tar.bz2
plan9port-a490444938eff6c12b7a7d7a5a8fcd4e68a101a1.zip
sig: consult unix man pages too
Diffstat (limited to 'bin')
-rwxr-xr-xbin/sig17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/sig b/bin/sig
index 0db15f30..ed4c983a 100755
--- a/bin/sig
+++ b/bin/sig
@@ -9,6 +9,12 @@ if(~ $#* 0){
exit 1
}
+noplan9=()
+for(p in $path) {
+ if(! ~ $p $PLAN9/bin)
+ noplan9=($noplan9 $p)
+}
+
for (i) {
files=`{grep -il '[ ]\*?'$i'\(' $PLAN9/man/man3/*.3*}
for(j in $files) {
@@ -24,6 +30,17 @@ for (i) {
s/[ ]+/ /g' |
grep -i -e '[ ]\*?'$i'\(' | sed 's/^[ +]/ /'
}
+ { path=$noplan9; man 2 $i; man 3 $i } >[2]/dev/null | nobs | sed -n '
+ :d
+ /SYNOPSIS/bp
+ n
+ bd
+ :p
+ /DESCRIPTION/bd
+ p
+ n
+ bp
+ ' | grep -i -e '[ ]\*?'$i'\(' | sed 's/^[ +]/ /'
}
exit 0