[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with egrep and fgrep
From: |
Paul Jarc |
Subject: |
Re: problem with egrep and fgrep |
Date: |
Mon, 13 Sep 2004 12:54:05 -0400 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) |
address@hidden (Bob Proulx) wrote:
> Using full hard coded paths is just a bad practice.
I disagree, but how's this for a compromise - look first in @bindir@,
and then in $PATH:
#!/bin/sh
grep=`PATH='@bindir@':$PATH which grep` || exit 2
case $grep in
/*) exec "$grep" -E ${1+"$@"};;
*) echo "$grep" >&2 && exit 2;;
esac
Or something similar. (On NetBSD, "which" prints errors to stdout and
still exits 0.)
paul
- Re: problem with egrep and fgrep, (continued)
Message not available
Message not available
- Message not available
- Re: problem with egrep and fgrep, Ralph Corderoy, 2004/09/02
- Re: problem with egrep and fgrep, Bob Proulx, 2004/09/03
- Message not available
- Re: problem with egrep and fgrep, Ralph Corderoy, 2004/09/07
- Re: problem with egrep and fgrep, Bob Proulx, 2004/09/12
- Re: problem with egrep and fgrep,
Paul Jarc <=
- Re: problem with egrep and fgrep, Bob Proulx, 2004/09/13
- Re: problem with egrep and fgrep, Paul Jarc, 2004/09/13
- Re: problem with egrep and fgrep, Eli Zaretskii, 2004/09/13
- Message not available
- Re: problem with egrep and fgrep, Eric Backus, 2004/09/13
- Re: problem with egrep and fgrep, Bob Proulx, 2004/09/15
- Message not available
- Re: problem with egrep and fgrep, Eric Backus, 2004/09/15
Re: problem with egrep and fgrep, Bob Proulx, 2004/09/12