LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Path issue in Bash (https://www.linuxquestions.org/questions/linux-software-2/path-issue-in-bash-357928/)

gd2shoe 08-28-2005 09:21 PM

Path issue in Bash
 
This is probably something simple. I'm in the process of writing a simple script (my most complex one to date) and am having issues with the path. I can run my script directly, but I cannot get it to run from the $PATH. My script is located in ~/bin, and is currently titled "test". This is my console output (running SuSE 9.3):

Code:

~> which test
~> which bin/test
bin/test
~> which /home/user/bin/test
/home/user/bin/test
~> echo $PATH
/home/user/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/jvm/jre/bin

As I said, it's probably a no-brainer. It's just got me stumped.

btmiller 08-28-2005 09:55 PM

Is your script named test? If so, it's name conflicts with the already existent test command, and you should name it something else.

gd2shoe 08-28-2005 10:18 PM

Thank you. Still took me a few minutes to figure it out. It's a bash built-in. I'll rename it.


All times are GMT -5. The time now is 09:05 AM.