[Gllug] Delayed data feed

Andrew Farnsworth farnsaw at stonedoor.com
Thu Jan 13 02:03:12 UTC 2011


On Wed, Jan 12, 2011 at 8:44 PM, Justin Perreault <justinperreault at dl-jp.com
> wrote:

> On Wed, 2011-01-12 at 16:33 +0000, - Tethys 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
>
> Based on what I have read I am wondering if the issue is the "|"
>
> echo "hello1"; sleep 30s; echo "hello2"
>
> gives a 30s delay(rough count on 1 one thousand) between the two lines
> so how about
>
> mkdata > custfile1 ; sleep 30s; send custfile1 to customer
>
> or does the creation of the file get in the way? Don't even know if it
> is needed to be honest, just did not see anyone mention the "|" you are
> using.
>

There are several problems here.  What happens if the mkdata function
either, doesn't exit or is called again before the 30s has expired and
overwrites the custfile1 data file (yes, you can increment the 1 each time
but it needs to be said).  Other issues to, we need more information on what
is happening.

Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20110112/93be53df/attachment.html>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list