Simple function to (properly) compare version strings in bash
You can not do alphabetic comparison:
1.23.4 < 1.3.4 => FALSE
version_cmp 1.2.3 4.5.6
version_cmp 1.5.6.7 1.5.6
if [[ $(version_cmp $rsync_version 2.5.7) -lt 0 ]]; then
ERROR "Invalid version of rsync. 2.5.7 or more required"
fi
(Just to keep Google happy: By Toni Homedes i Saun)