Skip to content

Instantly share code, notes, and snippets.

@ar2rsoft
Created March 17, 2020 08:49
Show Gist options
  • Save ar2rsoft/78423b4beb939da645ac5683fa2efea1 to your computer and use it in GitHub Desktop.
Save ar2rsoft/78423b4beb939da645ac5683fa2efea1 to your computer and use it in GitHub Desktop.
# Если в логи пишется таймштамп, то при выводе логов не очень удобно - пример ниже, как можно отформатировать дату
cat file.log|perl -pe'use POSIX qw(strftime);s/^\[(\d+)\]/strftime("%Y-%m-%d %H:%M:%S",localtime $1\/1000)/e'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment