1

I have Hybris SAP application with console log. The log format looks like this

INFO   | jvm 1    | main    | 2020/05/28 17:17:19.969 |       <String>timestamp</String>
INFO   | jvm 1    | main    | 2020/05/28 17:17:19.969 |       <String>1590700639952</String>
INFO   | jvm 1    | main    | 2020/05/28 17:17:19.969 |     </entry>
INFO   | jvm 1    | main    | 2020/05/28 17:17:19.969 |   </headers>
INFO   | jvm 1    | main    | 2020/05/28 17:17:19.969 | </RequestDataVo>
INFO   | jvm 1    | main    | 2020/05/28 17:17:19.969 | RAW RESPONSE: NULL

I need to extract time range

12 am to 1 am

trying to do bt this sed

sed -n '/2020\/05\/29 00:00:00/ , /2020\/05\/29 01:00:00/p'

but it doesnt work

Gilles Quenot
  • 1,150
  • 9
  • 15

2 Answers2

0

You’ll want to use regular expressions, and you might want to try grep instead. The linked answer is for a PowerShell question, but the regex should be applicable to your problem: https://serverfault.com/a/951094/507179

Mikael H
  • 4,868
  • 2
  • 8
  • 15
0

so I found the answer I'd like to share it grep -E '^*2020/05/28 17:'