For a specific shell script, I need a functionality like in this simplified example:
{ replies=`echo output > >(cat >&3; echo reply1) 2> >(cat >&2; echo reply2)` ;} 3>&1
Obivously, I would like $replies to be something like reply1 reply2, but the "second" stream never gets into the variable but comes out at STDOUT:
output
reply2
$ echo $replies
reply1
It this a bug or a restriction, and how can I work around it?