Timeline for command to extract data between 2 rows
Current License: CC BY-SA 3.0
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 14, 2016 at 2:27 | vote | accept | Shawn | ||
| Oct 14, 2016 at 2:16 | comment | added | John1024 | @Shawn Also, try the version I just added under "Alternative" and see if it works for you. | |
| Oct 14, 2016 at 2:16 | history | edited | John1024 | CC BY-SA 3.0 |
added 221 characters in body
|
| Oct 14, 2016 at 2:12 | comment | added | John1024 |
@Shawn As you can see from the output I show, it works for me on your sample input. If it is printing to the end of the file for you, that means that the regex /^[0-9-]{10} / never matched on your data. First, what OS are you on?
|
|
| Oct 14, 2016 at 2:00 | comment | added | Shawn | There seems to be some problem with the latest script. It is printing the lines starting from given line number till the end of file. Otherwise this looks good | |
| Oct 13, 2016 at 20:59 | comment | added | John1024 | @Shawn See updated answer for a version that uses lines starting with dates to signal the end of a trace. | |
| Oct 13, 2016 at 20:58 | history | edited | John1024 | CC BY-SA 3.0 |
added 145 characters in body
|
| Oct 13, 2016 at 20:42 | comment | added | Shawn | I need the exception & stack trace that starts from the line number i specify. I do not need the entire exceptions in the file. Sorry if I confused you. | |
| Oct 13, 2016 at 20:37 | comment | added | John1024 | @Shawn Let me clarify: do you want to print all exceptions+stacktraces in the file or just the one exception+stacktrace that starts on the line number that you specify? | |
| Oct 13, 2016 at 20:35 | comment | added | Shawn | I need the entire stack trace. | |
| Oct 13, 2016 at 20:33 | comment | added | John1024 | @Shawn That is possible. By the way, do you want to print all stacktraces or just the one that starts on your specified line? | |
| Oct 13, 2016 at 20:31 | history | edited | John1024 | CC BY-SA 3.0 |
added 419 characters in body
|
| Oct 13, 2016 at 20:30 | comment | added | Shawn | Not all the stack trace lines are intended by a space. Some of them are having a space and some of them are not.The row after stack trace begins with a date and time so is there any other way I can cut it based on that? | |
| Oct 13, 2016 at 20:24 | history | answered | John1024 | CC BY-SA 3.0 |