Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Nov 2000 16:26:49 -0600 (CST)
From:      Mike Meyer <mwm@mired.org>
To:        Peter <peterk@americanisp.net>
Cc:        questions@freebsd.org
Subject:   Re: your mail
Message-ID:  <14859.9385.576245.111572@guru.mired.org>
In-Reply-To: <Pine.LNX.4.21.0011091415570.28332-100000@oxygen.americanisp.net>
References:  <14859.3527.407826.940938@guru.mired.org> <Pine.LNX.4.21.0011091415570.28332-100000@oxygen.americanisp.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter <peterk@americanisp.net> types:
> "$PWD" always looks in what the shells current
> > directory was when you added it to PATH.
> 
> Are you sure about this? I have $PWD added to my path, and I never have to
> type ./proggie no matter what dir I am in, (at least on linux, my shell
> account [just tried it] - doing echo $PATH it always replaces $PWD with my
> pwd) I'll have to test it further on FBSD, but at home I dont' remember
> ever having to type ./proggie anything even if I go to
> /home/bob/proggie/dl/execute.proggie (no matter where I am), I use ksh btw
> not sure if that matters.

It might be a shell feature. But the command line:

	PATH=$PATH:$PWD

should result in '$PWD' being evaluated, and that value should be the
*current* working directory. Do you have the four characters "$PWD" in
your PATH? If so, then that sounds like a ksh feature to expand
variable names in PATH before searching it. I can see uses for that.

In which case, "." is a system feature so will work for all
shells. It'll also be slightly quicker than "$PWD" (no need to expand
it, or look through the directory tree to find ".").

	<mike


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14859.9385.576245.111572>