--wow--
Has to have a boolean value or no value at all.
--wow-- hey
“wow” will be equal to “true” and “hey” will be placed in the “${leftover[@]}” array and set as “$1” arg
--wow-- false
“wow” will be equal to false because false is a boolean
./moti-server execute_on_remote "cd sdffsdf" false --wow-
because –wow- ends with “-“, “wow” must have a value. “wow” will be equal to an empty value.
./moti-server execute_on_remote "cd sdffsdf" false --wow
in this instance “wow” will be equal to “true”. when a args is left with no value at the end of a arg list or having another arg right after. it will always be set to true
./moti-server execute_on_remote --wow --hey "cd sdffsdf" false
wow is be equal to true, and hey will be equal “cd sdffsdf”
./moti-server execute_on_remote --wow --hey-- "cd sdffsdf" false
in this case “wow” is still set to “true” and “hey” is set to “true” and “cd sdffsdf” is set as “$1” and “false” as “$2”
extract.w "$@" && set -- "${leftover[@]}";
${leftover[@]} must in quotes or else spaces will be looked at as a separator
this will be looked at as two args
extract.w "$@" && set -- "${lo[@]}";
${lo[@]} can also be used