X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/dee109acfc05eb2bda1fcc9fadc733bd02b80830..b605b5b5c80a9daf90e92ed4be43501ff5951e8d:/unitproc/bktemp-vbm diff --git a/unitproc/bktemp-vbm b/unitproc/bktemp-vbm index 8fa7c1c..878a022 100644 --- a/unitproc/bktemp-vbm +++ b/unitproc/bktemp-vbm @@ -1,27 +1,27 @@ #!/bin/bash -# Desc: Display message if optionVerbose true +# Desc: Display message if opVerbose true vbm() { - # Description: Prints verbose message ("vbm") to stderr if optionVerbose is set to "true". + # Description: Prints verbose message ("vbm") to stderr if opVerbose is set to "true". # Usage: vbm "DEBUG :verbose message here" - # Version 0.1.3 + # Version 0.2.0 # Input: arg1: string - # vars: optionVerbose + # vars: opVerbose # Output: stderr # Depends: bash 5.0.3, echo 8.30, date 8.30 - if [ "$optionVerbose" = "true" ]; then - functionTime=$(date --iso-8601=ns); # Save current time in nano seconds. - echo "[$functionTime]:$0:""$*" 1>&2; # Display argument text. + if [ "$opVerbose" = "true" ]; then + functionTime="$(date --iso-8601=ns)"; # Save current time in nano seconds. + echo "[$functionTime]:$0:""$*" 1>&2; # Display argument text. fi # End function return 0; # Function finished. -} # Displays message if optionVerbose true +} # Displays message if opVerbose true #==BEGIN sample code== vbm "STATUS:This is a status message."; -optionVerbose="true"; +opVerbose="true"; vbm "STATUS:This is another status message."; #==END sample code==