- or download this
LC_ALL=C sort -k1 big{1,2,3}.txt | awk -f tally-count.awk | LC_ALL=C s
+ort -k2nr >out.txt
...
LC_ALL=C parsort -k1 big{1,2,3}.txt | ./tally-count | LC_ALL=C parsort
+ -k2nr >out.txt
real time: 3.615 seconds
- or download this
LC_ALL=C parsort -k1 big{1,2,3}.txt | awk -f tally-count.awk | LC_ALL=
+C parsort -k2nr >out.txt
...
LC_ALL=C parsort -k1 big{1,2,3}.txt | ./tally-count | LC_ALL=C parsort
+ -k2nr >out.txt
real time: 2.398 seconds
- or download this
cat big{1,2,3}.txt | ./linux-q -tT "select c1, sum(c2) from - group by
+ c1 order by sum(c2) desc, c1" >out.txt
...
./linux-q -tT "select c1, sum(c2) from big[1-3].txt group by c1 order
+by sum(c2) desc, c1" >out.txt
real time: 89.539 seconds
- or download this
# Tally adjacent count fields of duplicate key names.
...
END {
print key, sum
}
- or download this
// -------------------------------------------------------------------
+---------
// tally-count.cpp
...
return 0;
}