diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 914ab0790..52f72dfaa 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -141,7 +141,7 @@ else index="0" for ((index="0"; index < ${#currentopt[@]}; index+=3)); do currcmdamount="$(echo "${currentopt[index]}"| awk -F ';' '{ print NF }')" - for ((currcmdindex=1; currcmdindex < ${currcmdamount}; currcmdindex++)); do + for ((currcmdindex=1; currcmdindex <= ${currcmdamount}; currcmdindex++)); do if [ "$(echo "${currentopt[index]}"| awk -F ';' -v x=${currcmdindex} '{ print $x }')" == "${getopt}" ]; then # Run command ${currentopt[index+1]}