Skip to main content
tags
Link
countermode
  • 7.8k
  • 5
  • 34
  • 59
edited tags
Link
Shawn
  • 133
  • 1
  • 7
Source Link
Shawn
  • 133
  • 1
  • 7

command to extract data between 2 rows

I have to extract the exception and corresponding stack trace starting from a line number in a log file. I know the starting line no of the error. how can i find out where the stack trace will end from the below example? Appreciate your help

example
-------
2016-10-07 15:49:07,537 ERROR Some exception
 stacktrace line 1
 stacktrace line 2
 .
 .
 stacktrace line n
2016-10-07 15:49:07,539 debug blah blah blah
2016-10-07 15:49:07,540 debug blah blah blah