What if there's no log with that specific time?
You can make the time less and less unique by eliminating the further-right time-fields. That said, once you start getting into the range where your granularity is hours, maybe you don't need to be cutting down your logs all that much, any way?
Good question. Obviously I made assumption on the time format, as that all logs I have. What kind of format do you have?
And after you find your way through sed, nothing is stopping you from adapting ed as your daily text editor.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.