Subversion Repositories planix.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#!/bin/rc
2
 
3
rfork e
4
 
5
opts=()
6
files=()
7
argv0=$0
8
while(! ~ $#* 0){
9
	switch($1){
10
	case -e
11
		opts=($opts $1 $2)
12
		shift
13
	case -[cfinsv]
14
		opts=($opts $1)
15
	case -q
16
		opts=($opts -s)
17
	case -*
18
		echo $argv0 $1 not supported >[2=1]
19
		exit 'not supported'
20
	case *
21
		files=($files $1)
22
	}
23
	shift
24
}
25
exec /$cputype/bin/grep $opts $files