Skip to content

Instantly share code, notes, and snippets.

@ksaver
Created May 15, 2019 03:29
Show Gist options
  • Save ksaver/b781810d332e77e33d32f083ecbfaf16 to your computer and use it in GitHub Desktop.
Save ksaver/b781810d332e77e33d32f083ecbfaf16 to your computer and use it in GitHub Desktop.
A simple way to substract one day from today
#!/bin/bash
#
# yesterday.sh
# a simple way to substract one day from today
YESTERDAY=$(date -d "$date - 1 days" +"%Y-%m-%d")
echo $YESTERDAY
@ksaver
Copy link
Author

ksaver commented May 15, 2019

Snippet for use in bash scripts..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment