[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: /usr/bin/env and the Lua bytecode format
- From: Reuben Thomas <rrt@...>
- Date: Wed, 29 Aug 2001 12:03:03 +0100 (BST)
> 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.