docs/master

view scripts/avg-switches @ 235:e58400695ae2

Added tag final version for changeset 348b92755bef
author markus schnalke <meillo@marmaro.de>
date Mon, 16 Jul 2012 11:25:04 +0200
parents
children
line source
1 #!/bin/sh
2 #
3 # helper script to calculate the average number of switches
5 awk '
6 {
7 n1+=$2; n2+=$3; m1+=$4; m2+=$5
8 }
9 END {
10 printf("avg\t%d\t%d\t%d\t%d\n", n1/NR-2, n2/NR, m1/NR-2, m2/NR)
11 printf("sum\t%d\t%d\t%d\t%d\n",
12 n1-(NR*2), n2-(NR*2), m1-(NR*2), m2-(NR*2))
13 }' "$@"