Print tail of a file after two blank lines

I have a file that contain sets of information separated by two blank lines. The format of the file looks something like:

this is set1 line1
this is set1 line2
<blank>
this is set1 line3
this is set1 line4
<blank>
<blank>
this is set2 line1
this is set2 line2
<blank>
this is set2 line3
this is set2 line4
<blank>
<blank>
this is set3 line1
<blank>
this is set3 line2

As you can see, the sets of information are separated by 2 blank lines whereas we may have 1 blank line in the middle of sets.

The information is logged into this file regularly. I want to print the last set of information from this file. (i.e. end of file following the 2 blank lines).

Thanks for your reply, but I'm afraid this doesn't solve my problem. Its not that I'll always have last two lines to be extracted from the file. I need to get the last set which may have 2-20 lines in it.

So, if the file is :

this is set1 line1
this is set1 line2
<blank>
this is set1 line3
this is set1 line4
<blank>
<blank>
this is set2 line1
this is set2 line2
<blank>
this is set2 line3
this is set2 line4

I need to print:

this is set2 line1
this is set2 line2

this is set2 line3
this is set2 line4

Also, I discovered another pattern if that helps. The first line in each set always starts with "####" (4 hash)

Hi All,
I have a file that contain sets of information separated by two blank lines. The format of the file looks something like:
this is set1 line1
this is set1 line2
<blank>
this is set1 line3
this is set1 line4
<blank>
<blank>
this is set2 line1
this is set2 line2
<blank>
this is set2 line3
this is set2 line4
<blank>
<blank>
this is set3 line1
<blank>
this is set3 line2
As you can see, the sets of information are separated by 2 blank lines whereas we may have 1 blank line in the middle of sets.
The information is logged into this file regularly. I want to print the last set of information from this file. (i.e. end of file following the 2 blank lines).
Any suggestions to do this efficiently?
Thanks for your help
Regards,
Vikas

Hi Rajveer
Thanks for your reply, but I'm afraid this doesn't solve my problem. Its not that I'll always have last two lines to be extracted from the file. I need to get the last set which may have 2-20 lines in it.
So, if the file is :
this is set1 line1
this is set1 line2
<blank>
this is set1 line3
this is set1 line4
<blank>
<blank>
this is set2 line1
this is set2 line2
<blank>
this is set2 line3
this is set2 line4
I need to print:
this is set2 line1
this is set2 line2
this is set2 line3
this is set2 line4
Also, I discovered another pattern if that helps. The first line in each set always starts with "####" (4 hash)
Regards,
Vikas

Is it like
####
this is set1 line1
this is set1 line2
<blank>
this is set1 line3
this is set1 line4
<blank>
<blank>
####
this is set2 line1
this is set2 line2
<blank>
this is set2 line3
this is set2 line4
.
.
.
.
this is set2 line20
<blank>
<blank>
####
this is set3 line1
.
.
.

This site truncated my last message. Here is the missing part, from the awk section :
cat test.log |awk ' BEGIN { newrec=1 }
{
if ( $0 == "" && prev == "" ) {
newrec=1
lineno=0
}
if ( newrec == 1 ) {
lineno++
linedata[lineno]=$0
}
prev=$0
}
END {
for ( i=1 ; i
Hi Rajveer
Thanks for your reply, but I'm afraid this doesn't solve my problem. Its not that I'll always have last two lines to be extracted from the file. I need to get the last set which may have 2-20 lines in it.
So, if the file is :
this is set1 line1
this is set1 line2
<blank>
this is set1 line3
this is set1 line4
<blank>
<blank>
this is set2 line1
this is set2 line2
<blank>
this is set2 line3
this is set2 line4
I need to print:
this is set2 line1
this is set2 line2
this is set2 line3
this is set2 line4
Also, I discovered another pattern if that helps. The first line in each set always starts with "####" (4 hash)
Regards,
Vikas

Thanks to everyone who replied to my question.
I used the solution given by Krishnan and it worked perfectly as I wanted.
Thanks again.
Odile, I tried you solution but unfortunately "rev" doesn't work in my
environment.
Martin, You post is still truncated but I understood what you mean (the
logic is clear to me).
Thanks for taking time to solve my problem. Much Appreciated.
Regards,
Vikas

Sorry, but in order to keep spammers at bay, it is only possible to engage in lengthy conversations with other members once connected. There is a provision for a 600 character message upon requesting the connection with the other member, if that helps. Thanks.