From a22c56b35412f588ce058c85dfeb02d508b6c278 Mon Sep 17 00:00:00 2001 From: Steven Baltakatei Sandoval Date: Fri, 10 Jul 2020 03:00:07 +0000 Subject: [PATCH] feat(unitproc/bktemp-vbm):Added vbm error msg function --- unitproc/bktemp-vbm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 unitproc/bktemp-vbm diff --git a/unitproc/bktemp-vbm b/unitproc/bktemp-vbm new file mode 100644 index 0000000..c7a82b5 --- /dev/null +++ b/unitproc/bktemp-vbm @@ -0,0 +1,23 @@ +#!/bin/bash +# Desc: Display message if optionVerbose true + +vbm() { + # Description: Prints verbose message ("vbm") to stderr if optionVerbose is set to "true". + # Usage: vbm "DEBUG:verbose message here" + # Version 0.1.0 + # Input: arg1: string + # vars: optionVerbose + # Output: stderr + # Depends: echo + + if [ "$optionVerbose" = "true" ]; then + functionTime=$(date --iso-8601=ns); # Save current time in nano seconds. + echo "[$functionTime] ""$*" 1>&2; # Display argument text. + fi + + # End function + return 0; # Function finished. +} # Verbose message display function. + +# Author: Steven Baltakatei Sandoval +# License: GPLv3+ -- 2.30.2