lua-users home
lua-l archive

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


> For Unix, not all Lua installations result in Lua being placed in
> /usr/local/bin/lua.  For maximum portability, I suggest that one start
> Unix scripts with the line:
> 
>    #! /usr/bin/env lua
> 
> Please make a note of this trick in Section 8 of the Lua documentation
> titled "Lua Stand-alone".

I'm not sure whether I mentioned before, but this approach doesn't
work (at least on my RedHat Linux system) for scripts run with
parameters, e.g. lua -f. This is because the kernel seems to pass only
one argument to the program being run, so env gets "lua -f" and
complains that there's no such program.