Q:

bash sum float numbers

bc <<< '0.3333+0.6666' # Get sum of floats in bash
0.99
0
bc <<< '0.3333+0.6666' # Get sum of floating points in bash
0.99
0

New to Communities?

Join the community