home dir executable (!/bin/sh, chmod+x) shell scripts won't run without "sh <script>"

Josh Carroll josh.carroll at gmail.com
Mon Jan 7 08:30:27 PST 2008


> How are you running the commands? The problem is probably to do with your
> path. Your home directory isn't typically and shouldn't be in your PATH (try
> echo $PATH). You need to specify the full path to your scripts or place a ./
> in front of the script name if in the same directory.
>
> e.g. ./myscript.sh  or /home/username/myscript.sh

Ahh I misunderstood his email. Yes, most likely he is running it with
"foo.sh" rather than ./foo.sh or /full/path/to/foo.sh

Josh


More information about the freebsd-questions mailing list