#!/bin/bash start=$(date +%s.%N) nbloops=10 for i in `seq 1 $nbloops`; do ./bin/surfaces-unies -c -i ./img/asterix.ppm done end=$(date +%s.%N) runtime=$(python -c "print((${end} - ${start}) / ${nbloops})") echo "Average runtime was $runtime"