[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-kernel
Subject: Re: 2.2.18pre12 fix for some distros
From: Herbert Xu <herbert () gondor ! apana ! org ! au>
Date: 2000-09-30 22:35:01
[Download RAW message or body]
On Sat, Sep 30, 2000 at 03:13:02PM +0100, Alan Cox wrote:
> > Please replace which with "command -v" which is required by SuS in /bin/sh.
>
> command -v breaks on some setups. One problem can be seen easily by doing this
>
> # command -v ls
> alias ls='ls --color=tty'
.bashrc is only read for interactive shells. Besides, if which is a bash
alias as well,
$ command -v which
alias which='type -path'
$
it will break too,
$ which which
$
I think what you can do is to ignore the value returned by command -v, and
just use it is an indication that this thing exists. After all, if you can
find it using command -v, just calling it will work too. Something like
if command -v gcc272 > /dev/null 2> /dev/null; then echo gcc272; else \
echo gcc; fi
--
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic