#!/bin/bash

for I in {1..100}; do
    ./struct_calls
done | awk '
    BEGIN {sum1 = 0; sum2 = 0; count = 0;}
    {sum1 += $5; sum2 += $11; count += 1;
     print $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11;}
    END {print "Averages: " sum1/count ", " sum2/count}
' | tee struct_calls.log

