So the dir DATA contains the above hierarchy,
User input Start and End Data
I want to grep on all those files between the input dates:confused:, I want a list of files which come under the input dates.
note that the files creation or modified date is not the date and hour contained in the file name so cannot use find newer/modified command.
So what could be the easiest way of doing it, After finding the files i want to grep a string "PQRS" on the selected files for the input dates.
Any help on this would be highly appreciated...!!! TIA
Thanks for the quick reply Chubler_XL let me try this out.
---------- Post updated at 11:46 AM ---------- Previous update was at 11:40 AM ----------
Now That worked pretty well, I was not aware of the for loop u mentioned above i used to doe ls -lR and then loop over... but i have multiple files inside the hour directory (00->) so i just want to look up into ABC_ file and not any other files since my search patter is also present under multiple files in the directory.
No i dont want hour in the search criteria basically i want to loop over all the hours of the day but just the pattern search should happen over a selected file i.e. ABC_<Date><Hour>.txt as the file is present under all the hour dirs under a specific date...
Its like 00-23 hours for a day dir and ABC* file under all the hours dir...
got me?