From 190f715747bca44914cb8904e3b07c2d499f44f4 Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Mon, 20 Jul 2015 23:54:21 +0200 Subject: [PATCH] added timestamp to info and error output --- backmeupscotty | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backmeupscotty b/backmeupscotty index ad2fa65..152cf86 100644 --- a/backmeupscotty +++ b/backmeupscotty @@ -8,12 +8,16 @@ BACKUP_RUNEVERYNTHDAY=1 _UPPERME=$(echo $(basename $0) | tr '[:lower:]' '[:upper:]') +function timestamp { + date +"[%y-%m-%d %H:%M:%S]" +} + function scottyinfo { - echo $_UPPERME: $@ + echo $(timestamp) $_UPPERME: $@ } function scottyerror { - echo $_UPPERME: $@ >&2 + echo $(timestamp) $_UPPERME: $@ >&2 } function ssh255 { -- 2.39.5