A classical example of piping:
$ false | true
$ echo ${PIPESTATUS[@]}
1 0
Same example run in a subshell and assigning results into a variable:
$ process="$(false | true)"
$ echo ${PIPESTATUS[@]}
0
How could I get the exit status of each of the piped processes?
Similar question, without the subshell part: