I want to extract from SVN log all text between the lines. If it is with sed, awk or grep it’s better.
Example: svn.log
------------------------------------------------------------------------
r1075 | popad | 2011-12-02 14:28:20 +0200 (Fri, 02 Dec 2011) | 1 line
Changed paths:
M /trunk/apps/frontend/modules/mail/templates/candidateSearchAgentSuccess.php
M /trunk/apps/test.php
Ticket #1000: removing ads from emails
------------------------------------------------------------------------
r1074 | coman | 2011-11-30 10:51:29 +0200 (Wed, 30 Nov 2011) | 3 lines
Changed paths:
M /trunk/apps/frontend/i18n/messages.de.xml
M /trunk/apps/frontend/i18n/messages.en.xml
M /trunk/apps/frontend/i18n/messages.ro.xml
Ticket #1089: translation update: send to friend form
http://example.com/projects/147/tickets/1089
Solved HU translation update
------------------------------------------------------------------------
I want to search for Ticket #1000 and retrieve entire block between the lines
------------------------------------------------------------------------
r1075 | popad | 2011-12-02 14:28:20 +0200 (Fri, 02 Dec 2011) | 1 line
Changed paths:
M /trunk/apps/frontend/saSuccess.php
M /trunk/apps/frontend/saAddSuccess.php
Ticket #1000: removing ads from emails
------------------------------------------------------------------------
Thanks in advance.
this awk oneliner gives you the output you need:
test
You have seen that the line separator (—–) was not in output. it could be easily added if you really need.