1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-12-24 18:53:54 +02:00
eda-tools/boom/count.pl

20 lines
287 B
Perl
Raw Normal View History

#!/usr/bin/perl
$tot = 0;
while (<>) {
next unless /\bT=(.+?)\b/;
$tot++;
$c = $1;
$cat{$c}++;
/^\s*(\S+)\s/;
$man{$c}{$1}++;
}
print "Total: $tot\n";
for $c (sort keys %cat) {
print " $c: $cat{$c}\n";
for $m (sort keys %{ $man{$c} }) {
print "\t$m: $man{$c}{$m}\n";
}
}