I'm trying to get BASH to return a result where if a particular software version contains two decimals values, that it's greater than one?
Example, I would like the result to confirm that 1.12 is greater than 1.8:
1.12 > 1.8
Since .8 > .1#, I'm not getting the results I want. I've tried various ways such as:
version='1.11'
if [[ $version} > 1.8 ]]'; then
...
I've also tried to see if I could get 'bc' calculator to return a different result, but unfortunately it also does not provide the result that I'm after:
echo 1.11'>'1.8 |bc
0
echo 1.9'>'1.8 |bc
1
Any thoughts on how this can be achieved?