Re: result of `which ./a.sh`
- From: Stephane CHAZELAS <this.address@xxxxxxxxxx>
- Date: Sat, 26 Apr 2008 19:28:40 +0200 (CEST)
2008-04-26, 16:02(+00), Kenny McCormack:
In article <slrng12ule.4qn.stephane.chazelas@xxxxxxxxxxxxxxx>,[...]
Stephane CHAZELAS <this.address@xxxxxxxxxx> wrote:
2008-04-24, 18:35(-07), troyzeng:
How to explain the following?[...]
$ pwd
/home/user1
$ which ./a.sh
./a.sh
"which" is a non-standard command. You could get anything, there
exist a lot of implementations behaving differently.
Try "command -v" instead.
That don't work at all:
% command -v instead
command: Command not found.
You forgot the quotes and the dot, and your prompt is incorrect:
$ "command -v" instead.
../a.sh
Having said that, it's true that csh and zsh will probably be
the shells with which "which" will work best as which at least
traditionnaly was only intended for csh users (as it was a csh
script reading the user's cshrc) and it's also built in zsh
(alias for "whence -c").
--
Stéphane
.
- Follow-Ups:
- Re: result of `which ./a.sh`
- From: Kenny McCormack
- Re: result of `which ./a.sh`
- References:
- result of `which ./a.sh`
- From: troyzeng
- Re: result of `which ./a.sh`
- From: Stephane CHAZELAS
- Re: result of `which ./a.sh`
- From: Kenny McCormack
- result of `which ./a.sh`
- Prev by Date: Re: result of `which ./a.sh`
- Next by Date: Re: result of `which ./a.sh`
- Previous by thread: Re: result of `which ./a.sh`
- Next by thread: Re: result of `which ./a.sh`
- Index(es):
Relevant Pages
|
|