[mdlug] grep bug?
Robert Citek
robert.citek at gmail.com
Fri Apr 18 08:23:46 EDT 2008
On Wed, Apr 16, 2008 at 6:17 PM, Robert Meier
<list1c30fe42 at bellsouth.net> wrote:
> bash> for mode in -i ''
> do
> for pat in ^ e
> do
> (echo hello | grep $mode --color=always -e $pat |
> head -c100 | wc -c )
> done
> done
> 100
> 19
> 6
> 19
Nice. In slightly modified form:
true && (
echo mode : pattern : count
for mode in '' -i ; do
for pat in ^ e ; do
echo "$mode" : "$pat" : $(echo hello |
grep $mode --color=always -e $pat |
head -c100 | wc -c )
done
done
)
mode : pattern : count
: ^ : 6
: e : 19
-i : ^ : 100
-i : e : 19
BTW, the bug seems to be fixed with whatever version of grep is in Ubuntu 8.04.
Regards,
- Robert
More information about the mdlug
mailing list