From: Alexander Schmidt Date: Mon, 20 Jul 2015 21:54:21 +0000 (+0200) Subject: added timestamp to info and error output X-Git-Url: https://git.treefish.org/~alex/backmeupscotty.git/commitdiff_plain/190f715747bca44914cb8904e3b07c2d499f44f4 added timestamp to info and error output --- 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 {