I'm not able to pull in correct partition value when the day of the month is before the 10th. Can someone advise the error in logic where I am assigning value to PARTITION?
NEW=`date +"%Y%m" --date="next month" | sed 's/ *//'`
OLD=`date +"%Y%m" --date="last month" | sed 's/ *//'`
PARTITION=`date --date="+2 month -$(($(date +"%d")-1)) days 00:00:00" +"%s" | sed 's/ *//'`
The error I get is on the PARTITION declaration:
-bash: 08: value too great for base (error token is "08")