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
GNU sort has an option for it:
printf '2.4.5\n2.8\n2.4.5.1\n' | sort -V
gives:
2.4.5 2.4.5.1 2.8