I'm trying to compare version numbers. For example, if 10.9 is less than 10.11.
Can someone please explain why this doesn't print 'yes'?
if [[ "9" < "10" ]]; then echo yes; fi
What do I need to do to make this work correctly as clearly, 9 should be less than 10?
In addition, if I have "10.9" in a variable $VERSION, how would this be compared with "10.11", as this also fails to print 'yes'
if [[ $VERSION < "10.11" ]]; then echo yes; fi