lines between two dates in a file

Hi Every body

I had a data in file as shown..
Now i want to get the data and insert into other file but between the two date ranges or from a past date to current date..Please Guide me in doing that..

Below is the data that looks like...

[Mon Nov 15 11:21:44 2010] [warn] child process 2588 still did not exit, sending a SIGTERM
[Mon Nov 15 11:21:44 2010] [warn] child process 2616 still did not exit, sending a SIGTERM
[Mon Nov 15 11:21:46 2010] [error] child process 2532 still did not exit, sending a SIGKILL
[Mon Nov 15 11:21:46 2010] [error] child process 2588 still did not exit, sending a SIGKILL
[Mon Nov 15 11:21:46 2010] [error] child process 2616 still did not exit, sending a SIGKILL
[Mon Nov 15 11:21:47 2010] [notice] caught SIGTERM, shutting down
[Mon Nov 15 11:22:13 2010] [notice] IBM_HTTP_Server/6.0.2.29 Apache/2.0.47
[Mon Nov 15 11:22:13 2010] [notice] Core file limit is 0; core dumps will be not be written for server crashes
[Mon Nov 15 13:49:36 2010] [error] File does not exist: /opt/IBM/IHS/htdocs/en_US/crossdomain.xml
[Mon Nov 15 13:52:31 2010] [error] File does not exist: /opt/IBM/IHS/htdocs/en_US/crossdomain.xml
[Wed Nov 17 20:11:47 2010] [error] File does not exist: /opt/IBM/IHS/htdocs/en_US/robots.txt
[Wed Nov 17 20:11:48 2010] [error] File does not exist: /opt/IBM/IHS/htdocs/en_US/robots.txt
[Thu Nov 18 11:31:28 2010] [error] File does not exist: /opt/IBM/IHS/htdocs/en_US/https:
[Fri Nov 26 07:10:22 2010] [error] File does not exist: /opt/IBM/IHS/htdocs/en_US/robots.txt
[Sun Nov 28 17:36:27 2010] [error] File does not exist: /opt/IBM/IHS/htdocs/en_US/Login, referer:
[Sun Nov 28 17:36:31 2010] [error] File does not exist: /opt/IBM/IHS/htdocs/en_US/assets, referer:
[Tue Nov 30 04:38:30 2010] [error] File does not exist: /opt/IBM/IHS/htdocs/en_US/robots.txt

Now lets say if want to get text between two date Nov 17 to Nov 28...
How can i get that...:confused:

 sed '/pattern/r second_file' file

Check if -i in place is supported by your sed

Is the other file of a similar format (ie leading date+time) and if so, should the extracted block of lines be merged with the records in the other file in date order, or just appended to the end?

If your after something quite simple and both the from and to dates exist in the file a simple sed script will get the data:

 sed -n '/Nov 17/,/Nov 26/p' logfile

Do you have GNU date on your system? Try:

 $ date --date "Nov 18"

Can we assume the files are already sorted in date+time order?