LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 15
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
 
Old 10-09-2002, 01:40 PM   #2
pdibona
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, 01:45 PM   #3
sandy
Member
 
Registered: Aug 2002
Location: Mumbai,India
Distribution: Linux Mint 12, Gentoo
Posts: 230

Rep: Reputation: 30
for more info try
man bash

 
  


Reply


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 02:13 PM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 06:42 PM
where is the bash source code?... gearoid Programming 5 11-25-2003 04:24 AM
What is the source (Bash) command do ? Linh Linux - General 5 06-09-2003 04:46 PM
bash source help lackluster Programming 3 12-30-2002 04:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:02 AM.

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