0

We need to do some analysis in one of our applications. The log entries have the format:

2020-09-21 08:32:06 LoginService.login benchmark total(10003ms) non-login-total(10003ms) login-total0(0ms)[]

I wanted to search in this pattern with text ending in non-login total() followed by login-total in the above mentioned timestamp range, e.g. from 08:30 to 08:35. I tried a few options, but could not get the pattern with the text non-login and login-total as well. Please provide examples using zgrep as its a .gz file. Any help in this regard is really appreciated.

agc
  • 7,973
  • 2
  • 29
  • 50
  • 1
    There's no real reason for `zgrep` to be used; someone can use `gunzip -c – Charles Duffy Sep 24 '20 at 18:08
  • @CharlesDuffy - Can you please provide awk pattern if possible for the above scenario? – raghu.classy Sep 24 '20 at 18:11
  • [Using awk to find data matching date range in text file](https://stackoverflow.com/questions/27710914/using-awk-to-find-data-matching-date-range-in-text-file); [using awk to check between two dates](https://stackoverflow.com/questions/4163257/using-awk-to-check-between-two-dates); [How to filter data between two dates with awk in a bash script](https://stackoverflow.com/questions/28275880/how-to-filter-data-between-2-dates-with-awk-in-a-bash-script); &c. – Charles Duffy Sep 24 '20 at 18:18
  • ...is there a specific technical issue you're stuck on that _isn't_ addressed in any of those links? – Charles Duffy Sep 24 '20 at 19:12
  • Closing in absence of a response describing a specific problem unique to this question. – Charles Duffy Sep 24 '20 at 22:33

0 Answers0