Say I have two commands: foo and bar.
I want to execute both such that the output of foo is "redirected" to the input of bar. NOT only that though, I also want each byte written to foo's output stream to be directly/instantly written to bar's input stream.
If I use the command:
foo | bar
then the foo must terminate/exit before bar starts reading its input stream. I want bar to start reading its input stream in the same time the foo writes its output stream.
This answer here, if I understand correctly, states that there is a limit in the number of bytes buffered by the pipe and when they are filled then the pipe is "flushed" to the input stream of bar Maybe this limit can be reduced to '1' somehow?