You are using read instead of readall; is this because it is Julia 1+ wherease the example I have seen was from a previous version?
Anyway, by copying the text from here to avoid typos, I got:
julia> x = read(run(p))
blessed
ERROR: MethodError: no method matching read(::RawFD)
Closest candidates are:
read(::Base.DevNull, ::Type{UInt8}) at coreio.jl:12
read(::IOStream) at iostream.jl:481
read(::IOStream, ::Type{UInt8}) at iostream.jl:393
...
Stacktrace:
[1] read(::Base.ProcessChain) at ./io.jl:231
[2] top-level scope at none:0
julia> x
Process(`ls`, ProcessExited(0))
julia> print(x)
julia> x = readall(run(p))
blessed
ERROR: UndefVarError: readall not defined
Stacktrace:
[1] top-level scope at none:0
julia> x
Process(`ls`, ProcessExited(0))
both with read and readall, the julia variable does not contain the shell output…
Anyway, you were right: there is a typo in the command: a ) too much at the first newline and a ) less at the very end; anyway, neither readall nor read are defined methods when I run them:
julia> x = readall(run(pipeline(`grep 'above' textExample.txt`,
`head -1`, `cut -d " " -f 4`))
)
blessed
ERROR: UndefVarError: readall not defined
Stacktrace:
[1] top-level scope at none:0
blessed
blessed
blessed comes out though. Is there a package that I need to load?