LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   source in bash (https://www.linuxquestions.org/questions/linux-newbie-8/source-in-bash-32341/)

albean 10-09-2002 01:33 PM

source in bash
 
Hi,

What does source do? (i tried man source but it said it was a built in command)

I have an executable file that exports some path variables called d86 . When I'm logged in as root all i need to do is type d86 and it sets the path. But when I'm not logged in as root i have to type source d86 for the path to be set.

So I'm just wondering what source is and why i need it in one case and not the other.

Thanks
-AB

pdibona 10-09-2002 01:40 PM

In essence, it's like you're running a "batch" file.
When you source a script, the shell processes the script as if
you had typed in all of the script's commands by hand.

It's a very powerful command, and is used ALOT in the Unix/Linux world.

sandy 10-09-2002 01:45 PM

for more info try
man bash

;)


All times are GMT -5. The time now is 04:42 PM.