Subject: Re: goto netbsd
To: <>
From: David Laight <david@l8s.co.uk>
List: netbsd-advocacy
Date: 09/06/2002 09:53:00
On Fri, Sep 06, 2002 at 10:51:25AM +1000, Luke Mewburn wrote:
> On Thu, Sep 05, 2002 at 01:08:17PM +0900, Bang Jun-Young wrote:
>   | > > $ find /usr/src -name '*.c' | xargs grep goto | wc -l
> 
> shouldn't that be
> 	grep -w
> or even faster
> 	fgrep -w
> ?
> 
> that way you'll skip the string "goto" when it appears as part of a
> longer word.

Certain versions [1] of grep are VERY slow are grep -w (didn't look
why, but possibly because of finding all the words and then
comparing them).

OTOH grep '\<goto\>' is usually ok.

	David

[1] svr4, probably including solaris

-- 
David Laight: david@l8s.co.uk