Skip to content

Instantly share code, notes, and snippets.

@gchait
Created December 13, 2025 12:10
Show Gist options
  • Select an option

  • Save gchait/7ad2b2a054f3dbff8f64407a0e43c703 to your computer and use it in GitHub Desktop.

Select an option

Save gchait/7ad2b2a054f3dbff8f64407a0e43c703 to your computer and use it in GitHub Desktop.
Align date and time while streaming logs
# 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