bug-grep
[Top][All Lists]
Advanced

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

Re: grep-2.5.1a egrep/fgrep PATH problem


From: Tony Abou-Assaleh
Subject: Re: grep-2.5.1a egrep/fgrep PATH problem
Date: Thu, 23 Jun 2005 08:30:48 -0300 (ADT)

Would it make sense to add switches to the configuration script that would
determine how egrep/fgrep are installed? Current option seem to be:

1) don't install (should use grep -E/F)
2) install wrapper (what we do now)
3) install symlinks (since against GNU standards, should not be default)
4) make them all binaries

For option 4, we would need to add defines to the source so that the
operation of the binary doesn't depend on the name, but that different
binaries are actually compiled.

Cheers,

TAA

--------------------------------------------------
Tony Abou-Assaleh
Ph.D. Candidate, Faculty of Computer Science
Dalhousie University, Halifax, NS, Canada, B3H 1W5
Fax:   902-492-1517
Email: address@hidden
WWW:   http://www.cs.dal.ca/~taa/
---------------------[THE END]--------------------


On Thu, 23 Jun 2005, Charles Levert wrote:

> * On Wednesday 2005-06-22 at 20:57:22 +0100, Chris Hughes wrote:
> >
> > Hiya,
>
> Ahoy!
>
>
> >  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
>       
> <http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/textproc/grep/patches/patch-aa?annotate=1.3>
>
>    -- OpenPKG
>       <http://cvs.openpkg.org/getfile/openpkg-src/grep/grep.patch?v=1.1.2.1>
>
>    -- SuSE Linux
>       <ftp://ftp.suse.com/pub/suse/i386/9.3/suse/src/grep-2.5.1a-4.src.rpm>
>          grep-2.5.1a.diff
>
> so maybe we should as well.
>
> The other approach is to use symlinks to the
> grep binary
>
>    -- Gentoo Linux
>       
> <http://www.gentoo.org/cgi-bin/viewcvs.cgi/sys-apps/grep/grep-2.5.1-r8.ebuild?annotate=1.2>
>
>    -- Fedora Core/Red Hat Linux
>       
> <http://cvs.fedora.redhat.com/viewcvs/devel/grep/grep.spec?annotate=1.50>
>
> but this goes against the GNU coding standards:
>
>    <http://www.gnu.org/prep/standards/standards.html#User-Interfaces>.
>
>




reply via email to

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