From: thialme-guest Date: Mon, 30 Mar 2009 21:41:47 +0000 (+0000) Subject: Fixed both analyze.sh and top50.pl scripts. X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=832935452b272802a9b480aee2ea7013056993d2;p=pgp-tools.git 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 --- 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; }