LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   setting bash to look in current directory before searching the path (http://www.linuxquestions.org/questions/linux-newbie-8/setting-bash-to-look-in-current-directory-before-searching-the-path-232530/)

muhkuhmasta 09-19-2004 12:18 PM

setting bash to look in current directory before searching the path
 
why doesn't bash look first in the current directory for an executable 'foo' but searches the path and returns an error when the current directory is not listed?

how can I change that?

david_ross 09-19-2004 12:23 PM

Just add the current directory to your path:
PATH=".:"$PATH

muhkuhmasta 09-19-2004 04:34 PM

hm... ok that'll do it. thanks

muhkuhmasta 09-21-2004 03:04 AM

but what do I need to do in order to tell bash to remember my settings?

btmiller 09-21-2004 03:08 AM

Add them to the bash startup scripts, ~/.bash_profile for login shells and ~/.bashrc for non-login shells (what I do is just have my .bash_profile source .bashrc so I don't need to duplicate stuff).


All times are GMT -5. The time now is 03:07 PM.