This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Bug in grep when -i used with -o and/or --color=auto
- From: Gary Johnson <garyjohn at spk dot agilent dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 24 Sep 2008 16:17:16 -0700
- Subject: Bug in grep when -i used with -o and/or --color=auto
Cygwin's grep appears to give incorrect results when given the -i
option in combination with the --color=auto and/or -o options.
For example,
grep --color=auto You /etc/motd
prints the line
You are successfully logged in to this server!!!
as expected, with "You" in red. However, while
grep --color=auto -i you /etc/motd
prints the same line, "You" is not colored.
As another example,
grep -o You /etc/motd
prints just
You
as expected, but
grep -o -i you /etc/motd
prints nothing.
Those option combinations work correctly with /bin/grep (GNU grep)
2.5.1 on a machine running Red Hat Enterprise Linux WS release 4.
$ uname -a
CYGWIN_NT-5.1 tc-merlin 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin
$ which grep
/usr/bin/grep
$ cygcheck -c grep
Cygwin Package Information
Package Version Status
grep 2.5.1a-4 OK
Regards,
Gary
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/