> $ echo foobar | grep -o '^.'
> f
> o
> o
> b
> a
> r
>
> There is a beginning-of-line anchor '^' so grep should only match 'f',
> not the rest.
>
> $ grep --version
> grep (GNU grep) 2.5.1
Thanks for the report, but this is the bug-coreutils list, so you
will not get any patches by reporting here. Try bug-grep instead.
It may also be that this is already fixed in CVS; there are a
number of regex parsing bugs that have been fixed in glibc
and gnulib cine 2.5.1 was released in 2001 (but unfortunately
the grep maintainer has not released a stable version in a while).
--
Eric Blake