performance - Change the speed of /dev/urandom -


is there way control speed of /dev/urandom

for example, have such generator of binary sequences :

grep -ao "[01]" /dev/urandom|tr -d \\n 

i need make more slow, 100 symbols @ second, 1000 symbols @ second.

you can use pv (among other things) rate limit data pipe:

grep -ao "[01]" /dev/urandom | tr -d \\n | pv -q -l 100 

here use -l in "limit" output rate of @ 100 bytes per second. -q there suppress debugging output pv. 1000 bytes per second use -l 1000 or -l 1k instead.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -