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
Product: Fedora
Classification: Fedora
Component: grep (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Stepan Kasal
Fedora Extras Quality Assurance
Depends On:
  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:
Last Closed: 2009-06-17 06:03:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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:
grep -wo '[0-9.]*' <<< " : 1 Time(s)"
(no output, the inital space should have been ignored)
grep -wo '[0-9.]*' <<< " : 1 Time(s)"

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

no match or buggy output as described.

Expected results:

should just return the single match:

each time.

Additional info: same results if you match against a file of such text: : 1 Time(s) : 1 Time(s) : 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:
Comment 2 J Gallagher 2009-06-17 06:03:49 EDT

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.