在Lua中取回os.execute的输出 [英] Get back the output of os.execute in Lua

查看:36
本文介绍了在Lua中取回os.execute的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 Lua 中执行os.execute"时,会快速弹出一个控制台,执行命令,然后关闭.但是有没有什么方法可以只使用标准的 Lua 库来恢复控制台输出?

When I do an "os.execute" in Lua, a console quickly pops up, executes the command, then closes down. But is there some way of getting back the console output only using the standard Lua libraries?

推荐答案

我想你想要这个 http://pgl.yoyo.org/luai/i/io.popen io.popen.但它并不总是被编译进来.

I think you want this http://pgl.yoyo.org/luai/i/io.popen io.popen. But it's not always compiled in.

这篇关于在Lua中取回os.execute的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆