Reading output from external program in stdout

This seems to work for me.

# `b` is some `Cmd` object
open(b, "r", stdout) do io
   while !eof(io)
       println(readuntil(io, '\n'))
   end
end

But I don’t understand why the readline version didn’t work.

1 Like