Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jun 2006 15:13:21 +0400
From:      Yar Tikhiy <yar@comp.chem.msu.su>
To:        Florent Thoumie <flz@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/etc rc.subr src/share/man/man8 rc.subr.8
Message-ID:  <20060623111321.GD75374@comp.chem.msu.su>
In-Reply-To: <1150907029.3467.49.camel@mayday.esat.net>
References:  <200606210942.k5L9gtAi060504@repoman.freebsd.org> <1150883785.3467.4.camel@mayday.esat.net> <20060621105253.GE45947@comp.chem.msu.su> <1150887909.3467.18.camel@mayday.esat.net> <20060621113901.GG45947@comp.chem.msu.su> <1150890968.3467.39.camel@mayday.esat.net> <20060621122331.GI45947@comp.chem.msu.su> <1150907029.3467.49.camel@mayday.esat.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 21, 2006 at 05:23:49PM +0100, Florent Thoumie wrote:
> On Wed, 2006-06-21 at 16:23 +0400, Yar Tikhiy wrote:
> > 
> > BTW, grep can be emulated with /bin/expr if needed:
> > 
> > _grep()
> > {
> > 	while read _line; do
> > 		[ `expr "$_line" : ".*$1"` != 0 ] && echo "$_line"
> > 	done
> > }
> > 
> > Ditto for "grep -q".
> 
> I guess we can even just use shell pattern matching with 'case'.

Some scripts use egrep patterns, e.g., `linux(aout|elf)', which are
problematic to handle even with expr, let alone shell.

-- 
Yar



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060623111321.GD75374>