Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


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

Rep: Reputation: 15
Shell script error.

I downloaded a backup script:
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
#"bash: ./ : no such file or directory"

#"bash: : command not found"

How do i solve it ? pls advise...
Old 11-29-2001, 09:15 PM   #2
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
Registered: Nov 2001
Location: singapore
Posts: 120

Original Poster
Rep: Reputation: 15

I did the chmod operation before that.

#chmod 755

It really puzzle me..tat the script still don't work.
Old 11-29-2001, 11:30 PM   #4
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 354

Rep: Reputation: 93
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.)



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 > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:17 PM.

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