Why is the result different & is this the correct behavior?
The following command
readstring(pipeline(`ps -eo command`,`grep blablabla`,`wc -l`))
where blablabla is a name for a process which doesn’t exist at the moment,
when run in REPL gives always the correct result
“1\n”
what is the grep cmd itself.
But execute a script which have the exact same command inside throws always the error
ERROR: LoadError: failed process: Process(
grep blablabla
, ProcessExited(1)) [1]
Stacktrace:
[1] pipeline_error(::Base.Process) at ./process.jl:682
[2] pipeline_error(::Base.ProcessChain) at ./process.jl:695
[3] read(::Base.OrCmds, ::Base.DevNullStream) at ./process.jl:629
[4] readstring at ./process.jl:634 [inlined] (repeats 2 times)
[5] include_from_node1(::String) at ./loading.jl:576
[6] include(::String) at ./sysimg.jl:14
[7] process_options(::Base.JLOptions) at ./client.jl:305
[8] _start() at ./client.jl:371
while loading /path/testjulia.jl, in expression starting on line 1
what is different and maybe not correct? Or what I’m doing wrong?
Used julia version 0.6.2
Thx for reading and any hints!