63
16
Is there a filter which I could use to rate-limit a pipe on linux? If this exists, let call it rate-limit, I want to be able to type in a terminal something like
cat /dev/urandom | rate-limit 3 -k | foo
in order to send a a stream of random bytes to foo's standard input at a rate (lower than) 3 kbytes/s.
1I asked here because I want to use it in a programme, not for troubleshooting. But it's my very first question here so I apologize if I made an error. – None – 2010-03-17T17:54:05.530
1BTW, the above is an unnecessary use of cat, you could do
rate-limit 3k < /dev/urandom | foo
. – dmckee --- ex-moderator kitten – 2010-03-17T18:15:25.820