]> git.sesse.net Git - remoteglot/blob - www/text.pl
Add the historic text.pl, so we can delete it right afterwards.
[remoteglot] / www / text.pl
1 #! /usr/bin/perl
2 use CGI;
3 print CGI->header(-type=>'text/plain', -refresh=>'5; http://analysis.sesse.net/text.pl', -expires=>'+5s');
4 # print CGI->header(-type=>'text/plain');
5 open(my $fh, "tail -100 /home/remoteglot/log.txt |");
6 my @lines = ();
7 while (<$fh>) {
8         s/.*H.*2J.*Analysis/Analysis/;
9         if (/^Analysis/) { @lines = (); }
10         push @lines, $_;
11 }
12 print join('', @lines);
13 #system("tail -100 /home/remoteglot/log.txt | grep -A 8 Analysis | sed 's/^.*Analysis/Analysis/'");
14 if (-r "/srv/analysis.sesse.net/complete_analysis.txt") {
15 #       system("cat /srv/analysis.sesse.net/complete_analysis.txt");
16 }