setting a path in bash shell

Discussion in 'Mac Programming' started by laura74, Mar 20, 2010.

  1. laura74 macrumors newbie

    Mar 20, 2010
    Hello all,

    Sorry if the question if stupid but I have no big experience with programming.
    I am trying to set a path to be used in a, for installation of a Fortran code. The contains the string


    Now, when I type in the bash shell

    export CODE_NAME=/Users/laura/code_folder

    the compiling starts regularly. In order to automatize the process, I copied the line above in the .bash_profile (I have done this in the past for aliases and it worked). However in this case it does not work. Anybody can tell me what's wrong?

    Thanks in advance!
  2. Detrius macrumors 68000

    Sep 10, 2008
    Asheville, NC
    I'm no bash expert, so I can't help much there, but since you're trying to set up a global environment variable, you might find this helpful:

    defaults write ~/.MacOSX/environment CODE_NAME /Users/laura/code_folder
    Then log out and log back in again. It's now part of your environment, regardless the shell being used.

Share This Page