lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Oct 15, 2013 at 12:07 AM, Benjamin Heath <benjamin.joel.heath@gmail.com> wrote:

Give it a try and learn for yourself, yo.

On Oct 14, 2013 9:04 PM, "Rena" <hyperhacker@gmail.com> wrote:
On Mon, Oct 14, 2013 at 5:20 PM, Elias Barrionovo <elias.tandel@gmail.com> wrote:
On Mon, Oct 14, 2013 at 6:14 PM, Rena <hyperhacker@gmail.com> wrote:
> I see a lot of Lua scripts beginning with:
> #!/usr/bin/env lua
>
> but what's the reason for invoking 'env' and using an absolute path?
>
> --
> Sent from my Game Boy.


Because you don't know if lua is in /bin, /usr/bin, /usr/local/bin,
/home/username/work/totally-not-porn/im-serious/bin/, etc. but env is
usually in /usr/bin and as long as $PATH is right, it doesn't matter
where lua is.

I'm not saying that env *must* be in /usr/bin, but I think it's more
probable for env to be there than lua.

--
NI!

() - www.asciiribbon.org
/\ - ascii ribbon campaign against html e-mail and proprietary attachments


OK, but what's the purpose of 'env'? Can you not write #!lua?

--
Sent from my Game Boy.

Interesting, I thought I'd seen that done before. I wonder why that doesn't work?

--
Sent from my Game Boy.