bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: grep 2.5: make install does not honor prefix or suffix for egrep/ f


From: Stepan Kasal
Subject: Re: grep 2.5: make install does not honor prefix or suffix for egrep/ fgrep
Date: Wed, 8 Jan 2003 17:19:21 +0100
User-agent: Mutt/1.2.5.1i

Hello again,

On Wed, Jan 08, 2003 at 03:33:59PM +0100, Newton, Philip wrote:
> I recently installed grep 2.5 which I had configured with
> --program-prefix=gnu in order to have "gnugrep" rather than "grep" (which
> would still be the grep that comes with the OS).

another thing which has changed in 2.5.1.

If you don't have CVS, you might try ftp://ftp.unex.es/pub/gnu-beta.old/grep/
(I've found this copy by http://www.alltheweb.com/?c=ftp)

> dangling symbolic links: egrep and fgrep, both pointing to "grep" -- but

grep-2.5.1 implements fgrep and egrep as wrapper scripts, not links.
The reason is that situations where a binary changes its behaviour according
to it's name is deprecated by POSIX.

> I deleted the symbolic links and re-created them as 'gnuegrep' and
> 'gnufgrep', pointing to 'gnugrep'. However -- does that interfere with the
> auto-detection that "egrep == grep -E, fgrep == grep -F"?

I this it does interfere.

With grep 2.5.1 and the scripts, you'd be safe.
But grep-2.5.1 contains another bug: the created sripts are installed under
the names gnu-egrep, gnu-fgrep, but call grep, not gnu-grep.
I'll fix it ASAP.  For now, please fix it manually.

(Or you can only take the scripts, they contain just this:
        #!/bin/sh
        exec grep -E ${1+"$@"}

A note: grep "$@" is safer then just grep $*.  And for a buggy shell (an
old zsh?), which is used as /bin/sh on some systems (*BSD?), the above
construct is the only one which work also for 0 parameters.

Thank you very much for your bug reports.

Stepan Kasal




reply via email to

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