oddities with fgrep

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Thu, 28 Jul 2011 17:09:32 +0300
$ 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.

-- 
Andriy Gapon
Received on Thu Jul 28 2011 - 12:09:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:16 UTC