Bug 159532 - grep -w not exact matching and adding extra line
Summary: grep -w not exact matching and adding extra line
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: grep
Version: 3.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks: 156320
TreeView+ depends on / blocked
 
Reported: 2005-06-03 16:43 UTC by Phil Battaglia
Modified: 2022-04-08 08:40 UTC (History)
0 users

Fixed In Version: RHBA-2005-565
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-28 18:47:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:565 0 qe-ready SHIPPED_LIVE grep bug fix update 2005-09-28 04:00:00 UTC

Description Phil Battaglia 2005-06-03 16:43:45 UTC
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 15:24:40 UTC
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 18:47:30 UTC
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.