Is there any way to compare such strings on bash, e.g.: 2.4.5 and 2.8 and 2.4.5.1?
2.4.5
2.8
2.4.5.1
if it's just about to know whether one version is lower than another I came up checking whether sort --version-sort changes the order of my version strings:
sort --version-sort
string="$1 $2" [ "$string" == "$(sort --version-sort <<< "$string")" ]