cat command with timeout

cat command with timeout

Valery Reznic valery_reznic at yahoo.com
Thu Jun 10 10:36:41 IDT 2010


cat /dev/your_serial_port > some_file &sleep Xkill $!
Valery
--- On Thu, 6/10/10, Ori Idan <ori at helicontech.co.il> wrote:

From: Ori Idan <ori at helicontech.co.il>
Subject: cat command with timeout
To: "IGLU Mailing list" <linux-il at cs.huji.ac.il>
Date: Thursday, June 10, 2010, 10:13 AM

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
 




-----Inline Attachment Follows-----

_______________________________________________
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/20100610/01a8459d/attachment.html>


More information about the Linux-il mailing list