NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/40080: grep's --color switch won't work with -i option

>Number:         40080
>Category:       bin
>Synopsis:       grep's --color switch won't work with -i option
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 02 12:30:00 +0000 2008
>Originator:     Dallman Ross
>Release:        4.0, 5.0_BETA
NetBSD 5.0_BETA NetBSD 5.0_BETA (PANIX-XEN3U-USER) #0: Wed Nov 
12 09:29:45 EST 2008
The --color switch to grep won't work in concert with the -i option if the arg 
to the -i option is upper-case.
Try these two examples:

  $  echo Dogfood | grep -i --color dog


  $  echo Dogfood | grep -i --color Dog

They both print "Dogfood" for me under both NetBSD 4.0 and 5.0_BETA, but only 
the first one (using lower case "dog" as the pattern match) shows the
color.  So it looks like this will work as long as you specify the pattern in 
lower case.

Home | Main Index | Thread Index | Old Index