bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining the current path of a sourced script


From: Ben Logan
Subject: Re: Determining the current path of a sourced script
Date: Wed, 13 Mar 2002 06:24:55 -0500
User-agent: Mutt/1.2.5i

On Tue, Mar 12, 2002 at 03:08:39PM -0800, Tony wrote:
> I have a bash script that will be sourced rather than run. Is there
> anyway for the script to determine its location (pathname)?

As long as you don't "cd" first, wouldn't the PWD environment variable
do the trick?

Regards,
Ben

-- 
Ben Logan: ben at wblogan dot net
OpenPGP Key KeyID: A1ADD1F0

You were s'posed to laugh!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]