From owner-freebsd-questions Thu Nov 9 14:26:52 2000 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-27-149-77.mmcable.com [24.27.149.77]) by hub.freebsd.org (Postfix) with SMTP id 7553A37B479 for ; Thu, 9 Nov 2000 14:26:50 -0800 (PST) Received: (qmail 27838 invoked by uid 100); 9 Nov 2000 22:26:49 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14859.9385.576245.111572@guru.mired.org> Date: Thu, 9 Nov 2000 16:26:49 -0600 (CST) To: Peter Cc: questions@freebsd.org Subject: Re: your mail In-Reply-To: References: <14859.3527.407826.940938@guru.mired.org> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Peter 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 ".").