cd ../benchmarks-compilados

for N in {1..8}; do
  for COMP in [!d]*; do
    printf "%-45s" "${COMP}" >> ../"resultados-${N}.txt"
    cd "${COMP}"
    for BMK in */; do
      cd "${BMK}"
      usBEFORE=`date +%s%6N`
      ./run &> /dev/null
      usAFTER=`date +%s%6N`
      EXECTIME=`bc <<< "scale=6; (${usAFTER} - ${usBEFORE}) / 1000000"`
      printf ",%12f" ${EXECTIME} >> ../../../"resultados-${N}.txt"
      cd ..
    done
    cd ..
    echo `date` $N $COMP
    printf "\n" >> ../"resultados-${N}.txt"
  done
done
