Re: bash: path of script that is being executed
- From: "Hubble" <reiner@xxxxxxxxx>
- Date: 25 Sep 2006 02:52:33 -0700
Stephane Chazelas wrote:
On Mon, 25 Sep 2006 09:22:53 +0300, Angel Tsankov wrote:
How can a script that is being executed determine its path? What
if the script has been sourced?
$0
$0 is in many shells what the invoking shell passes as argv[0] and is
not reliable. The question is a FAQ. The answer is: if you want this as
info, you can use it. If you try to treat the value as reliable (for
example to find additional files in the same directory), don't use it.
Hubble.
.
- Follow-Ups:
- Re: bash: path of script that is being executed
- From: Stephane Chazelas
- Re: bash: path of script that is being executed
- References:
- bash: path of script that is being executed
- From: Angel Tsankov
- Re: bash: path of script that is being executed
- From: Stephane Chazelas
- bash: path of script that is being executed
- Prev by Date: Re: bash: path of script that is being executed
- Next by Date: Re: eval a command
- Previous by thread: Re: bash: path of script that is being executed
- Next by thread: Re: bash: path of script that is being executed
- Index(es):