lua-users home
lua-l archive

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


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.