[root@yunwei_42 ~]# cat cc.sh
today=date +%Y%m%d
yesterday=date +%Y%m%d --date="-1 day"
tommor=date +%Y%m%d --date="+3 day"
echo $yesterdayecho $tommor[root@yunwei_42 ~]# sh cc.sh 2018080820180812
[root@yunwei_42 ~]# cat cc.sh
today=date +%Y%m%d
yesterday=date +%Y%m%d --date="-1 day"
tommor=date +%Y%m%d --date="+3 day"
echo $yesterdayecho $tommor[root@yunwei_42 ~]# sh cc.sh 2018080820180812