Bash only supports integer arithmetic. Floating point is not possible. You could use string comparison, of course, but that would give a wrong answer for values > 9, and probably in other cases.
– jpaughFeb 25 '16 at 20:55
...on a different topic, `[ ... ]` is *not* part of `if` syntax. You could run it as its own command and use `$?` to check the result, for instance. `if` allows *any* command to be used (and thus checked), not only `[`.
– Charles DuffyFeb 25 '16 at 20:57