echo ${1} | sed "s!.*-\([0-9].*\)!\1!g"
}
+# Extracting the version number from a complete package name using underscore as separator.
+# Arg. #1: Complete package name with version (ex: ecryptfs-utils_103 will output 103)
+get_pkg_ver_underscore()
+{
+ # Checking for correct number of arguments
+ if [ $# -ne 1 ]; then
+ echo "${FUNCNAME}(), wrong number of arguments: ${*}"
+ return 1
+ fi
+
+ echo ${1} | sed "s!.*_\([0-9].*\)!\1!g"
+}
+
# Extracting the first digit version number from a complete package name.
# Arg. #1: Complete package name with version (ex: gcc-3.4.4 will output 3)
get_pkg_ver1()