In my log directory I have 600+ log files that have a naming scheme as:
abc.log.DDMMMYYYY
For example:
abc.log.01Nov2017
abc.log.02Nov2017
abc.log.10Dec2017
abc.log.21Jan2018
abc.log.22Jan2018
abc.log.23Jan2018
I am looking a way to rename all these files as...
YYYY-MM-DD.abc.log
The month name in file name must convert to month number. (Jan = 01, Feb = 02 ...)
For example:
2017-11-01.abc.log
2017-11-02.abc.log
2017-12-10.abc.log
2018-01-21.abc.log
2018-01-22.abc.log
2018-01-23.abc.log
How can I rename all these files in bash?