-
batchcmds貌似不支持iorunv,如何把命令的执行输入重定向到文件? |
Beta Was this translation helpful? Give feedback.
Answered by
waruqi
Oct 26, 2021
Replies: 1 comment 2 replies
-
batchcmds 是序列化的 cmd list,并没有立即执行,无法去 iorunv的返回值,可以走 stdout 可以传递 文件路径,或者 io.open的文件对象,或者 pipe 对象。。都可以实现重定向 |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
xq114
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
batchcmds 是序列化的 cmd list,并没有立即执行,无法去 iorunv的返回值,可以走
runv(program, argv, {stdout = "", stderr = "", stdin = ""})
。execv 也可以stdout 可以传递 文件路径,或者 io.open的文件对象,或者 pipe 对象。。都可以实现重定向