LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-29-2001, 08:20 PM   #1
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Rep: Reputation: 15
Shell script error.


I downloaded a backup script: hostdump.sh
When i stored in one of the directory and run it.
it says "bash: command not found"

Let say, i store the script in /tmp

#cd /tmp
#./hostdump.sh
#"bash: ./hostdump.sh : no such file or directory"

or

#hostdump.sh
#"bash: hostdump.sh : command not found"


How do i solve it ? pls advise...
Thanks...
 
Old 11-29-2001, 09:15 PM   #2
WindozBytes
Member
 
Registered: Aug 2001
Location: CT, USA
Distribution: Mandriva 2008
Posts: 105

Rep: Reputation: 15
This looks like the executable bit may not be set properly. Try

# chmod +x filename
 
Old 11-29-2001, 10:18 PM   #3
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Original Poster
Rep: Reputation: 15
Hi.

I did the chmod operation before that.

#chmod 755 hostdump.sh


It really puzzle me..tat the script still don't work.
 
Old 11-29-2001, 11:30 PM   #4
speck
Member
 
Registered: Nov 2001
Location: California
Distribution: Slackware 14.1
Posts: 271

Rep: Reputation: 54
I think I know what your problem is. Open the script in an editor and look at the first line. You should see something like "#! /usr/bin/sh". I'm guessing that the path in that line is incorrect.

Type "whereis bash" and you should see "bash: /bin/bash". Now edit the file and change the first line to "#! /bin/bash" (if your whereis command returned a different path than my example, just change it to your path.)

Speck
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script help required syntax error sridhar11 Programming 1 10-31-2005 08:38 AM
Exiting the Shell script with Error MEssage sumitarun Programming 5 04-14-2005 01:10 AM
Help With A Shell Script Error PhantomFX Linux - Newbie 3 02-17-2005 04:42 AM
shell script q's (io, error exiting ) dave bean Programming 6 02-17-2005 01:24 AM
Shell Script Error Gerardoj Linux - General 2 12-03-2003 09:44 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration