Hi,
Could you please provide me command to filter contents between date in a log file?
Say for example, in a log file I want to capture contents between date May 01 from 5am to 9 am.
OS -- Linux
Regards,
Maddy
Hi,
Could you please provide me command to filter contents between date in a log file?
Say for example, in a log file I want to capture contents between date May 01 from 5am to 9 am.
OS -- Linux
Regards,
Maddy
Does your Linux have a command, dgrep?
which dgrep
will show you if the command is available.
dgrep is date grep - it is meant to do exactly what you asked for.
If you don't have it, install the dateutuils package for your system.
PS: showing sample input and expected output really helps get better answers than what I just gave.