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
#"bash: ./hostdump.sh : no such file or directory"
#"bash: hostdump.sh : command not found"
How do i solve it ? pls advise...
This looks like the executable bit may not be set properly. Try
# chmod +x filename
I did the chmod operation before that.
#chmod 755 hostdump.sh
It really puzzle me..tat the script still don't work.
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 04:29 AM.|