source: trunk/termtv/utils/ttydump.pl@ 19541

Last change on this file since 19541 was 17407, checked in by tbretz, 11 years ago
First version.
  • Property svn:executable set to *
File size: 396 bytes
Line 
1#!/usr/bin/perl
2use warnings;
3use strict;
4
5open my $lf, "<", $ARGV[0] or die "Couldn't open $ARGV[0] for reading: $!";
6
7while ( read $lf, my($buf), 12 ) {
8 my ($time, $ftime, $len) = unpack "VVV", $buf;
9 read $lf, my($contents), $len;
10 $contents =~ s/((?!\\)[^[:print:] \n])/"\\x{".unpack("H*", $1)."}"/egs;
11 $time += $ftime / 1_000_000;
12 printf "%.4f: %s\n", $time, $contents;
13}
14
Note: See TracBrowser for help on using the repository browser.