How to trim newlines in Julia when returning a process.
julia> read(`echo hi`,String) "hi\n"
Use readchomp:
readchomp
julia> readchomp(`echo hi`) "hi"