LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-06-2004, 02:44 PM   #1
Gettis
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,
Gettis
 
Old 07-06-2004, 02:51 PM   #2
mikshaw
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
or
Add the directory to your $PATH
or
Create a link to the script in a directory which is in your $PATH
 
Old 07-06-2004, 03:06 PM   #3
ranger_nemo
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, 03:10 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

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

or:
bash scriptname
 
  


Reply


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 04:28 PM
bash: ./runcbl: cannot execute binary file message Earla Harding Linux - Enterprise 0 07-27-2005 03:39 PM
From BASH, "Play <filename.wav" gives obsolete oss interface message ericcarlson Fedora 3 09-14-2004 07:20 AM
linux command error message bash: /usr/bin/find: No such file or directory sundaram123 Linux - General 8 04-02-2002 08:18 AM
bash message ctwarchol Linux - General 0 11-15-2001 07:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:05 PM.

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