watch -n1 cat lala
is another possiblity

2010/6/20 Yigal Asnis <[email protected]>

> You can use timeout command, like
> timeout 5 cat ...
> Yigal
>
> --- On *Sat, 6/19/10, Dan Bar Dov <[email protected]>* wrote:
>
>
> From: Dan Bar Dov <[email protected]>
> Subject: Re: cat command with timeout
> To: "Ori Idan" <[email protected]>
> Cc: "IGLU Mailing list" <[email protected]>
> 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 
> <[email protected]<http://mc/[email protected]>
> >
>
>> 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
>> [email protected] <http://mc/[email protected]>
>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>>
>>
>
> -----Inline Attachment Follows-----
>
>
> _______________________________________________
> Linux-il mailing list
> [email protected] <http://mc/[email protected]>
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>
>
> _______________________________________________
> Linux-il mailing list
> [email protected]
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>
_______________________________________________
Linux-il mailing list
[email protected]
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to