From 987d31b60d24a7d506f55d4ca26cf4d2c70e641d Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 17 Jan 2023 09:28:16 +0100 Subject: [PATCH] added g_echo_note function for colored notifications --- gaboshlib/g_echo_note.bashfunc | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gaboshlib/g_echo_note.bashfunc diff --git a/gaboshlib/g_echo_note.bashfunc b/gaboshlib/g_echo_note.bashfunc new file mode 100644 index 0000000..3e50f7b --- /dev/null +++ b/gaboshlib/g_echo_note.bashfunc @@ -0,0 +1,10 @@ +#!/bin/bash + +function g_echo_note { + [ -z "$1" ] && return 0 + echo -en "\033[97m$(g_date_print) \033[36mNOTE:" + cat <<< "$@" + echo -en "\033[0m" + [ -z $g_alltosyslog ] && return 0 + g_logger $@ +}