# bash 5.2 outputs: # >te:142< { echo -n 'te'; sleep 2; echo 'st'; } | (read -t 1 reply; echo ">$reply:$?<") # >:142< { sleep 2; echo 'test'; } | (read -t 1 reply; echo ">$reply:$?<") # >test:0< { echo -n 'te'; sleep 1; echo 'st'; } | (read -t 2 reply; echo ">$reply:$?<") # >test:0< { sleep 1; echo 'test'; } | (read -t 2 reply; echo ">$reply:$?<")