Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2008 09:13:39 -0700
From:      "Steve Franks" <stevefranks@ieee.org>
To:        "Eric Crist" <mnslinky@gmail.com>
Cc:        User Questions <freebsd-questions@freebsd.org>
Subject:   Re: home dir executable (!/bin/sh, chmod+x) shell scripts won't run without "sh <script>"
Message-ID:  <539c60b90801070813h537451e8q9264897bc9404260@mail.gmail.com>
In-Reply-To: <5D884B59-3CEF-4F81-B35D-4E54F5D6301C@gmail.com>
References:  <539c60b90801070752l3d0e571cq8f7b1b519e1e808c@mail.gmail.com> <5D884B59-3CEF-4F81-B35D-4E54F5D6301C@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?539c60b90801070813h537451e8q9264897bc9404260>