lua-users home
lua-l archive

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


On Mon, Jan 14, 2013 at 12:59 PM, Lorenzo Donati
<lorenzodonatibz@tiscali.it> wrote:
> OT: In general I find http://ss64.com/nt quite useful when coping with
> Windows shell quirks.

Here's a classic from the lua-list from last year:

A Lua 5.2 shebang for Windows batch files, from the collective effort of lua-l:

::lua::--[[
@lua52.exe"%~f0"%* &@exit/b
]]
print 'hello dolly'
for i,a in ipairs(arg) do print(i,a) end
os.exit(2)

Just call it hello.bat and everything works!  Only with Lua 5.2 since
::lua is a valid label for both syntaxes.

steve d.