TheCottonSilk
TheCottonSilk

Reputation: 8812

Redirect content of /dev/ttySDIO0 to a file

Is there any way to redirect the content of a tty device (/dev/ttySDIO0) file so that its content can be managed using a file IO operations. I don't prefer to use 'cat' here.

Thank you.

Upvotes: 1

Views: 1712

Answers (1)

shodanex
shodanex

Reputation: 15406

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.

Upvotes: 2

Related Questions