-   Linux - General (
-   -   Shell script error. (

chuck77 11-29-2001 09:20 PM

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...

WindozBytes 11-29-2001 10:15 PM

This looks like the executable bit may not be set properly. Try

# chmod +x filename

chuck77 11-29-2001 11:18 PM

I did the chmod operation before that.

#chmod 755

It really puzzle me..tat the script still don't work.

speck 11-30-2001 12:30 AM

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.)


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