[lkml]   [2000]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.2.18pre12 fix for some distros
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! ( )
Email: Herbert Xu ~{PmV>HI~} <>
Home Page:
PGP Key:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:39    [W:0.116 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site