diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index f87b55a0e..94024ff79 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -118,7 +118,7 @@ for ((index="0"; index <= ${#currentopt[@]}; index+3)); do done ### Check if user command exists or run the command -if [ ! " ${optcommands[@]} " =~ "${getopt}" ]; then +if [[ ! "${optcommands[@]}" =~ "${getopt}" ]]; then echo -e "${red}Unknown command${default}: $0 ${getopt}" exitcode=2 echo "Usage: $0 [option]" @@ -130,7 +130,7 @@ if [ ! " ${optcommands[@]} " =~ "${getopt}" ]; then index="0" { for ((index="0"; index <= ${#currentopt[@]}; index++)); do - echo -e "${blue}$(echo "${currentopt[index]}" | awk -F ';' '{ print $2 }')\t${default}$(echo "${currentopt[index]}" | awk -F ';' '{ print $1 }') |"${currentopt[index+2]}" + echo -e "${blue}$(echo "${currentopt[index]}" | awk -F ';' '{ print $2 }')\t${default}$(echo "${currentopt[index]}" | awk -F ';' '{ print $1 }') |${currentopt[index+2]}" done } | column -s $'\t' -t else