watch -n1 cat lala is another possiblity 2010/6/20 Yigal Asnis <yigalas...@yahoo.com>
> You can use timeout command, like > timeout 5 cat ... > Yigal > > --- On *Sat, 6/19/10, Dan Bar Dov <bar...@gmail.com>* wrote: > > > From: Dan Bar Dov <bar...@gmail.com> > Subject: Re: cat command with timeout > To: "Ori Idan" <o...@helicontech.co.il> > Cc: "IGLU Mailing list" <linux-il@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 > <o...@helicontech.co.il<http://mc/compose?to=...@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@cs.huji.ac.il <http://mc/compose?to=linux...@cs.huji.ac.il> >> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il >> >> > > -----Inline Attachment Follows----- > > > _______________________________________________ > Linux-il mailing list > Linux-il@cs.huji.ac.il <http://mc/compose?to=linux...@cs.huji.ac.il> > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > > > > _______________________________________________ > Linux-il mailing list > Linux-il@cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > >
_______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il