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:
Confirmed. Red Hat Enterprise Linux 4 is not affected. This is a regression since Red Hat Enterprise Linux 3 release.
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