Quote:
Originally Posted by pthakur
It's very urgent. Please provide some solution.
Thanks
|
[Deep breath]
Hi!
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.
Edit:
In other words. In a directory that looks like this (
exclude.sh is the script):
Code:
$ ls
1337707002239_DiscountJune2012.pdf
contractedFirmStorageCap.08182015_144505000.xls
exclude.sh
operatingcapacity_10_2008.xls
producer_cashout_report-2015-04-30-094409.xls
I get this result simply by filtering out the files containing "2015" (and obviously skipping the script as well):
Code:
./exclude.sh
1337707002239_DiscountJune2012.pdf
operatingcapacity_10_2008.xls
Best regards,
HMW