Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function io.popen_read_all(command)
- local handle = io.popen(command)
- local result = handle:read("*all")
- handle:close()
- return result
- end
- -- example
- output = io.popen_read_all("ls -a")
- output = io.popen_read_all("date")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement