Looking for a shell script or a simple perl script . I am new to scripting and not very good at it .
I have 2 directories . One of them holds a text file with list of files in it and the second one is a daily log which shows the file completion time. I need to co-relate both and make a report.
Code:
Directory 1 : /home/drew/files
Jan.txt
Feb.txt
Jul.txt
Contents from Jul.txt
Timestamp Filename Data
-----------------------------------------
2009-07-28 jnx123 3002
2009-07-29 abcd22 23423
2009-07-30 jnx123 6377
2009-07-30 abcd22 8657
Directory 2 :/home/drew/logs
server.log.2009-07-04
server.log.2009-11-30
server.log.2009-07-28
Contents of server.log.2009-07-28
2009-07-28 23:57:31,334 Loading file:jnx123
2009-07-28 23:59:32,334 Finished file:jnx123
So I want to go to the Directory 1 and open each record and run it against the server.log based on date and compute the time taken for file to load.Each day will have a server.log as mentioned and each file list will have several files a day
Date Filename data Totaltime
--------------------------------------------
07-28 jnx123 3002 3minutes:20seconds
07-30 abcd22 8657 4minutes:20seconds