]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/ape/grep
inst: don't hardcode /net/ether0, might have usb ethernet
[plan9front.git] / rc / bin / ape / grep
1 #!/bin/rc
2
3 rfork e
4
5 opts=()
6 files=()
7 argv0=$0
8 while(! ~ $#* 0){
9         switch($1){
10         case -[cefinsv]
11                 opts=($opts $1)
12         case -q
13                 opts=($opts -s)
14         case -*
15                 echo $argv0 $1 not supported >[2=1]
16                 exit 'not supported'
17         case *
18                 files=($files $1)
19         }
20         shift
21 }
22 exec /$cputype/bin/grep $opts $files