Hi,
Can anyone help me how can I get the line that between the start time and end time.
file1.txt
15/03/2009 20:45:03 Request: - Data of this line
15/03/2009 20:45:12 Response: - Data of this line
15/03/2009 22:10:40 Request: - Data of this line
15/03/2009 22:10:42 Response: - Data of this line
16/03/2009 02:05:03 Request: - Data of this line
16/03/2009 02:05:12 Response: - Data of this line
16/03/2009 08:59:57 Request: - Data of this line
16/03/2009 09:00:01 Response: - Data of this line
16/03/2009 10:45:23 Request: - Data of this line
16/03/2009 10:45:32 Response: - Data of this line
I like the users to put date and time of starting time and end time like this
$ ReportData.sh 15/03/2009 21:00:00 16/03/2009 09:00:00 and get the result. I also want Response eventhough it is over 9 o'clock since Request was before 9.
Output:
15/03/2009 22:10:40 Request: - Data of this line
15/03/2009 22:10:42 Response: - Data of this line
16/03/2009 02:05:03 Request: - Data of this line
16/03/2009 02:05:12 Response: - Data of this line
16/03/2009 08:59:57 Request: - Data of this line
16/03/2009 09:00:01 Response: - Data of this line
I don't know which tool to use to compare the date and time.
Thank you in advance for any comments.