diff options
Diffstat (limited to 'avg')
-rwxr-xr-x | avg | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -0,0 +1,15 @@ +#!/bin/sh + +# avg -- print averages for multiple typ result files + +awk ' + { + v[FNR] += $1 + $1 = "" + sub(/^ /, "", $0) + t[FNR] = $0 + } + END { + for (i = 1; i<=5; i++) + printf("%.4f\t%s\n", v[i] / (ARGC-1), t[i]) + }' "$@" |