[Gllug] Imposing a delay in a pipeline

Richard Huxton dev at archonet.com
Tue Apr 13 16:18:56 UTC 2010


On 13/04/10 17:12, Andy Millar wrote:
>
>
> On Tue, 2010-04-13 at 17:05 +0100, Andy Millar wrote:
>> On Tue, 2010-04-13 at 16:07 +0100, Richard Huxton wrote:
>>> Actually, that's not going to work either, is it?
>>
>> #!/bin/bash
>> while read line ; do
>>      echo $line
>>      sleep $1
>> done
>
> Nope, I've just been reliably informed that that doesn't work, so you
> could probably :
>
> #!/bin/bash
> while read line ; do
>      ( sleep $1 ; echo $line )&
> done

Still only going to give you one line per second isn't it? That was the 
problem with my initial stab at chaining five perl oneliners together.

-- 
   Richard Huxton
   Archonet Ltd
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list