Changing PATH on the fly in BASH scripts
I want to be able to add to my PATH when running a BASH shell script, but cannot get it to work. I have tried several different ways to achieve this from within a script, but none seem to work. I thought that (for example):
Code:
export PATH=${PATH}:~/bin I have searched the forums and can find lots of information on how to set the PATH from within .profile, .bashrc, etc., but nothing on how to do it from within a 'normal' shell script. If anyone could shed any light on this, I would appreciate it. Thanks. |
Well, it does work on my computer, but I do remember having the same problem at one time. I can't get it to fail any more. Anyways, back then, I solved it this way:
Code:
export PATH=${PATH}:${HOME)/bin |
All times are GMT -5. The time now is 06:01 AM. |