Skip to content

Instantly share code, notes, and snippets.

@stephen-hannam
Last active August 3, 2020 23:54
Show Gist options
  • Save stephen-hannam/0221dd5d35e43b73fcd3f8b74d7f3d3f to your computer and use it in GitHub Desktop.
Save stephen-hannam/0221dd5d35e43b73fcd3f8b74d7f3d3f to your computer and use it in GitHub Desktop.
TAIL|GREP LOG in RT

Filter Log as it's Written and Append Timestamp

tail -f afile.log | egrep -i --line-buffered 'matching|filter|terms' | awk '{ printf strftime("%c") "\n" $0}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment