Oracle Linux date format used in alert log.
I'm trying to create a shell script that I can schedule in CRON to run and grep the last 10 minutes of the alert log for specific errors. As part of this, I need to format the date for a shell script.
I'm trying to figure out how to format the date using +%Y-%m-%d %H, etc. to match what is in the alert log.
Here's an example of a date I have in my database alert log.
2024-01-31T10:21:41.125178-05:00 <-- how to match this?
sed -n "/^$(date --date='10 minutes ago' '+%Y-%m-%d %H:%M')/,\$p" 2test_alert_DM011.log| grep 'ORA"'