diff --git a/func/shared.func b/func/shared.func index e42a75c4f..3f109d214 100644 --- a/func/shared.func +++ b/func/shared.func @@ -99,7 +99,7 @@ format_validation() { # Defining exlude mask special_chars=$(echo "$val" | \ - grep -c "[!|@|#|$|^|&|*|(|)|-|+|=|{|}|:|_|,|.|<|>|?|/|\|\"|'|;|%]" ) + grep -c "[!|@|#|$|^|&|*|(|)|-|+|=|{|}|:|_|,|.|<|>|?|/|\|\"|'|;|%| ]" ) if [[ 0 -ne "$special_chars" ]]; then echo "Error: $var out of range" @@ -194,7 +194,7 @@ format_validation() { # Defining exlude mask special_chars=$(echo "$val" | \ - grep -c "[!|@|#|$|^|&|*|(|)|+|=|{|}|:| |,|<|>|?|/|\|\"|'|;|%]" ) + grep -c "[!|@|#|$|^|&|*|(|)|+|=|{|}|:| |,|<|>|?|/|\|\"|'|;|%| ]" ) # Checking result if [[ 0 -ne "$special_chars" ]]; then @@ -210,7 +210,7 @@ format_validation() { # Defining exlude mask special_chars=$(echo "$val" | \ - grep -c "[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%]" ) + grep -c "[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%| ]" ) needed_chars=$(echo "$val" | cut -s -f 2 -d '.') # Checking result @@ -227,7 +227,7 @@ format_validation() { # Defining exlude mask special_chars=$(echo "$val" | \ - grep -c "[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|.|<|>|?|/|\|\"|'|;|%]" ) + grep -c "[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|.|<|>|?|/|\|\"|'|;|%| ]" ) # Checking result if [[ 0 -ne "$special_chars" ]] || [ 17 -le ${#val} ]; then