#!/bin/bash files=`ls ../c45/changes/Data/arffData/mdp/*.arff`; for file in $files do stem=`basename $file .arff`; true=`grep $stem howToUseNewScripts | gawk 'BEGIN{FS=OFS=" ";} {print $4;}'`; trues=`./getClassCount class=$true $file`; locAtt=`grep $stem howToUseNewScripts | gawk 'BEGIN{FS=OFS=" ";} {print $2;}'`; totalLoc=`./totalLoc locAtt=$locAtt $file`; gawk ' BEGIN{ FS=OFS=","; data=0; } data==1{ if ( $NF ~ true ) print $locAtt; } /@data/{ data=1; } ' locAtt=$locAtt true=$true $file | sort -g -k 1 | gawk ' BEGIN{ FS=OFS=" "; pd=0; locs=0; } { locs += $1; pd++; print locs/totalLoc*100 " " pd/trues*100; } ' totalLoc=$totalLoc trues=$trues > baseline_$stem.effort; done