summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraiju <devnull@localhost>2018-05-26 17:17:41 +0000
committeraiju <devnull@localhost>2018-05-26 17:17:41 +0000
commit2b5dfee06cc6a7b915d6b7fe7cfe2942a660cde0 (patch)
tree996377e1726fed491f84eee14193ca677a372cbd
parent1ddf581f8c820af6316f55e246fac3ceb29191f0 (diff)
downloadplan9front-2b5dfee06cc6a7b915d6b7fe7cfe2942a660cde0.tar.xz
Bfn improvements
-rwxr-xr-xrc/bin/Bfn4
1 files changed, 3 insertions, 1 deletions
diff --git a/rc/bin/Bfn b/rc/bin/Bfn
index 636aee524..907a414ee 100755
--- a/rc/bin/Bfn
+++ b/rc/bin/Bfn
@@ -1,9 +1,11 @@
#!/bin/rc
+rfork e
if(! ~ $#* 1){
echo usage: $0 fn >[2=1]
exit usage
}
-res=`{grep -n '^'$1'\(' *.c | sed -n 's/^([^:]*:[^:]*).*$/\1/gp' }
+if(~ $#srcpath 0) srcpath=.
+res=`{grep -n '^'$1'\(' $srcpath/*.c /dev/null | sed -n 's/^([^:]*:[^:]*).*$/\1/gp' }
ifs='
'
for(i in $res)