COPROC
Articles
Example
Run a "bc" in a subshell and keep it running to call multiple times from a loop without the overhead to instantiate "bc" every single iteration.
coproc bc
for i in {1..10}
do
echo $i'*'$i >&${COPROC[1]}
read -u ${COPROC[0]} rc
echo $rc
done
kill $COPROC_PID
OUTPUT
1 4 9 16 25 36 49 64 81 100