Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-06-2004, 01:44 PM   #1
LQ Newbie
Registered: Jul 2004
Location: San Diego
Posts: 1

Rep: Reputation: 0
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,
Old 07-06-2004, 01:51 PM   #2
LQ Addict
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
Place the script in a directory which is in your $PATH
Add the directory to your $PATH
Create a link to the script in a directory which is in your $PATH
Old 07-06-2004, 02:06 PM   #3
Senior Member
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
Or, just type in the full path/scriptname...

$ /dir1/dir2/script
Old 07-06-2004, 02:10 PM   #4
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Or if it is in the current directory:

bash scriptname


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
If bash command can send message to a host ? naihe2010 Programming 4 10-29-2005 03:28 PM
bash: ./runcbl: cannot execute binary file message Earla Harding Linux - Enterprise 0 07-27-2005 02:39 PM
From BASH, "Play <filename.wav" gives obsolete oss interface message ericcarlson Fedora 3 09-14-2004 06:20 AM
linux command error message bash: /usr/bin/find: No such file or directory sundaram123 Linux - General 8 04-02-2002 07:18 AM
bash message ctwarchol Linux - General 0 11-15-2001 06:47 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration