2.再减一天就得到所要的月末日期.
[wenba@bi_test_c investor_data]$ begindate='2015-11-01'
[wenba@bi_test_c investor_data]$ mid=$(date -d"$begindate 1 month" +'%Y-%m-01')
[wenba@bi_test_c investor_data]$ enddate=$(date -d "$mid -1 days" +"%F")
[wenba@bi_test_c investor_data]$ echo $mid
2016-12-01
[wenba@bi_test_c investor_data]$ echo $enddate
2016-11-30