Answers for "bash adding floats"

0

bash sum float numbers

bc <<< '0.3333+0.6666' # Get sum of floats in bash
0.99
Posted by: Guest on November-27-2020
0

bash sum floating point numbers

bc <<< '0.3333+0.6666' # Get sum of floating points in bash
0.99
Posted by: Guest on November-27-2020
0

bash adding floats

#Just use following structure for summing up varibles:
sum=$((var1 + var2))
#For float numbers use next instruction:
sum=$(bc <<< $var1'+'$var2)
Posted by: Guest on December-17-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language