I'm trying to make a bash script to execute a C++
code multiple times and insert the output on a file, but it execute a single time producing one file with the expected output.
I tried adding a sleep
command but does not worked.
#!/bin/bash
thrd=2
comm="./""Segmentation $thrd"
for i in $(seq 1 30)
do
echo "${i}"
exec $comm > outputs/file${i}.txt
sleep 1s
done