<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">You can use timeout command, like<br>timeout 5 cat ...<br>Yigal<br><br>--- On <b>Sat, 6/19/10, Dan Bar Dov <i><bardov@gmail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Dan Bar Dov <bardov@gmail.com><br>Subject: Re: cat command with timeout<br>To: "Ori Idan" <ori@helicontech.co.il><br>Cc: "IGLU Mailing list" <linux-il@cs.huji.ac.il><br>Date: Saturday, June 19, 2010, 11:03 PM<br><br><div id="yiv2108980135"><div dir="ltr">Years ago I needed a cat with a timeout argument.<div>I modified the cat code. It was very easy (if I remember correctly less than one hour of work).</div><div><br></div><div>Sadly, I don't have the code.</div>
<div><br></div><div>Good luck.</div><div>Dan<br><br><div class="gmail_quote">2010/6/10 Ori Idan <span dir="ltr"><<a rel="nofollow" ymailto="mailto:ori@helicontech.co.il" target="_blank" href="/mc/compose?to=ori@helicontech.co.il">ori@helicontech.co.il</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr"><div class="gmail_quote"><div dir="ltr">I have to read lines from serial port, I thought to read them using 'cat' <br>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.<br>
Does someone know of an alternative to cat with timeout?<br><br>-- <br>Ori Idan<br> <br></div>
</div><br></div>
<br>_______________________________________________<br>
Linux-il mailing list<br>
<a rel="nofollow" ymailto="mailto:Linux-il@cs.huji.ac.il" target="_blank" href="/mc/compose?to=Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
<a rel="nofollow" target="_blank" href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
<br></blockquote></div><br></div></div>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>Linux-il mailing list<br><a ymailto="mailto:Linux-il@cs.huji.ac.il" href="/mc/compose?to=Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br><a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br></div></blockquote></td></tr></table><br>