awk '$0 >= "2025-01-19T00:00:00" && $0 <= "2025-01-25T00:00:00" {print $0; getline; print $0}' /u02/app/oracle/diag/rdbms/test1/TEST1/trace/alert_TEST1.log > selected_alert.txtin the above command, selected_alert.txt contains your required output lines from the alert log.
reference article :
https://ermannkara.wordpress.com/2025/02/06/filter-a-specific-time-range-in-the-alert-log-and-write-the-results-to-a-txt-file/