Make use of the new test builtin [[ instead of the old [.
Check the partition size variables with regular expressions.