Try this,
last_day=20190426
date -d "$last_day +$( if [ `date -d $last_day +%w` == 5 ]; then echo 3; elif [ `date -d $last_day +%w` == 6 ]; then echo 2; else echo 1; fi ) days" +"%Y%m%d"
The input may be of any day. so
- if input fallsfall on 5th(fridayFriday) day of the week will add 3.
- if input fallsfall on 6th(saturdaySaturday) day of the week will add 2.
- else add 1 for all other days of the week