run_command
This commit is contained in:
parent
258c5bfff4
commit
8775f720a6
@ -110,4 +110,12 @@ function scandir(directory)
|
|||||||
t[i] = filename
|
t[i] = filename
|
||||||
end
|
end
|
||||||
return t
|
return t
|
||||||
end
|
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