Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 159532 - grep -w not exact matching and adding extra line
grep -w not exact matching and adding extra line
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: grep (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
Depends On:
Blocks: 156320
  Show dependency treegraph
Reported: 2005-06-03 12:43 EDT by Phil Battaglia
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: RHBA-2005-565
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-28 14:47:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:565 qe-ready SHIPPED_LIVE grep bug fix update 2005-09-28 00:00:00 EDT

  None (edit)
Description Phil Battaglia 2005-06-03 12:43:45 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; .NET CLR 1.1.4322)

Description of problem:
Using grep-2.5.1-24.4.i386.rpm, the "-w" option seems to fail consistently, by ignoring the "-o" option and adds an extra newline.  My usage includes the "-f" option to use for pattern matching.

grep-2.5.1-24.1.i386.rpm is successful.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create the pattern file.
2. Use egrep with the "-o" and "-w" options, as well as "-f <pattern file>".
3. Failure.

Actual Results:  *** Contents of pat_grep ***
[root@dev bin]# cat pat_grep

*** Using grep-2.5.1-24.4.i386.rpm ***
[root@dev bin]# echo " test" | egrep -m1 -wof pat_grep test


Expected Results:  *** Using grep-2.5.1-24.1.i386.rpm ***
[root@dev bin]# echo " test" | egrep -m1 -wof pat_grep

Additional info:
Comment 2 Tim Waugh 2005-06-07 11:24:40 EDT
Confirmed.  Red Hat Enterprise Linux 4 is not affected.

This is a regression since Red Hat Enterprise Linux 3 release.
Comment 10 Red Hat Bugzilla 2005-09-28 14:47:30 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.