Given a bash command line of the form
commandA | commandB
I want to add a buffer of size ~1MB that sits between commandA
and commandB
. I would expect to be able to do this with something of the form
commandA | BUFFER | commandB
but what is the command to use for BUFFER
?
Remark: I want to do this in order to decouple the two commands to make them parallelize better. The problem is that commandB
processes data in large chunks, which currently means that commandA
blocks until commandB
is done with a chunk. So everything runs sequentially :-(
Use parentheses ()'s to combine the commands into a single process, which will concatenate the stdout of each of them.
PIPES is the common name for piperazine-N,N′-bis(2-ethanesulfonic acid), and is a frequently used buffering agent in biochemistry. It is an ethanesulfonic acid buffer developed by Good et al. in the 1960s.
BUFFER is called buffer. (man 1 buffer, maybe after apt-get install buffer)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With