bash addition float code example
Example 1: bash sum float numbers
bc <<< '0.3333+0.6666' # Get sum of floats in bash
0.99
Example 2: bash adding floats
#Just use following structure for summing up varibles:
sum=$((var1 + var2))
#For float numbers use next instruction:
sum=$(bc <<< $var1'+'$var2)
Example 3: bash sum floating point numbers
bc <<< '0.3333+0.6666' # Get sum of floating points in bash
0.99