Created
December 16, 2018 02:39
-
-
Save samredai/79845ae639d83784612ca1be0988824b to your computer and use it in GitHub Desktop.
Linux: Get Today's Date in YYYY-MM-DD format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date +%Y-%m-%d | |
#2018-12-16 | |
#Set the date to a variable | |
rundate=$(date +%Y-%m-%d) | |
echo $rundate | |
#2018-12-16 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment