I am trying to find last day of the month. Date in DDMMYYYY format.
#!/bin/bash
start_date=01092018
end_date=$(date +%m%Y -d "$start_date +1 month")
echo $end_date
Expected Result :30092018
But it gives below error :
Invalid character in date/time specification.
Usage :date [-u] [+Field Descriptors]