what the command [source] does ?
it has nothing to do with "compile from source", right?
i tried to man, info for it but that didn't told me anything. what [source ... ] does & how / when should i use it ? thank you. |
First of all, you need to phrase your questions well. That would help you fetch better answers.
Now, if you do man source You will find the manual page of source. The man pages are your best friend. Scroll down a little and you find the description of source #source filename [arguments] Read and execute commands from filename in the current shell environment and return the exit status of the last command exe- cuted from filename. |
thanks,
LinuxLala, how would you prefer i asked the question? if it wasn't clear enough from the title then sorry i tried to do this as informative as possible. now about [man source], believe me i did this, i also did [info source] & i searched linuxquestion for posts about the command (as you might guess posts with the word source are not hard to find in linux forum) now look i'm copying (by hand) from my linux screen onto my xp machine because i do not know how to get a linux shell from windows yet :). Quote:
|
Source is a bash builtin command, and all those commands are grouped together into one man page. If you had scrolled down, you would have seen a description of what source does. As LinuxLala says, it executes a file in the current bash shell environment. It's mostly useful for configuring environment -- for instance, I might want to make a bunch of custom aliases, or tweak my PATH or whatever. I would put the commands to do so in my .bashrc file, but that only gets read when I login or start a new shell. If I want my new things to apply to the shell I'm working under now, I do source .bashrc and that runs the .bashrc and applies any new aliases or environment variable settings to my current terminal session.
BTW -- you should look into ssh as a way to get a terminal on your Linux machine from a separate Windows machine. |
If only you scroll down, using the down arrow key 'coz mouse scroll doesn't work, comes the description I gave.
http://man.he.net/?topic=source§ion=all This is some online man page for source. Don't know how old this is :) About me saying you didn't frame your question right, I mean't Quote:
I understand how difficult it can be to search at LQ :) BTW, what Linux distribution are you running? [EDIT}: The perils of keeping tabs open for too long and not replying sooner, someone else posts sooner, the same thing :D btmiller, you are right, Cheers. |
All times are GMT -5. The time now is 02:55 AM. |