#!/bin/bash resDir=$HOME/bin outfile=$resDir/DATA tmpfile=$resDir/tmp timer="/usr/bin/time -f %U -o $tmpfile" #algos="tool1 tool2 tool3 v1tool v2tool v3tool v4tool v5tool" algos="tool1 tool2 tool3 v4tool v5tool" #algos="v1tool" models="2 4 5" sizes="1 2 4 8 16" echo "Algorithm,Model,Run,Cost,Attainment,Time" > $outfile for model in $models;do for size in $sizes;do gm=$model"_"$size $resDir/$gm/baseline | gawk -F, -v OFS="," -v GM=$gm 'NR==2{print "baseline",GM,$(NF-1),$NF}' >> $outfile for algo in $algos; do for run in `seq 100 `;do $timer $resDir/$gm/$algo | gawk -F, -v RUN=$run -v ALGO=$algo -v GM=$gm -v MV=$maxv '!/^m/&&NF>3{printf "%s,%s,%s,%s,%s,%s",ALGO,GM,RUN,$(NF-1),$NF,MV}' >> $outfile cat $tmpfile >> $outfile done done done done