summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9470793)
Reference: Argument mixes string and array. Use * or separate
argument. https://github.com/koalaman/shellcheck/wiki/SC2145
# Perform work
while [ ! $# -eq 0 ]; do # While number of arguments ($#) is not (!) equal to (-eq) zero (0).
#1>&2 echo "DEBUG:Starting processArguments while loop." # Debug stderr message. See [1].
# Perform work
while [ ! $# -eq 0 ]; do # While number of arguments ($#) is not (!) equal to (-eq) zero (0).
#1>&2 echo "DEBUG:Starting processArguments while loop." # Debug stderr message. See [1].
- #1>&2 echo "DEBUG:Provided arguments are:""$@" # Debug stderr message. See [1].
+ #1>&2 echo "DEBUG:Provided arguments are:""$*" # Debug stderr message. See [1].
case "$1" in
-h | --help) showUsage; exit 1;; # Display usage.
--version) showVersion; exit 1;; # Show version
case "$1" in
-h | --help) showUsage; exit 1;; # Display usage.
--version) showVersion; exit 1;; # Show version
vbm "DEBUG:checkExecutables function called."
declare -a candidateCommandsNames # Initialize array for storing positional arguments provided to this function.
candidateCommandsNames=("$@") # Save positional arguments to variable as string. See [3].
vbm "DEBUG:checkExecutables function called."
declare -a candidateCommandsNames # Initialize array for storing positional arguments provided to this function.
candidateCommandsNames=("$@") # Save positional arguments to variable as string. See [3].
- vbm "DEBUG:candidateCommandsNames:""$@"
+ vbm "DEBUG:candidateCommandsNames:""$*"
vbm "DEBUG:candidateCommandsNames[0]:""${candidateCommandsNames[0]}"
vbm "DEBUG:candidateCommandsNames[1]:""${candidateCommandsNames[1]}"
vbm "DEBUG:candidateCommandsNames[2]:""${candidateCommandsNames[2]}"
vbm "DEBUG:candidateCommandsNames[0]:""${candidateCommandsNames[0]}"
vbm "DEBUG:candidateCommandsNames[1]:""${candidateCommandsNames[1]}"
vbm "DEBUG:candidateCommandsNames[2]:""${candidateCommandsNames[2]}"
# Output: adds/updates key(value) to global assoc array 'appRollCall'
local returnState
#echo "DEBUG:$(date +%S.%N)..Starting checkapp function."
# Output: adds/updates key(value) to global assoc array 'appRollCall'
local returnState
#echo "DEBUG:$(date +%S.%N)..Starting checkapp function."
#echo "DEBUG:returnState:$returnState"
#===Process Args===
#echo "DEBUG:returnState:$returnState"
#===Process Args===