We use to run shell scripts through Control-M and shells script accepts execution date as input parameter and script should calculate last month's last day whatever order date we run. I am trying to get the same as below but not able to. Please help.
run_date=20210615 startMM_run_date=`date --date="$run_date" '%Y%m01'` --> 20210601 Here how to get "2021/05/31" from $startMM_run_date. Please advice.