LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash: message (https://www.linuxquestions.org/questions/linux-newbie-8/bash-message-201819/)

Gettis 07-06-2004 02:44 PM

bash: message
 
I just started on Linux, and I am trying to execute a shell script which has the right permissions but when I type the name I get a message saying "bash: filename: command not found".
This file is not in or below my home directory, but instead I must go up with "cd.." twice to get to it.
How can I proceed so that I may just execute this shell script by typing its name.
Thank you in advance,
Gettis

mikshaw 07-06-2004 02:51 PM

Place the script in a directory which is in your $PATH
or
Add the directory to your $PATH
or
Create a link to the script in a directory which is in your $PATH

ranger_nemo 07-06-2004 03:06 PM

Or, just type in the full path/scriptname...

$ /dir1/dir2/script

david_ross 07-06-2004 03:10 PM

Or if it is in the current directory:
./scriptname

or:
bash scriptname


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