Bug 159532 - grep -w not exact matching and adding extra line
grep -w not exact matching and adding extra line
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: grep (Show other bugs)
3.0
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:
Environment:
Last Closed: 2005-09-28 14:47:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  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):
grep-2.5.1-24.4.i386.rpm

How reproducible:
Always

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
65\.96\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}
***********************

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

***********************


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

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.

http://rhn.redhat.com/errata/RHBA-2005-565.html

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