If I run
$#/bin/bash for i in `seq 5`; do exec 3> >(sed -e \"s/^/$i: /\"; echo \"$i-\") echo foo >&3 echo bar >&3 exec 3&
Easy, just pipe everything into cat.
#!/bin/bash for i in `seq 5`; do { exec 3> >(sed -e "s/^/$i: /"; echo "$i-") echo foo >&3 echo bar >&3 exec 3<&- }|cat done
Here's the output:
1: foo 1: bar 1- 2: foo 2: bar 2- 3: foo 3: bar 3- 4: foo 4: bar 4- 5: foo 5: bar 5-