Originally Posted by pthakur
It's very urgent. Please provide some solution.
If it is very urgent, then I suggest that you hire a consultant to do the work for you. We are not here to provide solutions, but rather to help you if you are stuck writing your own script/program/regular expression.
So, to summarize: please get back with an example of what you have tried in order to solve this problem, and we will do our best to help you out.
But, I'll give you this: upon a brief inspection it seems as there is no standard with regards to the dates. Apparently it can be "10_2008", "June2012", "2015-04-30" or "08182015" or pretty much anything. In other words, you have some work to do here. If it were me, I would start by excluding the files that contain "2015" since they are not wanted and work from there.
In other words. In a directory that looks like this (exclude.sh
is the script):
I get this result simply by filtering out the files containing "2015" (and obviously skipping the script as well):