Last active
May 31, 2020 02:00
-
-
Save mrrcollins/185ef0c88bc715abfa48f5d45a528403 to your computer and use it in GitHub Desktop.
This file contains 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 | |
#Get the date | |
#echo "Remembering what day it is." | |
#UPDATE=$(date +"%Y%m%d") | |
#date=$(date) | |
#Get The Day of the Week | |
DAYOFWEEK=$(date +"%u") | |
#Account for Weekend | |
if [ "${DAYOFWEEK}" -eq 1 ]; then | |
YESTERDAY=$(date -v-3d +"%m-%d-%Y") | |
YESTERDAYFOX=$(date -v-3d "-3 days" +"%m-%d-%Y") | |
else | |
YESTERDAY=$(date -v-1d +"%m-%d-%Y") | |
YESTERDAYFOX=$(date -v-1d +"%m-%d-%Y") | |
fi | |
echo "The day of the week is $DAYOFWEEK" | |
echo "Yesterday was $YESTERDAY" | |
if [ $DAYOFWEEK = "5" ]; then | |
TOMORROW=$(date -v-3d +"%m-%d-%Y") | |
else | |
TOMORROW=$(date -v-3d +%m-%d-%Y"") | |
# From Stack - yesterday=$(date -d "$date -1 days" +"%Y%m%d") | |
FOX=$(date +"%m-%d-%Y") | |
#echo date | |
#Start the copy | |
echo "Copying" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment