title: Shell scripting, finding average of loop results
body: <p>I made a loop to find the results of calculating each number from (1 to 10 mod 5) + 2  </p>
  
  <pre><code>for (( i = 0; i &lt;= 10; i++))
  do 
      calculate=$(( i % 5 + 2 ))
      echo "($i % 5) + 2 = " $calculate
  done
  average=$(($calculate/10))
  echo $average` 
  </code></pre>
  
  <p>My problem is fixing my code so that I can take all the results of the loop and find the average of them
  Its returning back 0 for the average</p>