perl -le'$n=1000000;for(1..$n){$x=rand;$h{$x}++}@b=sort keys %h;$,="\t";print $h{$b[$_]},$b[$_] for 1..$n;print STDERR scalar @b' > randoms.txt