changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > plan9front / rc/bin/Bfn

changeset 7243: 34f64dcbbc25
parent: e0d532c4c263
author: cinap_lenrek@felloff.net
date: Fri, 17 May 2019 18:14:10 +0200
permissions: -rwxr-xr-x
description: 7l: don't hardcode 4k pagesize, use INITRND
1 #!/bin/rc
2 rfork e
3 if(! ~ $#* 1){
4  echo usage: $0 fn >[2=1]
5  exit usage
6 }
7 if(~ $#srcpath 0) srcpath=.
8 res=`{grep -n '^'$1'\(' $srcpath/*.c /dev/null | sed -n 's/^([^:]*:[^:]*).*$/\1/gp' }
9 ifs='
10 '
11 for(i in $res)
12  echo $i
13 switch($#res){
14 case 0
15  echo $1: not found >[2=1]
16 case 1
17  plumb $res
18 }