Is there a shell command to delay a buffer?
bash, shell
Solution
As it seemed such a command dit not exist, I implemented it in C: https://github.com/rom1v/delay
delay [-b <dtbufsize>] <delay>
Problem
I am looking for a shell command X such as, when I execute: ``` command_a | X 5000 | command_b ``` the `stdout` of `command_a` is written in `stdin` of `command_b` (at least) 5 seconds later. A kind of delaying buffer. As far as I know, `buffer`/`mbuffer` can write at constant rate (a fixed number of bytes per second). Instead, I would like a constant delay in time (t=0 is when `X` read a `command_a` output chunk, at t=5000 it must write this chunk to `command_b`). [edit] I've implemented it: https://github.com/rom1v/delay