Plan 9 from Bell Labs’s /usr/web/sources/plan9/rc/bin/ape/grep

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

rfork e

opts=()
files=()
argv0=$0
while(! ~ $#* 0){
	switch($1){
	case -e
		opts=($opts $1 $2)
		shift
	case -[cfinsv]
		opts=($opts $1)
	case -q
		opts=($opts -s)
	case -*
		echo $argv0 $1 not supported >[2=1]
		exit 'not supported'
	case *
		files=($files $1)
	}
	shift
}
exec /$cputype/bin/grep $opts $files

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.