Possible Duplicate:
Get back the output of os.execute in Lua
I want to assign the result of a shell command to a lua variable.
Any better way in lua 5.1 than what is answered here?
Get back the output of os.execute in Lua
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use io.popen for this (included in Lua 5.1). That gives you a file handle which you can use to either write or read from (to) the program. More info in the Lua Manual.