I am trying to call an executable with two arguments within a nested for loop (I'm also writing in bash scripting). I thought I was doing it correctly, but all my values show up in the text file as 0. i.e. tilt 0 angle 0 even though the values are obviously not. My code is as such:
for (( i=0; i <=3; i++)); do
for (( j=0; j <= 3; j++ )); do
./solar_sim 'i' 'j' >> solarResults.txt
echo -n "$i"
done
echo " "
done
`
The solar_sim was provided to us and output a line like this, which I write to a file:
10000 hours, angle: 0.00 degrees, temperature: 0.00 degrees C, total power: 119871.00 Watts
Am I doing something wrong in the calling of solar_sim? I also tried using $i and $j