I am trying write a script which connects and runs command on /dev/ttyUSB0 after that gets the output.
screen -d -m 'SCREEN COMMAND' -L /dev/ttyUSB0
But this does not create an output file. How can I solve this issue? Any ideas?
For this purpose, another tool was developed -
It is powerful tool, but it is also another scripting language to learn and can be a bit tedious. If you are familiar with Perl, Perl Expect module can save you a lot of effort (there are also expect modules for other scripting languages like Python).
One more note. In your case, it seems that