Answers for "bash calculate sum"

0

bash calculate sum

#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