[Top][All Lists]

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

Re: grep-2.5.1a egrep/fgrep PATH problem

From: Charles Levert
Subject: Re: grep-2.5.1a egrep/fgrep PATH problem
Date: Thu, 23 Jun 2005 02:13:59 -0400
User-agent: Mutt/1.4.1i

* On Wednesday 2005-06-22 at 20:57:22 +0100, Chris Hughes wrote:
> Hiya,


>  The egrep/fgrep wrappers assume that grep-2.5.1a is the first grep on the 
> user's PATH:
> #!/bin/sh
> exec grep -E ${1+"$@"}
>  So if I install into in /usr/gnu/  (on Solaris for example) and run 
> /usr/gnu/bin/fgrep then it's possible that it will end up running 
> /usr/bin/grep.
>  Perhaps this wrapper should hardcode in the GNU 2.5.1a grep binary, or 
> run grep from the same directory?

I've seen this issue discussed before on
the list.

Of course, the first thing to say is that these
days users should try to get in the habit of
using "grep -E" and "grep -F" directly.

However, I tend to agree with you for the
compatibility script.

What do others on the list think?

For reference, several distributors of GNU grep
patch it to achieve just that:

   -- NetBSD

   -- OpenPKG

   -- SuSE Linux
so maybe we should as well.

The other approach is to use symlinks to the
grep binary

   -- Gentoo Linux

   -- Fedora Core/Red Hat Linux

but this goes against the GNU coding standards:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]