From e97fca0ab586e42af8be9bd2255cc67d89254682 Mon Sep 17 00:00:00 2001 From: labbots Date: Mon, 8 Jun 2020 14:08:22 +0100 Subject: [PATCH] updated variable.sh --- README.md | 2 +- src/variable.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5355350..5355911 100644 --- a/README.md +++ b/README.md @@ -1742,7 +1742,7 @@ Functions for handling variables. ### variable::is_array() Check if given variable is array. -Note: Pass the variable name instead of value of the variable. +Pass the variable name instead of value of the variable. #### Example diff --git a/src/variable.sh b/src/variable.sh index 985c8a5..230553f 100644 --- a/src/variable.sh +++ b/src/variable.sh @@ -4,7 +4,7 @@ # @brief Functions for handling variables. # @description Check if given variable is array. -# Note: Pass the variable name instead of value of the variable. +# Pass the variable name instead of value of the variable. # # @example # arr=("a" "b" "c") @@ -37,7 +37,7 @@ variable::is_array() { # @exitcode 0 If input is number. # @exitcode 1 If input is not a number. variable::is_numeric() { - re='^[0-9]+$' + declare re='^[0-9]+$' if [[ ${1} =~ $re ]]; then return 0 fi