title: how to sum double numbers in bash
body: <p>I want to do a sum in bash, but numbers are with dot and not with comma (Ex: 1.2333)</p>
  
  <p>I tried to do this script </p>
  
  <pre><code>#!/bin/bash 
  somma=0 
  n=0 
  tempo=0
  val=0
  while read -r val1 val2 
  do 
    somma=$((somma += val1))
    tempo=$(echo $tempo += $val2 | bc) 
    n=$((n +=+1)) 
  done &lt; "ret.txt" 
  echo $tempo
  </code></pre>
  
  <p>but I got this error:</p>
  
  <pre><code> (standard_in) 1: syntax error
  </code></pre>