My question is related to https://serverfault.com/questions/171095/how-do-i-join-two-named-pipes-into-single-input-stream-in-linux but with a slightly more convoluted setup.
I have three programs,
cmd1 takes no input and writes to stdout
cmd2 reads stdin or a given file and writes to stdout
cmd3 reads two files
The dataflow for these programs is the following:
cmd2 consumes data produced by
cmd3 consumes data produced by both
cmd1 ---+-----> cmd2 ---> | cmd3 +--------------->
How can I achieve this dataflow with a single command line using >(), pipes and
My best guess is
cmd1 | tee >(cmd2) > >(cmd3).