bash source search path

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 <file_without_path.h>

Thanks,
Peng
PengYu.UT [ Fr, 28 Dezember 2007 05:26 ] [ ID #1894711 ]

Re: bash source search path

On Thu, 27 Dec 2007 20:26:28 -0800, PengYu.UT [at] 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 <file_without_path.h>
>
> Thanks,
> Peng

If you had typed "help source" in bash you would see that "source" looks
for its file using the PATH variable.
Icarus Sparry [ Fr, 28 Dezember 2007 06:07 ] [ ID #1894712 ]
Linux » comp.unix.shell » bash source search path

Vorheriges Thema: cygwin
Nächstes Thema: use of the date command in tar