How to "source bashrc"

Hello,

in order to install OpenFOAM, I need to

> source ~/.bashrc

but I get an error file or directory not found…

What’s the trick?

Hello centurio,

There’s a lot of information missing.
Which version of openSUSE are you using?
And which version of openFOAM?
Which tutorial are you following? If non, where did you got that command from?

First of all you need to know what the source command does. Here’s more information about the source command: Unix is a Four Letter Word: Unix —&gt source
In short: it sends the contents of a text file to the shell.

Then about your .bashrc file.
In this file you can put export and alias commands.
They will be available after the system is initializated.
If you don have one you can just make one without any problem.

Good luck!:wink:

… I know what is does, I know, what it is… I know where it is… I edited it …

I simply don’t know how to do the “source” thing so it does its job?!?!?

Title of the man page says

source - Evaluate a file or resource as a Tcl script

Does it have something to do with Tcl maybe?

The source command is source or . (the dot). But the error (why do you not copy/paste this error here!) says it can not find the file, meaning ~/.bashrc. This is most probably because the ~ alias does not function from the place where you are executing it. Thus use:

. /home/<yourusername>/.bashrc

where you of course replace <yourusername> with the correct username.

I forgot about the bash command source. :shame:

centurio wrote:
> … I know what is does, I know, what it is… I know where it is… I
> edited it …
>
> I simply don’t know how to do the “source” thing so it does its
> job?!?!?

iow, you know everything except what you don’t know, pretty cute…


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio