Боюсь, что у grep такой возможности нет. Perl и / или Python может. Сверху головы (без особых размышлений) я придумал следующую awk-комбинацию.
awk '/Started GET/{print ""};1' blurble | awk 'BEGIN{RS=ORS="\n\n";FS=OFS="\n"}/FATAL/{print $0}'
Принимая во внимание фрагмент журнала, созданный из вашего фрагмента (x4), и несколько дополнительных строк "другого журнала" и две строки "FATAL" удалены, я печатаю два сегмента:
[----] I, [2014-04-10T19:12:36.294512 #1910:e93004] INFO -- : Started GET "/ems_infra/new" for 4.2.2.2 at 2014-04-10 15:12:36 -0400
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.369320 #1910:e93004] INFO -- : Completed 200 OK in 69ms (Views: 22.5ms | ActiveRecord: 0.0ms)
[----] I, [2014-04-10T19:12:36.294512 #1910:e93004] INFO -- : Started GET "/ems_infra/new" for 4.2.2.2 at 2014-04-10 15:12:36 -0400
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] F, [2014-04-10T19:12:36.346380 #1910:e93004] FATAL -- : Error caught: [NoMethodError] undefined method `invert' for nil:NilClass
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.369320 #1910:e93004] INFO -- : Completed 200 OK in 69ms (Views: 22.5ms | ActiveRecord: 0.0ms)
[----] I, [2014-04-10T19:12:36.294512 #1910:e93004] INFO -- : Started GET "/ems_infra/new" for 4.2.2.2 at 2014-04-10 15:12:36 -0400
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.369320 #1910:e93004] INFO -- : Completed 200 OK in 69ms (Views: 22.5ms | ActiveRecord: 0.0ms)
[----] I, [2014-04-10T19:12:36.294512 #1910:e93004] INFO -- : Started GET "/ems_infra/new" for 4.2.2.2 at 2014-04-10 15:12:36 -0400
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] F, [2014-04-10T19:12:36.346380 #1910:e93004] FATAL -- : Error caught: [NoMethodError] undefined method `invert' for nil:NilClass
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.369320 #1910:e93004] INFO -- : Completed 200 OK in 69ms (Views: 22.5ms | ActiveRecord: 0.0ms)
Запуск двух awk для файла (я назвал его размытым) дает такой вывод:
[----] I, [2014-04-10T19:12:36.294512 #1910:e93004] INFO -- : Started GET "/ems_infra/new" for 4.2.2.2 at 2014-04-10 15:12:36 -0400
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] F, [2014-04-10T19:12:36.346380 #1910:e93004] FATAL -- : Error caught: [NoMethodError] undefined method `invert' for nil:NilClass
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.369320 #1910:e93004] INFO -- : Completed 200 OK in 69ms (Views: 22.5ms | ActiveRecord: 0.0ms)
[----] I, [2014-04-10T19:12:36.294512 #1910:e93004] INFO -- : Started GET "/ems_infra/new" for 4.2.2.2 at 2014-04-10 15:12:36 -0400
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] F, [2014-04-10T19:12:36.346380 #1910:e93004] FATAL -- : Error caught: [NoMethodError] undefined method `invert' for nil:NilClass
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.345863 #1910:e93004] INFO -- : other random logs
[----] I, [2014-04-10T19:12:36.369320 #1910:e93004] INFO -- : Completed 200 OK in 69ms (Views: 22.5ms | ActiveRecord: 0.0ms)