Advertisement
nelsonlombardo

Command Pipe

Jul 17th, 2013
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.21 KB | None | 0 0
  1. function pipeCmd (cmd)
  2.     local ret
  3.     local command = io.popen(cmd)
  4.     local tmp = command:read("*a")
  5.     io.close(command)
  6.     ret = string.gsub(tmp, "\n", "") -- Remove line break
  7.     return ret
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement