Bash script to run sim many times


In [ ]:
%%bash

g++ -std=c++11 main.cpp functions.cpp -o run_sim.exe

# Delete any existing data fram
if [ -f dataframe.txt ]; then
    rm dataframe.txt
    echo "Deleted old data frame"
fi

echo "Generating new data frame..."
for i in {11..3..-1}
do
echo $i
for j in {1..10}
do
./run_sim.exe $i >> dataframe.txt
done
done

echo "Done."

In [ ]: