I need some help on parsing the Command Line for a lua file. I am executing a lua file and that lua file has a command \"dofile(2nd.lua-file)\", but, I want to pass some arg
An easy way:
Command and output:
C:\LUAWORK\Estudio-Tut>lua -e "a=2 b=3 c=4 dofile(‘argu.lua’)"
2 3 4 4 6 8
2 3 4
4 6 8
File 1, argu.lua:
print (a , b ,c) a=2*a b=2*b c=2*c dofile ( ‘otro.lua’)
File 2, otro.lua:
print (a ,b, c)
Using -e "……." I set globals in the call to any chain of modules