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

Steve Franks stevefranks at ieee.org
Mon Jan 7 08:13:41 PST 2008


> This is a sort of 'don't shoot yourself in the foot' design.  You
> cannot run a script or binary simply by name if you're cwd is the
> directory that contains that script or binary.  IIRC, you can't cd /
> usr/bin and run anything in /usr/bin without explicitly calling that
> file with the ./ telling the system THIS ONE.

Ah!  You'd think any one of the many tutorials I read would have
mentioned that little detail ;)


Thanks, all
Steve


More information about the freebsd-questions mailing list