22 lines
286 B
Bash
Executable file
22 lines
286 B
Bash
Executable file
#!/bin/rc
|
|
|
|
rfork e
|
|
|
|
opts=()
|
|
files=()
|
|
argv0=$0
|
|
while(! ~ $#* 0){
|
|
switch($1){
|
|
case -[cefinsv]
|
|
opts=($opts $1)
|
|
case -q
|
|
opts=($opts -s)
|
|
case -*
|
|
echo $argv0 $1 not supported >[1=2]
|
|
exit 'not supported'
|
|
case *
|
|
files=($files $1)
|
|
}
|
|
shift
|
|
}
|
|
exec /$cputype/bin/grep $opts $files
|