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

Steve Franks stevefranks at ieee.org
Mon Jan 7 07:52:40 PST 2008


I keep reading about making sh scripts executable with #!/bin/sh on
the first line and chmod to executable.  That works with all my system
scripts (rc, etc.) or my system would be DOA, no doubt.  When I do it
in my home folder, however, running <script> gives "command not
found".  I've only read about 5 sites telling you how to make shell
scripts executable, they all say the same thing, and they all don't
work.  How did I get to be so special?

Steve


More information about the freebsd-questions mailing list