# Mysterious "command not found"



## charles_belov (Aug 19, 2010)

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

```
-r-x------  1 root  wheel  - 3303 Aug 18 17:09 archive.sh*
```

7. archive.sh has the first line

```
#!/bin/bash -e
```

But, issuing the following commands gives the following non-responsive responses:

`./archive.sh`
gets the response

```
./archive.sh: Command not found.
```

`./archive`
gets the response

```
./archive: Command not found.
```

`/root/bin/archive.sh`
gets the response

```
/root/bin/archive.sh: Command not found.
```

Why can't it find this command when it's right there?


----------



## aragon (Aug 19, 2010)

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


----------



## charles_belov (Aug 20, 2010)

Solved, thanks!


----------

