Results 1 to 2 of 2
  1. #1
    Need some help with Bash
    V6Pony's Avatar
    Member Since
    Oct 30, 2010
    Location
    Southern Illinois
    Posts
    273
    Specs:
    MBP 15" I7 first one and loving it.
    Need some help with Bash
    Ok. I'm wanting to learn some bash scripting. Found a good tutorial that I'm working through. I set up a dir to store programs bash files in. ~/Bash_Study/Programing_Study. I know that is a bit long in the tooth. So I wanted to add this location to my $PATH so I would not have to type out the path to run the files. I was able to use the export command to send the path location to $PATH. This works until you log out and back in then the setting is gone.

    This is where the fun begins. So I think well just edit the path file to keep the setting after log off. From out of the past I thought that the path was in a file .profile or .bashrc. So I look for these files and can not find them anywhere. Nor can I find any file that I can edit the PATH setting. So where the **** is it?

    Some one told me to try echo 'export PATH=/path/to/some/dirPATH' >> .profile to create the .profile file and fill it with the path statement. In my case this would have been echo 'export PATH=~/PATH >> .profile. After doing this I would get errors when restarting terminal. I tried to edit .profile with pico. Still did not work.

    Anyone know how to do advise me what I'm doing wrong ?

    Thanks

  2. #2
    Need some help with Bash
    V6Pony's Avatar
    Member Since
    Oct 30, 2010
    Location
    Southern Illinois
    Posts
    273
    Specs:
    MBP 15" I7 first one and loving it.
    Ok with some searching I think I found the answer. May not be the only answer but it seems to work. If you go to /etc folder there is a file called paths. You can edit paths with sudo. I added the ~/Bash_Study/Program_Examples to the end of the file. It works! Also when I run echo $PATH the path is listed.

    Problem solved.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Terminal Bash help
    By Zaush in forum OS X - Apps and Games
    Replies: 1
    Last Post: 11-22-2010, 12:14 AM
  2. /bin/bash
    By fparedesg in forum OS X - Operating System
    Replies: 1
    Last Post: 08-12-2009, 10:01 PM
  3. Bash Terminal Question?
    By macunkie in forum OS X - Operating System
    Replies: 1
    Last Post: 11-10-2007, 07:29 AM
  4. Bash Script
    By ftjogoh in forum Apple Notebooks
    Replies: 1
    Last Post: 11-04-2004, 01:14 PM

Posting Permissions

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