Created
July 10, 2019 18:45
-
-
Save shubhamagarwal92/97bdb795b376b1a7a897c8be7a005719 to your computer and use it in GitHub Desktop.
Get current date as variable in shell script
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
today="$(date '+%Y-%m-%d')" | |
yesterday="$(date -d yesterday '+%Y-%m-%d')" | |
echo $today | |
echo $yesterday |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment