$ echo asdf |grep -o '^..' as df $ Expected result: as
grep.c prline() only_matching algorithm is clearly broken wrt anchors.
In grep-2.6.3-alt1 the bug is already fixed.