If you just want to make it short:
perl -ane'$t{$F[0]}+=$F[1];$c{$F[0]}++}{printf"$_ %.3f\n",$t{$_}/$c{$_ +}for+sort+keys%t'
In reply to Re^2: HOW to calculate the column data
by jwkrahn
in thread HOW to calculate the column data
by xbmy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |