Bug 10973

Summary: grep -o option is buggy in conjunction with anchors
Product: Sisyphus Reporter: at <at>
Component: grepAssignee: placeholder <placeholder>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P2 CC: evg, glebfm, ldv, placeholder
Version: unstable   
Hardware: all   
OS: Linux   

Description at@altlinux.org 2007-03-01 18:17:43 MSK
$ echo asdf |grep -o '^..'
as
df
$

Expected result:
as
Comment 1 Dmitry V. Levin 2007-04-15 01:00:06 MSD
grep.c prline() only_matching algorithm is clearly broken wrt anchors.
Comment 2 Dmitry V. Levin 2010-09-20 21:48:10 MSD
In grep-2.6.3-alt1 the bug is already fixed.