From e6b436be06b50f69cbddc62625658ba0b485cc8c Mon Sep 17 00:00:00 2001 From: Nathaniel Landau Date: Sun, 21 Jun 2015 08:48:54 -0400 Subject: [PATCH] added timestamps --- lib/sharedVariables.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/sharedVariables.sh b/lib/sharedVariables.sh index 1145d66..94090ad 100755 --- a/lib/sharedVariables.sh +++ b/lib/sharedVariables.sh @@ -18,12 +18,14 @@ scriptName=`basename $0` #Set Script Name variable scriptBasename="$(basename ${scriptName} .sh)" # Strips '.sh' from scriptName -# NOW +# TIMESTAMPS # ------------------------------------------------------ -# Will print the current date and time in the format: -# 01-02-2015 01:09:54 PM +# Prints the current date and time in a variety of formats: +# # ------------------------------------------------------ -now=$(date +"%m-%d-%Y %r") #Set Timestamp in variable +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 # THISHOST # ------------------------------------------------------