|
Home > Archive > Unix Shell > December 2007 > bash source search path
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
bash source search path
|
|
| PengYu.UT@gmail.com 2007-12-28, 1:36 am |
| 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
| |
| Icarus Sparry 2007-12-28, 1:36 am |
| 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 <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.
|
|
|
|
|