これはgawk
awk '/Subject: Your Report Data/{printf "%s%s\n",$0,RT}' RS="------------------------------" file
編集:より複雑なバージョン、正しいセクションを出力
cat file
2013-09-11 12:02:08 INFO: ------------------------------
2013-09-11 12:02:08 INFO: Javamail session sending email
2013-09-11 12:02:08 INFO: Session properties:
2013-09-11 12:02:08 INFO: com.hof.email.starttime=20130911120208
2013-09-11 12:02:08 INFO: mail.smtp.auth=true
2013-09-11 12:02:08 INFO: mail.smtp.connectiontimeout=60000
2013-09-11 12:02:08 INFO: mail.smtp.host=mailserver
2013-09-11 12:02:08 INFO: mail.smtp.port=25
2013-09-11 12:02:08 INFO: mail.smtp.timeout=60000
2013-09-11 12:02:08 INFO: mail.transport.protocol=smtp
2013-09-11 12:02:08 INFO: From: Support
2013-09-11 12:02:08 INFO: To: Customer
2013-09-11 12:02:08 INFO: Subject: Your Report Data
2013-09-11 12:02:08 INFO: Message ID: <id>
2013-09-11 12:02:09 INFO: Email sent successfully
2013-09-11 12:02:09 INFO: Javamail session ended
2013-09-11 12:02:09 INFO: ------------------------------
2013-09-11 12:02:08 INFO: Javamail session sending email
2013-09-11 12:02:08 INFO: Session properties:
2013-09-11 12:02:08 INFO: com.hof.email.starttime=20130911120208
2013-09-11 12:02:08 INFO: mail.smtp.auth=true
2013-09-11 12:02:08 INFO: mail.smtp.connectiontimeout=60000
2013-09-11 12:02:08 INFO: mail.smtp.host=mailserver
2013-09-11 12:02:08 INFO: mail.smtp.port=25
2013-09-11 12:02:08 INFO: mail.smtp.timeout=60000
2013-09-11 12:02:08 INFO: mail.transport.protocol=smtp
2013-09-11 12:02:08 INFO: From: Support
2013-09-11 12:02:08 INFO: To: Customer
2013-09-11 12:02:08 INFO: Subject: Error
2013-09-11 12:02:08 INFO: Message ID: <id>
2013-09-11 12:02:09 INFO: Email sent successfully
2013-09-11 12:02:09 INFO: Javamail session ended
2013-09-11 12:02:09 INFO: ------------------------------
awk '/---/ {if (p) {for (j=0;j<i;j++) print a[j]};i=0;p=0;delete a;a[i++]=$0} !/---/ {a[i++]=$0} /Your/ {p=1}'
2013-09-11 12:02:08 INFO: ------------------------------
2013-09-11 12:02:08 INFO: Javamail session sending email
2013-09-11 12:02:08 INFO: Session properties:
2013-09-11 12:02:08 INFO: com.hof.email.starttime=20130911120208
2013-09-11 12:02:08 INFO: mail.smtp.auth=true
2013-09-11 12:02:08 INFO: mail.smtp.connectiontimeout=60000
2013-09-11 12:02:08 INFO: mail.smtp.host=mailserver
2013-09-11 12:02:08 INFO: mail.smtp.port=25
2013-09-11 12:02:08 INFO: mail.smtp.timeout=60000
2013-09-11 12:02:08 INFO: mail.transport.protocol=smtp
2013-09-11 12:02:08 INFO: From: Support
2013-09-11 12:02:08 INFO: To: Customer
2013-09-11 12:02:08 INFO: Subject: Your Report Data
2013-09-11 12:02:08 INFO: Message ID: <id>
2013-09-11 12:02:09 INFO: Email sent successfully
2013-09-11 12:02:09 INFO: Javamail session ended