title: execute program in loop bash script
body: <p>I would like to run the executable run_ex multiple times varying some parameters (text file), but I am new to the bash scripts and I can't figure out how to do that...</p>
  
  <pre><code>#! /bin/bash
  for ((hour=1; hour &lt;= 9 ; hour++))
  do
     printf "run executable for hour %d \n" $hour
  
     parameter1 ="/path1/file1_$hour.txt" 
  
     parameter2 = "/path2/file2_$hour.txt" 
  
     ./run_ex $parameter1 $parameter2
  
  done
  </code></pre>
  
  <p>Thanks</p>