Skip to content

Instantly share code, notes, and snippets.

@bogdangrigg
Created April 29, 2019 14:26
Show Gist options
  • Save bogdangrigg/5db26e7bbd434d659ff33170de95a107 to your computer and use it in GitHub Desktop.
Save bogdangrigg/5db26e7bbd434d659ff33170de95a107 to your computer and use it in GitHub Desktop.
Log parsing snippets
# Realtime lines per second in a log file
tail -f /var/log/logfile | perl -e 'while (<>) {$l++;if (time > $e) {$e=time;print "$l\n";$l=0}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment