lux
lux copied to clipboard
Passing variable value while running Lux Script
Hi,
Is there any example of providing variable value from cli when executing Lux Script ? For eg. lux sample.lux variableValue
Thanks Georgy
Hi Georgy,
Sure, passing environment variables is common, for example passing in shell variable MYVAR and using it in all Lux shells:
$ MYVAR=test lux mytest.lux
...and then in the lux file use:
[global luxvar=MYVAR]
Hope that helps!