Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

hinkenput

macrumors newbie
Original poster
Feb 14, 2012
1
0
I need a simple line of code to tell Terminal to look for my scripts in Applications/Scripts, where I put them. In other words, when I enter "echo $PATH" I want to add ":/Applications/Scripts" to the string that is returned. I am not a programmer, and my son wrote this command for me a couple of years ago, and it worked, but I didn't save it. I've tried searching the web, but haven't been able to find it. Can anyone write it for me? Thanks.
 
Put
export PATH=$PATH:/Applications/Scripts
in ~/.bash_profile

This is assuming you're using bash as your shell, which you probably are. If you're using csh or tcsh, you need to put
setenv $PATH:/Applications/Scripts
in ~/.cshrc
 
Put
export PATH=$PATH:/Applications/Scripts
in ~/.bash_profile

This is assuming you're using bash as your shell, which you probably are. If you're using csh or tcsh, you need to put
setenv $PATH:/Applications/Scripts
in ~/.cshrc

Also don't forget to reload your .bash_profile by typing ". ~/.bash_profile" (otherwise changes won't take effect until next login)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.