X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/f34f63b7d654d669aa300e4de09aeaf678c7699b..93b687f9df50824f6ac2098bb35318b0fcd14713:/unitproc/bktemp-vbm?ds=sidebyside diff --git a/unitproc/bktemp-vbm b/unitproc/bktemp-vbm index 7e1687b..8fa7c1c 100644 --- a/unitproc/bktemp-vbm +++ b/unitproc/bktemp-vbm @@ -3,21 +3,27 @@ vbm() { # Description: Prints verbose message ("vbm") to stderr if optionVerbose is set to "true". - # Usage: vbm "DEBUG:verbose message here" - # Version 0.1.1 + # Usage: vbm "DEBUG :verbose message here" + # Version 0.1.3 # Input: arg1: string # vars: optionVerbose # Output: stderr - # Depends: echo 8, date 8 + # 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] ""$*" 1>&2; # Display argument text. + echo "[$functionTime]:$0:""$*" 1>&2; # Display argument text. fi # End function return 0; # Function finished. } # Displays message if optionVerbose true +#==BEGIN sample code== +vbm "STATUS:This is a status message."; +optionVerbose="true"; +vbm "STATUS:This is another status message."; +#==END sample code== + # Author: Steven Baltakatei Sandoval # License: GPLv3+