Using Cygwin to save serial monitor data

I am not sure if this information has already been posted, but I found that I can save the output of the serial monitor by doing the following in cygwin:

//my arduino is attached to COM4, the below command is zero based hence the ttyS3
stty -F /dev/ttyS3 9600 crtscts clocal

//Then I can simply issue
cat /dev/ttyS3

The sketch I am using is:

int count = 0;
void setup()                    // run once, when the sketch starts
{
  Serial.begin(9600);           // set up Serial library at 9600 bps
}

void loop()                       // run over and over again
{
  Serial.print("temp: ");
  Serial.println(count);
  count++;
  delay (1000);
}

The source of my information is http://blog.thomnichols.org/2009/08/serial-console-monitoring-without-hyperterminal