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

Re: egrep moved to /usr/sbin



Stephen Frost wrote:

> * Craig Dickson (crdic@pacbell.net) wrote:
> > H. S. Teoh wrote:
> > > OK, I'm getting conflicting opinions here. Should I move them back, or
> > > should I leave them where they are and file bugs against packages that
> > > hardcode /bin?
> > 
> > It's obvious that startup scripts don't need egrep and fgrep, since the
> > same functionality is available in grep -E and grep -F.
> 
> It's obvious that humans don't need egrep and fgrep, since the same
> functionality is available in grep -E and grep -F.  Thus we should do
> away with them entirely.

If grep were smart enough to check $0 and modify its behavior
accordingly (I don't think it does currently), then egrep and fgrep
could be replaced by links. Even without that, egrep and fgrep could be
replaced by scripts that exec grep with appropriate arguments. Either
way, egrep and fgrep would become negligibly small, and so the argument
for moving them to /usr/bin would be much weaker.

There is merit in having egrep and fgrep available under those names,
because people will expect them. They don't have to be in any particular
place as long as they're on the standard $PATH, since programs shouldn't
be hard-coding the locations of binaries from other packages. Startup
scripts and other programs in the root fs are a special case, since they
need to avoid using things that may not have been mounted yet, but the
change from {ef}grep to grep -{EF} is trivial.

Craig

Attachment: pgp7akhfKp2HY.pgp
Description: PGP signature


Reply to: