Printing day before yesterday date in UNIX shell script is easy, here is the code:
Code:
date +%Y%m%d -d "2 days ago"

Example shell script:
Code:
#!/bin/bash
# printing day before yesterday date in unix shell script
DAY_BEFORE_YESTERDAY=$(date +%Y%m%d -d "2 days ago")
echo $DAY_BEFORE_YESTERDAY

Demo:
Code:
[admin@devopsrun1 ~]$ date
Thu Nov  7 02:30:08 EST 2019
[admin@devopsrun1 ~]$ cat date.sh
#!/bin/bash
# printing day before yesterday date in unix shell script
DAY_BEFORE_YESTERDAY=$(date +%Y%m%d -d "2 days ago")
echo $DAY_BEFORE_YESTERDAY

[admin@devopsrun1 ~]$ ./date.sh
20191105