Mysterious "command not found"

charles_belov

New Member


Messages: 7

1. I have a file /root/bin/archive.sh
2. /root/bin is in the $PATH variable.
3. I am logged on as root.
4. I am in the /root/bin folder.
5. /root/bin/archive.sh has both read and execute bits set on for user.
6. ls -Floa gives the result
Code:
-r-x------  1 root  wheel  - 3303 Aug 18 17:09 archive.sh*
7. archive.sh has the first line
Code:
#!/bin/bash -e
But, issuing the following commands gives the following non-responsive responses:

./archive.sh
gets the response
Code:
./archive.sh: Command not found.
./archive
gets the response
Code:
./archive: Command not found.
/root/bin/archive.sh
gets the response
Code:
/root/bin/archive.sh: Command not found.
Why can't it find this command when it's right there?
 

aragon

Daemon

Reaction score: 279
Messages: 2,029

charles_belov said:
7. archive.sh has the first line
#!/bin/bash -e
There is no /bin/bash on FreeBSD. You need to use /bin/sh or /usr/local/bin/bash (if bash is installed from ports).
 
Top