bash source search path
am 28.12.2007 05:26:28 von PengYu.UT
Hi,
I'm wondering if it is possible to source a file without specifying
the directory it is in (bash). Is there any way to specify the search
path for sourced files.
With this, I can just source a file just like including a file in C++.
source file_without_path
#include
Thanks,
Peng
Re: bash source search path
am 28.12.2007 06:07:49 von Icarus Sparry
On Thu, 27 Dec 2007 20:26:28 -0800, PengYu.UT@gmail.com wrote:
> Hi,
>
> I'm wondering if it is possible to source a file without specifying the
> directory it is in (bash). Is there any way to specify the search path
> for sourced files.
>
> With this, I can just source a file just like including a file in C++.
>
> source file_without_path
>
> #include
>
> Thanks,
> Peng
If you had typed "help source" in bash you would see that "source" looks
for its file using the PATH variable.