Is it possible to read the following from the local variable in Lua?
local t = os.execute("echo 'test'")
print(t)
I just want to achieve this: whenever os.execute
returns any value, I would like to use it in Lua - for example echo 'test'
will output test
in the bash command line - is that possible to get the returned value (test
in this case) to the Lua local variable?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…