bash: version compare function