Re:Sedtris: Tetris in sed
by ars on Sunday April 10, 2011 @05:03PM
(#2430408)
It doesn't speed up. The sed program will wait forever for input, so it has no set speed.
The helper bash script gives it input once a second.
It uses the "read" command to check for input from you, and it will wait 1 second. If it gets no input it sends the sed program an enter.
Unfortunately "read" can not have timeouts less than a second (it doesn't support fractions of a second).
If you want, you could replace "read" with a different program that accepts shorter timeouts. And presumably you could have the bash script slowly decrease the timeout.
The helper bash script gives it input once a second.
It uses the "read" command to check for input from you, and it will wait 1 second. If it gets no input it sends the sed program an enter.
Unfortunately "read" can not have timeouts less than a second (it doesn't support fractions of a second).
If you want, you could replace "read" with a different program that accepts shorter timeouts. And presumably you could have the bash script slowly decrease the timeout.