From edf5b787a941699620d40e79a291cfb8446ab4bf Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 21 Feb 2017 02:36:08 +0100 Subject: [PATCH] fix for full commands to work --- lgsm/functions/core_getopt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]}