From 832935452b272802a9b480aee2ea7013056993d2 Mon Sep 17 00:00:00 2001 From: thialme-guest Date: Mon, 30 Mar 2009 21:41:47 +0000 Subject: [PATCH] Fixed both analyze.sh and top50.pl scripts. [analyze.sh] * Made the entries in the msd-sorted.txt file sorted. * Used msd.txt file as input for top50.pl. The current pattern in top50.pl does not match data from the msd-sorted.txt file. * Allowed the top1000 report to report the first 1000 ranks by passing *-n 1000* to top50.pl. Set to 50 by default. [top50.pl] * Fixed the error message when a line from stdin does not match the pattern. git-svn-id: svn://svn.debian.org/pgp-tools/trunk@422 b513b33f-fedd-0310-b452-c3deb5f4c849 --- keyanalyze/analyze.sh | 6 +++--- keyanalyze/scripts/top50.pl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyanalyze/analyze.sh b/keyanalyze/analyze.sh index 65bc577..ae1d90d 100755 --- a/keyanalyze/analyze.sh +++ b/keyanalyze/analyze.sh @@ -13,10 +13,10 @@ keyanalyze # html beautification and reports and such # comment this out if you don't want all the stuff in the report # at http://dtype.org/keyanalyze/ -cat output/msd.txt | sort -n -k 3 | nl -s ' ' > output/msd-sorted.txt -head -n 50 output/msd-sorted.txt | scripts/top50.pl > output/top50table.html +cat output/msd.txt | sort -k 3 | nl -s ' ' > output/msd-sorted.txt +cat output/msd.txt | scripts/top50.pl > output/top50table.html cat scripts/report_top.php output/top50table.html \ scripts/report_bottom.php > output/report.php -head -n 1000 output/msd-sorted.txt | scripts/top50.pl > output/top1000table.html +cat output/msd.txt | scripts/top50.pl -n 1000 > output/top1000table.html cat scripts/1000_top.php output/top1000table.html \ scripts/1000_bottom.php > output/report_1000.php diff --git a/keyanalyze/scripts/top50.pl b/keyanalyze/scripts/top50.pl index 5a30de6..da51ebf 100755 --- a/keyanalyze/scripts/top50.pl +++ b/keyanalyze/scripts/top50.pl @@ -34,7 +34,7 @@ if (open F, $comments) { my %msd; while (my $line = <>) { - $line =~ /^\w+\s+(\w+)\s+([\d\.]+)/ or die "cannot parse line $.: $_"; + $line =~ /^\w+\s+(\w+)\s+([\d\.]+)/ or die "cannot parse line $.: $line"; $msd{$1} = $2; } -- 2.30.2