This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 498425 - grep word regex -w option in conjuntion with -o option is buggy
grep word regex -w option in conjuntion with -o option is buggy
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: grep (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Stepan Kasal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-30 08:51 EDT by J Gallagher
Modified: 2009-06-17 06:03 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-17 06:03:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description J Gallagher 2009-04-30 08:51:32 EDT
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 10:53:05 EDT
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 06:03:49 EDT
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.