]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/Bfn
merge
[plan9front.git] / rc / bin / Bfn
1 #!/bin/rc
2 if(! ~ $#* 1){
3         echo usage: $0 fn >[2=1]
4         exit usage
5 }
6 res=`{grep -n '^'$1'\(' *.c | sed -n 's/^([^:]*:[^:]*).*$/\1/gp' }
7 ifs='
8 '
9 for(i in $res)
10         echo $i
11 switch($#res){
12 case 0
13         echo $1: not found >[2=1]
14 case 1
15         plumb $res
16 }