Q: Why does bash use unintuitive operators for text and numeric conditional expressions? Something that has been bothering me for years - why does bash use unintuitive operators for text and numeric conditional expressions? Is there some historic or technical reason behind this, is it enforced by a standard that is followed (e.g. POSIX) or is it simply down to the preferred style of the language authors?
For example, when performing string comparisons in bash:
[[ "X" == "X" ]]
[[ "X" != "Y" ]]

we use operators that appear to have a background in logic or mathematics. However, when comparing numbers, we use operators that are not mathematical or logical:
[[ 2 -eq 2 ]]
[[ 2 -lt 3 ]]

Just to clarify - the answer I am looking for here is why was the language designed this way, i'm not asking about how comparisons work in bash (there are already plenty of questions and answers on this).

A: Actually in BASH you can use ((...)) and use all standard operators like:
((2==2))
((2<3))
((i>=5))

For more details check ARITHMETIC EVALUATION in man bash
