cvs commit: src/etc rc.subr src/share/man/man8 rc.subr.8

Yar Tikhiy yar at comp.chem.msu.su
Fri Jun 23 11:13:32 UTC 2006


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


More information about the cvs-src mailing list