Results 1 to 7 of 7

Thread: How to "source bashrc"

  1. #1

    Default 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?

  2. #2

    Default Re: How to "source bashrc"

    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?
    Quote Originally Posted by centurio
    in order to install OpenFOAM, I need to

    > source ~/.bashrc

    but I get an error file or directory not found...

    What's the trick?
    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!
    Where did I put my coffee cup?
    dir -R /home/* | grep "coffee cup"

  3. #3

    Default Re: How to "source bashrc" - that's not the problem...

    ... 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?!?!?

  4. #4
    Join Date
    May 2010
    Location
    Parkersburg, WV, USA
    Posts
    97

    Question Re: How to "source bashrc" - that's not the problem...

    Quote Originally Posted by centurio View Post
    ... 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?
    Desktop: HP Pavalon customized - OpenSUSE amd64
    Laptop: Compaq Presario V6620US - Arch amd64
    Netbook: EEE1005HA - Arch i686

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,894

    Default Re: How to "source bashrc"

    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:
    Code:
    . /home/<yourusername>/.bashrc
    where you of course replace <yourusername> with the correct username.
    Henk van Velden

  6. #6
    Join Date
    May 2010
    Location
    Parkersburg, WV, USA
    Posts
    97

    Default Re: How to "source bashrc"

    Quote Originally Posted by hcvv View Post
    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:
    Code:
    . /home/<yourusername>/.bashrc
    where you of course replace <yourusername> with the correct username.
    I forgot about the bash command source.
    Desktop: HP Pavalon customized - OpenSUSE amd64
    Laptop: Compaq Presario V6620US - Arch amd64
    Netbook: EEE1005HA - Arch i686

  7. #7
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: How to "source bashrc"

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •