Introduction
Introduction Statistics Contact Development Disclaimer Help
tg - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
tg (549B)
---
1 #!/bin/sh
2
3 inflags=yes
4 flags=""
5 while [ $# != 0 -a $inflags = yes ]
6 do
7 case "$1" in
8 --)
9 inflags=no
10 shift
11 ;;
12 -*)
13 flags="$flags $1"
14 shift
15 ;;
16 -)
17 inflags=no
18 shift
19 ;;
20 *)
21 inflags=no
22 ;;
23 esac
24 done
25
26 case $# in
27 0)
28 echo 1>&2 'usage: g [flags] pattern [files]'
29 exit 1
30 ;;
31 1)
32 pattern="$1"
33 files=`/bin/ls *.[bcChlmsy] *.asm *.cc *.cs *.lx *.cgi *.pl *.py…
34 9 grep -v '\.tab?\.[ch]$'`
35 ;;
36 *)
37 pattern="$1"
38 shift
39 files="$@"
40 esac
41
42 exec 9 grep -n $flags -- "$pattern" $files /dev/null
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.