Is there any way to redirect the content of a tty device (/dev/ttySDIO0) file so that its content can be manage开发者_运维问答d using a file IO operations. I don't prefer to use 'cat' here.
Thank you.
You can use socat which can connect to a tty on one side with a lot of command line options, and the other end can be pretty much anything that accepts read/write or send/receive call. From the above link :
Socat is a command line based utility that establishes two bidirectional byte streams and transfers data between them. Because the streams can be constructed from a large set of different types of data sinks and sources (see address types), and because lots of address options may be applied to the streams, socat can be used for many different purposes.
精彩评论