From 66c008e2f41380f69538460b6f8dde43631863a2 Mon Sep 17 00:00:00 2001 From: x p k Date: Wed, 4 Mar 2020 17:40:08 +0800 Subject: [PATCH] NEW: logger.sh --- sh/logger.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sh/logger.sh diff --git a/sh/logger.sh b/sh/logger.sh new file mode 100644 index 0000000..16bf5fd --- /dev/null +++ b/sh/logger.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +LOGFILE=/var/log/$1.log +MSG=`cat` +echo "$(date): $MSG" >> $LOGFILE