Message: 1
Date: Fri, 23 Dec 2016 08:11:15 +1100
From: Sean Crosby <richardnixonshead@gmail.com>
To: Craig Sanders <cas@taz.net.au>, luv-main <luv-main@luv.asn.au>
Subject: Re: /usr/bin/env
Message-ID:
<CADg9O+Ncb-3DWJBdBc8mvBkYJYqitVcs+ >Wht5NxnYrXpg4K17g@mail.gmail. com
Content-Type: text/plain; charset="utf-8"
On 23 December 2016 at 01:37, Craig Sanders via luv-main <
luv-main@luv.asn.au> wrote:
>
> the one argument in favour of doing this (that the script will be run by
> the
> first matching interpreter found in the PATH) is both a blessing and a
> curse.
> at best it's a minor convenience. at worst, it's a potential security risk
> -
> it's not an accident or an oversight that every unix system since the #!
> line
> was invented DOESN'T search $PATH for the interpreter.
I've taken to using /usr/bin/env a bit more because of the max length limit
in shebang lines. We store newer versions of Ruby, Python etc on a separate
filesystem, where there are many versions of these directories, and they
are hidden down quite far in the dirtree. So we regularly hit the max
shebang length limit of 128 characters.