From af25e84b7ddde13f201eb931d70137a82ce0d3b9 Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 4 Dec 2023 17:05:54 +0100 Subject: [PATCH] variable rename --- gaboshlib/g_num_is_lower.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gaboshlib/g_num_is_lower.sh b/gaboshlib/g_num_is_lower.sh index 46f3ed3..806478e 100644 --- a/gaboshlib/g_num_is_lower.sh +++ b/gaboshlib/g_num_is_lower.sh @@ -1,13 +1,13 @@ function g_num_is_lower_equal { local f_num=$1 - local f_checkhigher=$2 + local f_checklower=$2 # Check for integer (can be done with bash itself) - if [[ ${f_num} =~ ^[0-9]+$ ]] && [[ ${f_checkhigher} =~ ^[0-9]+$ ]] + if [[ ${f_num} =~ ^[0-9]+$ ]] && [[ ${f_checklower} =~ ^[0-9]+$ ]] then # Check which is the low (from) and the high (to) number - if [ "${f_num}" -le "${f_checkhigher}" ] + if [ "${f_num}" -le "${f_checklower}" ] then return 0 else @@ -16,9 +16,9 @@ function g_num_is_lower_equal { fi # Check for valid number - g_num_valid_number "$f_num" "$f_checkhigher" || return 1 + g_num_valid_number "$f_num" "$f_checklower" || return 1 - g_calc "${f_num} <= ${f_checkhigher}" + g_calc "${f_num} <= ${f_checklower}" if [ ${g_calc_result} -ne 0 ] then return 0 @@ -31,13 +31,13 @@ function g_num_is_lower_equal { function g_num_is_lower { local f_num=$1 - local f_checkhigher=$2 + local f_checklower=$2 # Check for integer (can be done with bash itself) - if [[ ${f_num} =~ ^[0-9]+$ ]] && [[ ${f_checkhigher} =~ ^[0-9]+$ ]] + if [[ ${f_num} =~ ^[0-9]+$ ]] && [[ ${f_checklower} =~ ^[0-9]+$ ]] then # Check which is the low (from) and the high (to) number - if [ "${f_num}" -lt "${f_checkhigher}" ] + if [ "${f_num}" -lt "${f_checklower}" ] then return 0 else @@ -46,9 +46,9 @@ function g_num_is_lower { fi # Check for valid number - g_num_valid_number "$f_num" "$f_checkhigher" || return 1 + g_num_valid_number "$f_num" "$f_checklower" || return 1 - g_calc "${f_num} < ${f_checkhigher}" + g_calc "${f_num} < ${f_checklower}" if [ ${g_calc_result} -ne 0 ] then return 0