Created
December 13, 2025 12:10
-
-
Save gchait/7ad2b2a054f3dbff8f64407a0e43c703 to your computer and use it in GitHub Desktop.
Align date and time while streaming logs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # shellcheck disable=SC2154 | |
| "${tail_command[@]}" | while read -r datetime rest; do | |
| new_datetime=$("${DATEUTIL}" -d "${datetime} UTC" +"%d/%m/%y %H:%M:%S") | |
| echo "${new_datetime} ${rest}" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment