Assume that I have programs P0, P1, ...P(n-1) for some n > 0. How can I easily redirect the output of program Pi
P0
P1
P(n-1)
n > 0
Pi
Named pipes.
Create a series of fifos, using mkfifo
i.e fifo0, fifo1
Then attach each process in term to the pipes you want:
processn < fifo(n-1) > fifon