按照文档我做:
julia> run(`echo hello`)
hello
Run Code Online (Sandbox Code Playgroud)
但实际上我并不需要那个输出
julia> run(`echo hello`)
Run Code Online (Sandbox Code Playgroud)
如何关闭它?我错过了什么?
在process.jl 里面有一个名为Process的Type,但我现在还没想到如何生成它.
一些见解这里 像
julia> x = readall(`echo test`);
julia> x
"test\n"
Run Code Online (Sandbox Code Playgroud)
在julia-0.4中,可以使用:
run(pipe(`echo test`, stdout="/dev/null", stderr="/dev/null"))
Run Code Online (Sandbox Code Playgroud)
甚至更多的跨平台
run(pipe(`echo test`, stdout=DevNull, stderr=DevNull))
Run Code Online (Sandbox Code Playgroud)
NB 管道未在julia-0.3中定义
| 归档时间: |
|
| 查看次数: |
372 次 |
| 最近记录: |