Last active 1752986119

Simple variables for the current date and time, great to include in logs for small scripts

gaiety's Avatar gaiety revised this gist 1752986119. Go to revision

1 file changed, 4 insertions

date-time-bash.sh(file created)

@@ -0,0 +1,4 @@
1 + currentDate=$(date +"%m_%d_%Y")
2 + currentTime=$(date +"%T")
3 +
4 + echo "Hello! It is $currentTime on the $currentDate" >> my-log.log
Newer Older