Using techniques mentioned here (Pipe output to two different commands) we can split a stdout into multiple processes.
expensive_command | tee >(proc_1) >(proc_2) | proc_3
my problem is this interlaces the output.
Is there a way to copy the stdout but force proc_2 to block until proc_1 finishes?
I'm thinking something like
expensive_command | tee >(proc_1) | wait for EOF | tee >(proc_2) ...