lux icon indicating copy to clipboard operation
lux copied to clipboard

Passing variable value while running Lux Script

Open gmathew18 opened this issue 8 years ago • 1 comments

Hi,

Is there any example of providing variable value from cli when executing Lux Script ? For eg. lux sample.lux variableValue

Thanks Georgy

gmathew18 avatar May 16 '17 01:05 gmathew18

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!

JohanVikman avatar May 16 '17 05:05 JohanVikman