Reputation: 181
I understand that in order to save a screen command you can do:
screen /dev/tty.usbserial-DA01G657 57600
and then Ctrl+a+H and it stores it.
I am looking for a way of storing the output into a file but having a time limit on the data.
for example:
I start reading from that port for 1 minute and record that data into a file. But JUST for that 1 minute.
It could be wither by time or by quantity of characters stored.
is this possible?
Upvotes: 0
Views: 475
Reputation: 312370
I probably wouldn't use screen
for this. If your goal is simply to record X
minutes of serial port data to a file, how about:
stty -F /dev/tty.usbserial-DA01G657 speed 57600
timeout 60 cat /dev/tty.usbserial-DA01G657 > output.txt
Upvotes: 1