I am doing a range search with sed. I want to parse the log data from the date and time
2016-09-29 01:00 to
2016-09-29 01:30. That is why I have been using the following command,
$ sed -n '/2016-09-29 01:/,/2016-09-29 01:30:.*$/p'
But problem is if 1:30 is not available in log then it returns all the logs to the end.
So how can work with this so that if
1:30 doesn't exist it will go to the just next record not till end.
Things to consider: Logs contains stack trace so lines contain stack trace doesn't start with the date.