I have a file with a list of dates in the format below: yyyymmddhhmmss
20150608141617
20150608141345
20150608141649
20150608141506
20150608141618
20150608141545
Would like to validate the correctness of these dates in case there are errors during generation in a previous process.
Correctness means that there are no spaces,length is 14 characters and the date is valid i.e. no date like 20151508141545
.
Is this possible in perl or bash?