URL:
<http://savannah.gnu.org/bugs/?24732>
Summary: --only-matching prints only non-overlapping matches
in each line
Project: grep
Submitted by: jmilloy
Submitted on: Sun 02 Nov 2008 07:35:25 PM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Maybe this is more of a feature request, but as I understand the option,
--only-matching should print all matches to the pattern in each line.
for example:
$ echo 'abcd00efghi' | grep -o ..0..
cd00e
# what I expect:
# $ echo 'abcd00efghi' | grep -o ..0..
# cd00e
# d00ef
note that more than one match in a line will be printed, if they do not
overlap:
$ echo 'ab0cdefg0hi' | grep -o ..0..
ab0cd
fg0hi
Was the option meant to work this way?
Jeff
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?24732>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/