Operations in the shell are normally done between brackets: (( <variable or value> = <variable or value> <operator> <variable or value> )) For complex operations bc is used, like so: <variable or value> =$(echo "scale=<number after floating point><operator>(<operation>)" | bc) For example

Read more of this post