Sed/awk print between different patterns the first occurrence

Thanks for the help yesterday. I have a little modification today,

I am trying the following:

i have a log file of a webbap which logs in the following pattern:

2011-08-14 21:10:04,535 blablabla ERROR Exception1 blablabla
       bla
       bla
      bla
      bla
2011-08-14 21:10:04,535 blablabla ERROR Exteption2 blablabla
       bla
       bla
      bla
      bla
2011-08-14 21:10:04,535 blablabla ERROR Exception1 blablabla
       bla
       bla
      bla
      bla
2011-08-14 21:10:04,535 blablabla ERROR Exception3 blablabla
       bla
      bla
      bla

what i need is to print everything between Exception1 and ERROR pattern but only the first occurrence :

2011-08-14 21:10:04,535 blablabla ERROR Exception1 blablabla
       bla
       bla
      bla
      bla

Thanks in advance!

To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags

```text
 and 
```

by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

Excuse me - you had that very similar question just in another thread of yours which would be very easy to be adopted in this case here:

Double posts are not permitted per UNIX and Linux Forums - Smilies and just because there is a slight difference in a pattern match, this does not justify opening a new thread, sorry.
I close this thread - if you feel this is not apropriate, send a PM to me with a good reason why, thanks.