Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Aug 2011 17:23:38 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        freebsd-current@FreeBSD.org
Subject:   Re: oddities with fgrep
Message-ID:  <4E45376A.2000409@FreeBSD.org>
In-Reply-To: <4E316D9C.6060007@FreeBSD.org>
References:  <4E316D9C.6060007@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 28/07/2011 17:09 Andriy Gapon said the following:
> $ fgrep -w -r CS drm
> ...
> drm/include/drm/drm_mode.h:#define DRM_MODE_FLAG_NCSYNC (1<<8)
> $ fgrep -w -r CSY drm
> ...
> drm/include/drm/drm_mode.h:#define DRM_MODE_FLAG_NCSYNC (1<<8)
> $ fgrep -w -r CSYN drm
> <nothing> (exit 1)
> $ fgrep -w -r NCS drm
> <nothing> (exit 1)
> $ fgrep -w CS drm/include/drm/drm_mode.h
> <nothing> (exit 1)
> 
> So looks like a potential bug in some optimization.
> -w works correctly without -r.  With -r it works correctly for some substrings,
> but not for others.

FWIW, bsdgrep doesn't seem to have this quirk.

-- 
Andriy Gapon



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