[Gllug] Delayed data feed

James Courtier-Dutton james.dutton at gmail.com
Thu Jan 13 12:32:31 UTC 2011


On 12 January 2011 16:33, - Tethys <tethys at gmail.com> wrote:
> Does anyone know of a simple delay utility that consumes data from
> stdin and outputs it on stdout a fixed time later? What I want to be
> able to do is:
>
>        mkdata | delay 30 | send_data_to_customer
>
> That will send the (time sensitive) output of mkdata to the customer
> with a 30 second delay. The amount of data I'm talking about isn't so
> large that I need to worry about memory usage, and buffering it in RAM
> will work just fine. I can write it myself, but I'd rather not
> reinvent the wheel if someone's already done it.
>

The solution depends on the type of data mkdata produces.
Does
1) mkdata get run, produce a batch of output and then exit?
Or,
2) does mkdata output a continuous stream of data.
3) Are there any field/record separators in the mkdata output.

If it is type 1, the solution is fairly easy to do, if it is type 2,
then the solution is more difficult, and I do not think there are any
standard tools for it.
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list