run_command
This commit is contained in:
parent
258c5bfff4
commit
8775f720a6
@ -111,3 +111,11 @@ function scandir(directory)
|
||||
end
|
||||
return t
|
||||
end
|
||||
|
||||
-- http://www.lua.org/manual/5.2/manual.html#pdf-io.popen
|
||||
function run_command(str)
|
||||
local cmd = io.popen(str)
|
||||
local result = cmd:read('*all')
|
||||
cmd:close()
|
||||
return result
|
||||
end
|
||||
|
Reference in New Issue
Block a user