Grab exactly one byte from a FIFO, at random intervals

view full story

http://www.unix.com – I want to develop a script of the following form: Code: #!/bin/bash # Function 'listen' opens a data stream # which stores all incoming bytes in # a buffer, preparing them to be # grabbed by a following function # which appears at random # intervals during the execution of # the script listen & INPID=${!} # To test if the script is really capable # of grabbing bytes randomly, the # following code is looped over: PROMPT=n while test ${PROMPT} != 'q' ; do         printf 'y: print next byte\nn: don'"'"'t print next byte\nq: quit\n'       (HowTos)