#!/usr/local/bin/perl
binmode STDIN;
$line = '';
while (($n = read STDIN, $data, 1) != 0) {
$line .= $data;
if ($data eq "\n") {
$line = '';
} elsif ($data eq "\r") {
if ($line =~ m/^Pos.*fps\s*Trem.*\r$/) {
print $line;
$line = '';
}
}
} 
