GNU bug report logs - #14391
bug in grep -- ignoring GREP_OPTIONS or not acting on it...

Previous Next

Package: coreutils;

Reported by: Linda Walsh <coreutils <at> tlinx.org>

Date: Sun, 12 May 2013 05:06:02 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Linda Walsh <coreutils <at> tlinx.org>
To: 14391 <at> debbugs.gnu.org
Subject: bug#14391: bug in grep -- ignoring GREP_OPTIONS or not acting on it...
Date: Sat, 11 May 2013 22:04:26 -0700
My grep is :
grep (GNU grep) 2.14
Copyright (C) 2012 Free Software Foundation, Inc.
...
when I type grep, I get an alias + I have GREP_OPTIONS set..

whence on grep gives the first entry as:
grep is aliased to `grep --color=auto'

> echo $GREP_OPTIONS
-D skip --binary-files=without-match

Ishtar:/tmp/test> ll
total 0
drwxrwxr-x 2 6 May 11 14:39 a/
drwxrwxr-x 2 6 May 11 14:39 b/
drwxrwxr-x 2 6 May 11 14:39 c/
-rw-rw-r-- 1 0 May 11 14:39 e
-rw-rw-r-- 1 0 May 11 14:39 f
-rw-rw-r-- 1 0 May 11 14:39 g
Ishtar:/tmp/test> grep foo *
grep: a: Is a directory
grep: b: Is a directory
grep: c: Is a directory

grep should ignore the directories and issue no message for them:
       -D ACTION, --devices=ACTION
              If an input file is a device, FIFO  or  socket,  use  ACTION  to
              process  it.   By  default,  ACTION  is  read,  which means that
              devices are read just as if they were ordinary files.  If ACTION
              is skip, devices are silently skipped.

       GREP_OPTIONS
              This variable specifies default options to be placed in front of
              any  explicit  options.   For  example,   if   GREP_OPTIONS   is
              '--binary-files=without-match  --directories=skip', grep behaves
              as  if  the   two   options   --binary-files=without-match   and
              --directories=skip   had  been  specified  before  any  explicit
              options.
----
ACTION=skip, so where's the silence?

I don't remember this being this way before -- it used to work.
Seems like it stopped recently?






This bug report was last modified 12 years and 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.