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

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

Re: problem with egrep and fgrep


From: Bruce Korb
Subject: Re: problem with egrep and fgrep
Date: Thu, 02 Sep 2004 07:03:34 -0700

Stepan Kasal wrote:
> 
> Hello Warren,
> 
> On Wed, Sep 01, 2004 at 06:04:05PM +0000, Hans-Bernhard Broeker wrote:
> > Warren L Dodge <address@hidden> wrote:
> > > A thought I just had is that when the install is done why can't you put 
> > > the
> > > full path into the wrappers?
> >
> > Because hardwired paths just as easy to break, both on purpose and
> > accidentally, as the PATH search method which you stumbled over.
> 
> yes, I'm afraid that some distribution builders would come complaining that
> the path from build environment got hardwired.
> 
> I'm afraid there is no easy solution.

There are several simple, straight forward solutions:

1. The script can evaluate $(dirname $0) and the extra time is the cost of
   sticking strictly to not evaluating $(basename $0) in the program itself.
   If performance tuning is an issue, the script author can use the flag
   to the real grep program.

2. If execution time is really crucial, then write a binary wrapper
   that exec's grep with the additional argument.  It's about 10 minutes
   of coding ....

3. Be willing to conceed that traditional usage might be more important
   than adhering to a coding standard written after fgrep and egrep.
   Besides, the language of the standard allows for grandfathered
   utilities.  These are old enough to qualify.

The current situation where invoking /path/to/gnu/egrep gets you
``/usr/bin/grep -E'' is unacceptably bad.




reply via email to

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