Script in execution PATH

Discussion in 'Mac Programming' started by tirwit, Feb 2, 2010.

  1. tirwit macrumors newbie

    Jan 20, 2010

    I'm kinda new to this part of informatics so my question will look dumb... My apologies in advance.

    I need to work with a chart of nuclides which I found in

    I downloaded the Yoix Installer which supposedly brings the application (the link is on that webpage too). But in the bottom of the page you find this:

    But how do I do that? I mean... What's the PATH and what (and how do I do it?) is adding the script to it?

    I'm still undergraduate engineering physics student, so informatics it's not my strong point :confused:

    Thanks :)
  2. GroovyLinuxGuy macrumors regular


    Apr 2, 2006
    You can run the script from wherever it is located (I will assume it is just in your home directory) by adding a ./ in front of it as in:

    To actually add it to your $PATH you can do the following
    export PATH=/location/of/script/directory:$PATH

    This will add it temporarily to your $PATH. If you edit the .bash_profile file hidden in your directory and add that line there it will become permanent. You can just add it at the bottom of the file.

    Another easy way to do this is just create a folder called "bin" (without the quotes) in your home directory, then put the script in there and I believe that OSX automatically adds it to your path once you log out and log back in again.

    If it doesn't seem to be working after you do any of the above, you may have to set the script to be executable. To do this from the terminal just type:
    chmod +x ychart_elements

    Some scripts are not set as executable when you download them.

    Here is a link to an article about setting your $PATH:

  3. tirwit thread starter macrumors newbie

    Jan 20, 2010

Share This Page