Plan 9 from Bell Labs’s /usr/web/sources/contrib/iru/g

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


#!/bin/rc

flags=(-n)
while(~ $1 -*){
	flags=($flags $1)
	shift
}

switch($#*){
case 0
	echo usage: $0 [-options] pattern [files]
	exit usage
case 1
	pattern=$1
	files=`{ls *.[bcChslmy] *.py *.ms >[2]/dev/null}
case *
	pattern=$1
	shift
	files=$*
}

grep $flags $pattern $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.