LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   BASH search path problem (https://www.linuxquestions.org/questions/programming-9/bash-search-path-problem-143356/)

neilcpp 02-07-2004 12:11 PM

BASH search path problem
 
:cry:

At the moment if i try to run a program (which i wrote) from my current directory with bash, it does not recognise the program. SO I have to type:

'./' before the executable name to make bash find it.

I want to fix bash so that when i type in a executable name, it will automatically search the current directory. My question is this:

1. What file do i need to edit?

2. What exactly do i need to put in this file?

Thanks

DrOzz 02-07-2004 12:15 PM

your questions are answered here

neilcpp 02-07-2004 12:35 PM

This does not answer my question. I get the message ./ not a valid identifier whenever i login now that i changed .bashrc

Can anybody help with this problem please? I dont know what file to change or where to put the changes.

Tinkster 02-07-2004 01:50 PM

Well, that just says you didn't quite understand
how the PATH works... :) The thread DrOzz pointed
you to, together with man bash, would have given
you the answer ...

What you want to do (even though it's a STUPID
thing to do in general, for security reasons) is to
add the local dirctory to your path

export PATH=$PATH:.


Cheers,
Tink

neilcpp 02-07-2004 02:04 PM

the thread was about adding kde to path . i did not want to do that... but i searched on the internet and found that adding this line to my .bashrc works:

export PATH=/directory/of/bin/that/you/want/:$PATH


All times are GMT -5. The time now is 11:43 AM.