#!/bin/bash #get functions arguments number_architecture=$1 outputfile=$2 echo "=======================>>Extraction of timing data <<=====================" for ((i=1;i<=$number_architecture;i++)) do file="archi"$i"_result.txt" value=$(awk -F, '{if($1=="reduce_execution_time") val=$2}END{print val}' $file); sed -i -e '/^reduce_execution_time/ s/.*/&,'"$value"'/' $outputfile value=$(awk -F, '{if($1=="precedence_constraint_change") val=$2}END{print val}' $file); sed -i -e '/^precedence_constraint_change/ s/.*/&,'"$value"'/' $outputfile value=$(awk -F, '{if($1=="processor_speed_increase") val=$2}END{print val}' $file); sed -i -e '/^processor_speed_increase/ s/.*/&,'"$value"'/' $outputfile value=$(awk -F, '{if($1=="period_change") val=$2}END{print val}' $file); sed -i -e '/^period_change/ s/.*/&,'"$value"'/' $outputfile value=$(awk -F, '{if($1=="priority_change") val=$2}END{print val}' $file); sed -i -e '/^priority_change/ s/.*/&,'"$value"'/' $outputfile value=$(awk -F, '{if($1=="processor_number_increase") val=$2}END{print val}' $file); sed -i -e '/^processor_number_increase/ s/.*/&,'"$value"'/' $outputfile value=$(awk -F, '{if($1=="delay_thread_execution") val=$2}END{print val}' $file); sed -i -e '/^delay_thread_execution/ s/.*/&,'"$value"'/' $outputfile value=$(awk -F, '{if($1=="reduce_preemption_delay") val=$2}END{print val}' $file); sed -i -e '/^reduce_preemption_delay/ s/.*/&,'"$value"'/' $outputfile value=$(awk -F, '{if($1=="deadline_increase") val=$2}END{print val}' $file); sed -i -e '/^deadline_increase/ s/.*/&,'"$value"'/' $outputfile value=$(awk -F, '{if($1=="reduce_self_suspension") val=$2}END{print val}' $file); sed -i -e '/^reduce_self_suspension/ s/.*/&,'"$value"'/' $outputfile sed -i -e 's/ \r//g' $outputfile done