Re: locating a sourced file
- From: "Angel Tsankov" <fn42551@xxxxxxxxxxxxxxxx>
- Date: Thu, 31 Aug 2006 16:21:38 +0300
How can a sourced file determine its location?
Source files cannot determine anything - they are not executables.
I think the OP mean how can a sourced file (like in shell ./file.sh)
determine it's location. This sounds like home work so I won't answer
this directly but take a look at the variable $0.
If it is homework, it strikes me as being a rather advanced class :^)
No, it is NOT a homework!
Looking at $0 certainly won't help.
Yes, it does not help.
I doubt that there is a way, but maybe somebody here is smarter than I am.
If there exists such a guy, could they please, enlighten us.
.
- Follow-Ups:
- Re: locating a sourced file
- From: John Hasler
- Re: locating a sourced file
- References:
- Re: locating a sourced file
- From: Neil Cherry
- Re: locating a sourced file
- From: Laurenz Albe
- Re: locating a sourced file
- Prev by Date: Re: locating a sourced file
- Next by Date: Re: problems connecting to a lan from another subnet
- Previous by thread: Re: locating a sourced file
- Next by thread: Re: locating a sourced file
- Index(es):