From: Steinar H. Gunderson Date: Mon, 24 Nov 2014 20:24:29 +0000 (+0100) Subject: Add the historic text.pl, so we can delete it right afterwards. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=79b90a573602869d5d3fbd384605b9d10cd1eb23;ds=sidebyside Add the historic text.pl, so we can delete it right afterwards. --- diff --git a/www/text.pl b/www/text.pl new file mode 100755 index 0000000..9319e56 --- /dev/null +++ b/www/text.pl @@ -0,0 +1,16 @@ +#! /usr/bin/perl +use CGI; +print CGI->header(-type=>'text/plain', -refresh=>'5; http://analysis.sesse.net/text.pl', -expires=>'+5s'); +# print CGI->header(-type=>'text/plain'); +open(my $fh, "tail -100 /home/remoteglot/log.txt |"); +my @lines = (); +while (<$fh>) { + s/.*H.*2J.*Analysis/Analysis/; + if (/^Analysis/) { @lines = (); } + push @lines, $_; +} +print join('', @lines); +#system("tail -100 /home/remoteglot/log.txt | grep -A 8 Analysis | sed 's/^.*Analysis/Analysis/'"); +if (-r "/srv/analysis.sesse.net/complete_analysis.txt") { +# system("cat /srv/analysis.sesse.net/complete_analysis.txt"); +}