julia lang - How to silence or redirect STDOUT when calling external programs? -


following docs do:

julia> run(`echo hello`) hello 

but don't need output

julia> run(`echo hello`) 

how turn off? missing?


inside process.jl there type called process failed figured how spawn now..

some more insights here like

julia> x = readall(`echo test`);  julia> x "test\n" 

in julia-0.4 1 can use:

run(pipe(`echo test`, stdout="/dev/null", stderr="/dev/null")) 

or more cross-platform

run(pipe(`echo test`, stdout=devnull, stderr=devnull)) 

nb pipe not defined in julia-0.3


Comments