#!/bin/sh
./miniruby -v

ls bug.*.txt|sed -e 's/[0-9]\+/*/'|sort|uniq -c | while read l; do
  echo "$l"
  files=$(echo "$l"|sed -e 's/.* \([^ ]*\)$/\1/')
  grep -h "^#0 " $files|
    sed -e 's/^#0 .* in \([^ ]*\) ([^)]*) at \(.*\)/#0  \1 at \2/'|
    sort|
    uniq -c|
    sort -n|
    tac
done
