#! /bin/bash # ./effort $Filename $Path $Learner $TestFile $TrainFile $TargetEMs $LogFile # Arguments Filename=$1 Path=$2 Learner=$3 TestFile=$4 TrainFile=$5 TargetEMs=$6 LogFile=$7 gawk -f simplelc.awk Pass=1 TargetEMs=$TargetEMs $TrainFile Pass=2 TargetEMs=$TargetEMs $TestFile > $LogFile if [ $Learner == "LC" ] ; then Stats=$(./calc $LogFile) echo $Stats","$TargetEMs fi if [ $Learner == "simpleLC" ] ; then Results=$(cat $LogFile) echo $Results","$TargetEMs fi if [ $Learner == "BasicLC" ] ; then gawk 'BEGIN{FS=",";OFS=",";} NR=1{re=($1-$2)/$2;mre=re<0?-1*re:re;print $1,$2,100*mre}' $LogFile fi