I am trying to filter a range between dates with time in a log file with the following format for the dates and time: for example~
15-09-2019 18:27:33
16-09-2019 16:45:23
17-09-2019 11:26:36
I tried using the below:
egrep "11-09-2019 23:44:01.000|16-09-2019 14:46:32.000" logfile
But it didnt work as no result come out even tho the log consist thoe data for that date and time frame. Is my syntax wrong?
Thanks in advance!
I've found the solution to my query...and that is using sed. Below is the general syntax i used..
sed -n "/$START/,/$END/p"
Thanks for the help! :)
date -d '13:20' +[%d/%b/%Y:%H:%M:%S
-vDate2=date -d'13:30' +[%d/%b/%Y:%H:%M:%S
' { if ($4 > Date && $4 < Date2) print $0}' access.log but it did not work. Nothing came out