question for bashers:

a bash command entered as a foreground job may fork, leave something in the
background, and exit to the bash prompt, and the job in the background will
print it's output whenever it has any.  So far so good.

i want to enter a command which launches 3 subcommands in parallel, wait up
to 3 seconds unless all 3 subcommands finish sooner, sort all their
output-so-far together, print it, and exit to the bash prompt at this
point, and if any of the subcommands weren't finished, leave them in the
background and let them print more output whenever they have any.

easy?  hard?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20210325/2e52e5fc/attachment.htm>