See this link for a detailed description of bash's built-in integer arithmetic:
And see here for floating point operations:
Incidentally, when doing integer comparisons in bash or ksh, it's generally recommended to use the ((..))
arithmetic field, rather than the default test brackets.
if (( slope > 80 )); then
Assuming again that "slope
" contains an integer value of course.
For string and filename comparisons, it's also usually recommended to use the more advanced [[
keyword over the old [