title: Bash: Floating point calculations in bash script
body: <p>I am using the following script to read some numbers and calculate their average. However, it seems that floating point calculations cannot be performed like this.</p>
  <pre><code>hours=0
  #echo &quot;\n&quot; &gt;&gt; user-list.txt
  while IFS=, read -r col1 col2 col3 col4 col5 col6 col7 || [[ -n $col1 ]]
  do
      ((hours = hours + col5))
      #echo &quot;$col1, $col2&quot;
  done &lt; &lt;(tail -n+2 user-list.txt)
  
  ((hours = hours/10))
  echo &quot;$hours&quot; &gt; wednesday.txt
  </code></pre>
  <p>How can I perform floating point calculations in this script?</p>
  <p>Below is a sample of the input file:</p>
  <pre><code>Computer ID,User ID,M,T,W,T,F
  Computer1,User3,5,7,3,5,2
  Computer2,User5,8,8,8,8,8
  Computer3,User4,0,8,0,8,4
  Computer4,User1,5,4,5,5,8
  </code></pre>
  <p>TIA</p>