Skip to content

Instantly share code, notes, and snippets.

@samredai
Created December 16, 2018 02:39
Show Gist options
  • Save samredai/79845ae639d83784612ca1be0988824b to your computer and use it in GitHub Desktop.
Save samredai/79845ae639d83784612ca1be0988824b to your computer and use it in GitHub Desktop.
Linux: Get Today's Date in YYYY-MM-DD format
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