GNU bug report logs - #24067
Bug Report : How to grep and treat meta character as normal character?

Previous Next

Package: grep;

Reported by: bibek ghimire <gbibek <at> gmail.com>

Date: Mon, 25 Jul 2016 17:33:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 24067-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: bibek ghimire <gbibek <at> gmail.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 24067-done <at> debbugs.gnu.org
Subject: Re: bug#24067: Bug Report : How to grep and treat meta character as
 normal character?
Date: Tue, 26 Jul 2016 08:07:09 -0700
On Tue, Jul 26, 2016 at 7:46 AM, bibek ghimire <gbibek <at> gmail.com> wrote:
>     /usr/bin/grep --color=auto $*

That function is erroneous due to the use of unquoted $*.
Use this instead, which fixes that, and also works when the executable
grep is not in /usr/bin:

grep() { env grep --color=auto "$@"; }




This bug report was last modified 8 years and 295 days ago.

Previous Next


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