#!/bin/bash if [ $# -ne 6 ]; then echo "Usage: `basename $0` " echo " max_num_threads: The highest value used for num_threads in the results" echo " max_sleep_type: The highest value used for sleep_type in the results" exit -1 fi # Run through the requested number of SLEEP_TYPE values for i in $(seq 0 $6) do # Remove any existing results file rm -f "results_$i.txt" # Run through the requested number of threads for j in $(seq 1 $5) do # Print which settings are about to be run echo "sleep_type: $i num_threads: $j" # Run the test and save it to the results file ./test_sleep $1 $2 $3 $4 $j $i >> "results_$i.txt" done done