I want to write a script that will display the time per minute between two date and time. The Start and End time gap can be anything, could be 5minutes, 3hours, 30days, etc.
Example:
Start time: 2019-12-31 23:57:00
End Time : 2020-01-01 00:03:00
Result:
2019-12-31 23:57:00
2019-12-31 23:58:00
2019-12-31 23:59:00
2020-01-01 00:00:00
2020-01-01 00:01:00
2020-01-01 00:02:00
2020-01-01 00:03:00
Edit:
Im getting the error below when using the -d
option.
date: Not a recognized flag: d
Usage: date [-u] [+"Field Descriptors"]