Bash: Some Date Functions

Some of the date functions I have had to use recently in¬†bash shell Get Current Date today_date=$(date ‘+%Y%m%d’) (in format YYYYMMDD) Get Yesterday yesterday_date=$(date -d yesterday ‘+%Y%m%d’) (in format YYYYMMDD) Get Day of Week dayOfWeekNumber=$(date +%u) (1=Mon) dayOfWeekName=$(date +%A) (Friday) Could pass in a specific date: dayOfWeekNumber=$(date -d”20190821″ +%u) or a variable: dayOfWeekName=$(date -d”{dateToCheck}” +%A)… Read More Bash: Some Date Functions