On 12/5/24 10:19 AM, Dan Cross wrote:
Unix pipelines, on the other hand, tend to be
used in a manner that is
strictly linear, without the fan-out and fan-in capabilities described
by Morrison. Of course, nothing prevents one from building a
Morrison-style "network" from Unix processes and pipes, though it's
hard to see how that would work without something like `select`, which
didn't yet exist in 1978. Regardless, Unix still doesn't expose a
particularly convenient syntax for expressing these sorts of
constructions at the shell.
Process substitution is about as close as we can get, but most programs
still process their filename arguments one at a time, beginning to end.
The canonical process substitution example is
diff <(old-program-version) <(new-program-version)
to do simple regression testing.
And fanout is simply
... | tee >(pipeline1) >(pipeline2)