How to get the first day of last month, and the last day of last month in bash
DATE_FROM=`date -d “-1 month -$(($(date +%d)-1)) days” “+%F”` DATE_TO=`date -d “-$(($(date +%d)-1)) days” “+%F”`
DATE_FROM=`date -d “-1 month -$(($(date +%d)-1)) days” “+%F”` DATE_TO=`date -d “-$(($(date +%d)-1)) days” “+%F”`