cat command with timeout

cat command with timeout

Raz raziebe at gmail.com
Sun Jun 20 16:06:51 IDT 2010


watch -n1 cat lala
is another possiblity

2010/6/20 Yigal Asnis <yigalasnis at yahoo.com>

> You can use timeout command, like
> timeout 5 cat ...
> Yigal
>
> --- On *Sat, 6/19/10, Dan Bar Dov <bardov at gmail.com>* wrote:
>
>
> From: Dan Bar Dov <bardov at gmail.com>
> Subject: Re: cat command with timeout
> To: "Ori Idan" <ori at helicontech.co.il>
> Cc: "IGLU Mailing list" <linux-il at cs.huji.ac.il>
> Date: Saturday, June 19, 2010, 11:03 PM
>
> Years ago I needed a cat with a timeout argument.
> I modified the cat code. It was very easy (if I remember correctly less
> than one hour of work).
>
> Sadly, I don't have the code.
>
> Good luck.
> Dan
>
> 2010/6/10 Ori Idan <ori at helicontech.co.il<http://mc/compose?to=ori@helicontech.co.il>
> >
>
>> I have to read lines from serial port, I thought to read them using 'cat'
>> however, since the other unit connected to the serial port, might
>> malfunction and not send anything, I need a timeout to stop reading after
>> few seconds.
>> Does someone know of an alternative to cat with timeout?
>>
>> --
>> Ori Idan
>>
>>
>>
>> _______________________________________________
>> Linux-il mailing list
>> Linux-il at cs.huji.ac.il <http://mc/compose?to=Linux-il@cs.huji.ac.il>
>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>>
>>
>
> -----Inline Attachment Follows-----
>
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il <http://mc/compose?to=Linux-il@cs.huji.ac.il>
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20100620/7a2045df/attachment.html>


More information about the Linux-il mailing list