Bug 498425 - grep word regex -w option in conjuntion with -o option is buggy
Summary: grep word regex -w option in conjuntion with -o option is buggy
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: grep
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Stepan Kasal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-30 12:51 UTC by J Gallagher
Modified: 2009-06-17 10:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-17 10:03:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description J Gallagher 2009-04-30 12:51:32 UTC
Description of problem: grep -wo doesn't work as expected in F10 and F11 (there are different behaviours)


Version-Release number of selected component (if applicable):
grep-2.5.1a-61.fc10 and grep-2.5.3-4.fc11

How reproducible:
Every time F10 and F11 LiveCD Preview



Steps to Reproduce:
F10:
grep -wo '[0-9.]*' <<< " 115.73.196.175 : 1 Time(s)"
(no output, the inital space should have been ignored)
grep -wo '[0-9.]*' <<< "115.73.196.175 : 1 Time(s)"
115.73.196.175
(correct)

F11:
grep -wo '[0-9.]*' <<< " 115.73.196.175 : 1 Time(s)"
115.73.196.175
1
(2 lines of output?)
  
Actual results:

no match or buggy output as described.



Expected results:

should just return the single match:

115.73.196.175

each time.

Additional info: same results if you match against a file of such text:

 115.73.196.175 : 1 Time(s)
 116.71.160.233 : 1 Time(s)
 123.238.88.252 : 1 Time(s)
...

Comment 1 Bug Zapper 2009-06-09 14:53:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 J Gallagher 2009-06-17 10:03:49 UTC
Correction:

Behaviour in F11 is correct. grep -wo should output each match on a separate line

additionally, a space at the beginning of the line shouldn't affect the match, this was broken in F10 grep-2.5.1a-61.fc10


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