awk '{x[substr($0,9)]++;y[substr($0,9)]=$1}END{ for(i in x) printf "%s\nThis Error was reproduced %d times\n",y[i]i,x[i] }' logfile