2011-03-30 14:14:36 +00:00
|
|
|
#!/bin/rc
|
|
|
|
|
|
|
|
rfork e
|
|
|
|
|
|
|
|
opts=()
|
|
|
|
files=()
|
|
|
|
argv0=$0
|
|
|
|
while(! ~ $#* 0){
|
|
|
|
switch($1){
|
|
|
|
case -[cefinsv]
|
|
|
|
opts=($opts $1)
|
|
|
|
case -q
|
|
|
|
opts=($opts -s)
|
|
|
|
case -*
|
2022-05-10 20:47:26 +00:00
|
|
|
echo $argv0 $1 not supported >[1=2]
|
2011-03-30 14:14:36 +00:00
|
|
|
exit 'not supported'
|
|
|
|
case *
|
|
|
|
files=($files $1)
|
|
|
|
}
|
|
|
|
shift
|
|
|
|
}
|
|
|
|
exec /$cputype/bin/grep $opts $files
|