[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: A Lua script and a Bash script in one file
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 8 May 2012 12:26:50 +0200
On Tue, May 8, 2012 at 11:26 AM, Michael Wolf <email@example.com> wrote:
> If you replcae "@goto end" with "exit /B" you dont need the trailing
> goto which looks a bit nicer
This is cool, because it makes it possible to package Lua scripts as
batch files directly.
To get the arguments passed, a slight alternation:
@lua.exe %0.bat %* && @exit /B
print 'hello dolly'
for i,a in ipairs(arg) do print(i,a) end
(The '.bat' is needed if you wanted to invoke this just as 'hello')
D:\>hello one two three