From: Steinar H. Gunderson Date: Mon, 28 May 2012 13:15:12 +0000 (+0200) Subject: Add a small script to deal with the fact that we might not have the entire receiver... X-Git-Url: https://git.sesse.net/?p=bursty;a=commitdiff_plain;h=86e73389e445cba93e603e77ca3a4f78324a4c5e Add a small script to deal with the fact that we might not have the entire receiver log yet. --- 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, $_; + } +}