X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/15d7fe72480649e3f4991e628c93f0369d9f87ec..7185e88a52d8daecc20e3d31a38fcd0860159884:/unitproc/bktemplate diff --git a/unitproc/bktemplate b/unitproc/bktemplate index 81cd17c..67fbf17 100755 --- a/unitproc/bktemplate +++ b/unitproc/bktemplate @@ -57,9 +57,9 @@ vbm() { # License: GPLv3+ # Ref./Attrib: - if [ "$OPTION_VERBOSE" == "true" ]; then + if [ "$OPTION_VERBOSE" = "true" ]; then FUNCTION_TIME=$(date --iso-8601=ns); # Save current time in nano seconds. - echoerr "[$FUNCTION_TIME] ""$@"; # Display argument text. + echoerr "[$FUNCTION_TIME] ""$*"; # Display argument text. fi # End function @@ -181,7 +181,7 @@ processArguments() { # 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 @@ -270,7 +270,7 @@ checkExecutables() { 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]}" @@ -349,13 +349,13 @@ checkapp() { # Output: adds/updates key(value) to global assoc array 'appRollCall' local returnState #echo "DEBUG:$(date +%S.%N)..Starting checkapp function." - #echo "DEBUG:args: $@" + #echo "DEBUG:args: $*" #echo "DEBUG:returnState:$returnState" #===Process Args=== for arg in "$@"; do #echo "DEBUG:processing arg:$arg" - if command -v $arg 1>/dev/null 2>&1; then # Check if arg is a valid command + if command -v "$arg" 1>/dev/null 2>&1; then # Check if arg is a valid command appRollCall[$arg]="true"; #echo "DEBUG:appRollCall[$arg]:"${appRollCall[$arg]} if ! [ "$returnState" = "false" ]; then returnState="true"; fi