interactive lua: command line arguments

Posted by mr calendar on Stack Overflow See other posts from Stack Overflow or by mr calendar
Published on 2010-05-31T20:24:17Z Indexed on 2010/05/31 20:33 UTC
Read the original article Hit count: 258

Filed under:
|
|

I wish to do

 lua prog.lua arg1 arg2

from the command line

Inside prog.lua, I want to say, for instance

print (arg1, arg2, '\n')

Lua doesn't seem to have argv[1] etc and the methods I've seen for dealing with command line arguments seem to be immature and / or cumbersome. Am I missing something?

© Stack Overflow or respective owner

Related posts about command-line

Related posts about lua