NOTE FROM OP: Oops. My mistake. I happened to let grep hunt for something(s) non-existent. Of course I got no output. And yes, this is a dup of another question.
<><><><><><><><><><><><><><><><><><><><>
There are many answers on the web to (most of) this question. The "most of" part is my problem.
How do I capture the output of a command line into a bash array when the command line contains pipe chars, "|"?
array=($(ps -ef | grep myproc | grep -v grep))
doesn't work. Neither does:
array=(`ps -ef | grep myproc | grep -v grep`)
(those are backquotes in case your font mangles them).
And, can the given answer be use with array+= syntax?