Created
May 15, 2019 03:29
-
-
Save ksaver/b781810d332e77e33d32f083ecbfaf16 to your computer and use it in GitHub Desktop.
A simple way to substract one day from today
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
#!/bin/bash | |
# | |
# yesterday.sh | |
# a simple way to substract one day from today | |
YESTERDAY=$(date -d "$date - 1 days" +"%Y-%m-%d") | |
echo $YESTERDAY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Snippet for use in bash scripts..