<div dir="ltr">watch -n1 cat lala<div>is another possiblity<br><br><div class="gmail_quote">2010/6/20 Yigal Asnis <span dir="ltr"><<a href="mailto:yigalasnis@yahoo.com">yigalasnis@yahoo.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><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><<a href="mailto:bardov@gmail.com" target="_blank">bardov@gmail.com</a>></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 <<a href="mailto:bardov@gmail.com" target="_blank">bardov@gmail.com</a>><br>Subject: Re: cat command with timeout<br>
To: "Ori Idan" <<a href="mailto:ori@helicontech.co.il" target="_blank">ori@helicontech.co.il</a>><br>Cc: "IGLU Mailing list" <<a href="mailto:linux-il@cs.huji.ac.il" target="_blank">linux-il@cs.huji.ac.il</a>><br>
Date: Saturday, June 19, 2010, 11:03 PM<br><br><div><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" href="http://mc/compose?to=ori@helicontech.co.il" target="_blank">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><div class="im">
<br>_______________________________________________<br>
Linux-il mailing list<br>
<a rel="nofollow" href="http://mc/compose?to=Linux-il@cs.huji.ac.il" target="_blank">Linux-il@cs.huji.ac.il</a><br>
<a rel="nofollow" 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>
<br></div></blockquote></div><br></div></div>
</div><br>-----Inline Attachment Follows-----<div class="im"><br><br><div>_______________________________________________<br>Linux-il mailing list<br><a href="http://mc/compose?to=Linux-il@cs.huji.ac.il" target="_blank">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></div></blockquote></td></tr></tbody></table><br>
<br>_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto: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>
<br></blockquote></div><br></div></div>