lua-users home
lua-l archive

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


2012/5/8 Egor Skriptunoff <egor.skriptunoff@gmail.com>:
>> A Bash script that's also a Lua script!
>
> That's funny!
> The same thing for .bat-files in Windows:
>
> rem = 'This is .BAT-file and .lua-script' --[[
> @echo This is .BAT-file
> @lua52.exe %0
> @goto end
> ]]
> print 'This is Lua script'
> --[[
> :end
> @rem ]]
>

Nice idea!

If you replcae "@goto end" with "exit /B" you dont need the trailing
goto which looks a bit nicer

rem = 'This is .BAT-file and .lua-script' --[[
@echo This is .BAT-file
@lua52.exe %0
@exit /B
]]
print 'This is Lua script'