#!/bin/bash run() { ./tool -c $1 -a $2 } runs() { run $1 $2 | cat - | gawk -F, 'NR==1 {next} {print C "," A ","int($(NF-1)) "," int($NF) "," int(100*$(NF-1)/C) "," int(100*$NF/A)}' A=$2 C=$1 } (echo "#C,A,C1,A1, C1/C, A1/A" for c in 50000 100000 150000 200000 250000 300000 350000 400000 do for a in 50 100 150 200 250 300 350 400 do runs $c $a done done ) | malign | sort -t, -n +5 -r +4