[lug] Question on screen command

Landon Cox landon at 360vl.com
Fri Sep 25 11:54:24 MDT 2009


On Sep 25, 2009, at 11:17 AM, John Hernandez wrote:

> On Fri, Sep 25, 2009 at 11:04 AM, Landon Cox <landon at 360vl.com> wrote:
>>
>> Do you know a way to coerce screen into flushing at the end of every
>> line it receives, or optionally after ever character.  I realize it
>> can slow things down to flush output that much, but speed is not an
>> issue in this case...getting all the data is.
>
> Instead of using screen's built-in functionality, you might consider
> invoking 'script -f' from each individual shell

Beautiful, John.  That works perfectly for what I need....talking to  
and logging USB to serial drivers.  Also, on a Mac the script command  
is a little different but has the same functionality.

Here's an example Mac command talking to a GPS at 38400 baud and  
logging data with a flush on every character write:

script -t 0 gps.nmea.txt screen /dev/tty.usbserial-A6007swr 38400

I very much appreciate the pointer.  Helped a lot,

Landon



More information about the LUG mailing list