Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-09-2002, 02:33 PM   #1
Registered: Sep 2002
Distribution: fc2
Posts: 113

Rep: Reputation: 15
source in bash


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.

Old 10-09-2002, 02:40 PM   #2
LQ Newbie
Registered: Oct 2002
Location: New Jersey
Distribution: Red Hat 8.0
Posts: 20

Rep: Reputation: 0
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.
Old 10-09-2002, 02:45 PM   #3
Registered: Aug 2002
Location: Mumbai,India
Distribution: Linux Mint 12, Gentoo
Posts: 230

Rep: Reputation: 30
for more info try
man bash



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
an error in my YaST source installer bash script Cinematography Programming 0 08-31-2005 03:13 PM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 07:42 PM
where is the bash source code?... gearoid Programming 5 11-25-2003 05:24 AM
What is the source (Bash) command do ? Linh Linux - General 5 06-09-2003 05:46 PM
bash source help lackluster Programming 3 12-30-2002 05:19 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:41 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration