[Gllug] Delayed data feed

Nix nix at esperi.org.uk
Tue Jan 18 09:17:24 UTC 2011


On 12 Jan 2011, tethys at gmail.com said:

> On Wed, Jan 12, 2011 at 4:55 PM,  <jayeola at gmail.com> wrote:
>
>> Sleep 30
>
> Maybe I should rephrase the question. Does anyone have a solution that
> works and does what I asked for? Hint: sleep 30 doesn't.

As someone else suggested, doing this *right* requires timestamping each
line and stripping the timestamp out later, which ts(1) from moreutils
can do. However, moreutils doesn't include an actual delay-sponge
(though it is a reasonable addition to sponge(1) in that package,
though perhaps a separate filter delay(1) is more desirable.)

It is also a reasonable thing to add to dd(1), but, again, not even GNU
coreutils's dd can do it.

tail --sleep-interval=$N -n +0 seems initially promising but doesn't do
what is wanted: it prints everything waiting every $N seconds, whether
or not it has been waiting for that long already.
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list