From b28a5fd18e4a65124f66e1cde9cb6326396b416d Mon Sep 17 00:00:00 2001 From: Nathaniel Landau Date: Sun, 9 Aug 2015 19:25:23 -0400 Subject: [PATCH] Added timestamp --- lib/sharedVariables.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/sharedVariables.sh b/lib/sharedVariables.sh index 94090ad..604c5e0 100755 --- a/lib/sharedVariables.sh +++ b/lib/sharedVariables.sh @@ -7,7 +7,8 @@ # # HISTORY # -# * 2015-01-02 - v1.0.0 - First Creation +# * 2015-01-02 - v1.0.0 - First Creation +# * 2015-08-05 - v1.0.1 - Now has $hourstamp (10:34:40 PM) # # ################################################## @@ -25,7 +26,8 @@ scriptBasename="$(basename ${scriptName} .sh)" # Strips '.sh' from scriptName # ------------------------------------------------------ now=$(date +"%m-%d-%Y %r") # Returns: 06-14-2015 10:34:40 PM datestamp=$(date +%Y-%m-%d) # Returns: 2015-06-14 -timestamp=$(date +%Y%m%d_%H%M%S) # Returns: 20150614_223440 +hourstamp=$(date +%r) # Returns: 10:34:40 PM +timestamp=$(date +%Y%m%d_%H%M%S) # Returns: 20150614_223440 # THISHOST # ------------------------------------------------------