I'm trying to capture data from a Serial Port by opening 'screen' from the terminal. It works, I see the data coming but I can't figure out how to save it to a file.
I tried to redirect the output of screen by adding
> file.txt to the command line that opens screen, something like this:
screen /dev/tty.Airconsole-1 > file.txt
But it didn't work, it creates an empty file but I still see the data on the screen window.
Ideally I would like to redirect to both, I mean keep it in the window and at the same time feeding the file, probably by using the tee command.