New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

Need some help with Bash


Post Reply New Thread Subscribe

 
Thread Tools
V6Pony

 
V6Pony's Avatar
 
Member Since: Oct 30, 2010
Location: Southern Illinois
Posts: 261
V6Pony is an unknown at this point
Mac Specs: MBP 15" I7 first one and loving it.

V6Pony is offline
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
QUOTE Thanks
V6Pony

 
V6Pony's Avatar
 
Member Since: Oct 30, 2010
Location: Southern Illinois
Posts: 261
V6Pony is an unknown at this point
Mac Specs: MBP 15" I7 first one and loving it.

V6Pony is offline
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.
QUOTE Thanks

Post Reply New Thread Subscribe


« iMac wont shut down anymore | my email is stuck in my outbox »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Trouble finding bash files using "locate" jps2012 OS X - Operating System 0 05-11-2012 04:45 PM
Run bash script via button in interface builder? Bwoe OS X - Development and Darwin 5 03-23-2011 08:58 PM
Problems with terminal Vladswe OS X - Operating System 0 12-30-2009 06:03 PM
Auto-Logging BASH session quietly danjmwalker OS X - Development and Darwin 0 10-04-2007 02:19 PM
Bash Script ftjogoh Apple Notebooks 1 11-04-2004 01:14 PM

All times are GMT -4. The time now is 07:41 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?