.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/