From 86e73389e445cba93e603e77ca3a4f78324a4c5e Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 28 May 2012 15:15:12 +0200 Subject: [PATCH] Add a small script to deal with the fact that we might not have the entire receiver log yet. --- truncate-end.pl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 truncate-end.pl diff --git a/truncate-end.pl b/truncate-end.pl new file mode 100755 index 0000000..4975426 --- /dev/null +++ b/truncate-end.pl @@ -0,0 +1,17 @@ +#! /usr/bin/perl + +use strict; +use warnings; + +my @buffer = (); + +while (<>) { + chomp; + if (/\d /) { + print join("\n", @buffer); + @buffer = (); + print "$_\n"; + } else { + push @buffer, $_; + } +} -- 2.39.2