Subject: Re: bug#29778: grep seems to ignore GREP_OPTIONS

From: Bob Proulx <[email-masked]>
Date: Thu, 21 Dec 2017 16:34:31 -0700

Dennis wrote:
> For a long time I have used GREP_OPTIONS to set the
> --ignore-case option. Suddenly it seems to be ignoring it.
> 
> I am running Debian Jessie and grep 2.20

I cannot reproduce this problem on Debian Jessie 8 using grep 2.20
from the Debian distribution.  Here is my test case.

  rwp@rainy:~$ echo ONE | GREP_OPTIONS= grep one

  rwp@rainy:~$ echo ONE | GREP_OPTIONS=--ignore-case grep one
  ONE

  rwp@rainy:~$ echo ONE | env -i GREP_OPTIONS=--ignore-case grep one
  ONE

  rwp@rainy:~$ grep --version
  grep (GNU grep) 2.20

Works for me.

Perhaps you have some incompatible LC_COLLATE and LC_CTYPE variables
mixing?

Bob