Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
a small and colorful format to tail tinysnitch logs
# tinysnitch: https://github.com/nathants/tinysnitch
# color: https://gist.github.com/nathants/336bc5e501ad174aeeb7986f2b0633e4
# count-last: https://gist.github.com/nathants/f6d3f2cd4147af102c65a69a7e729b53
# The MIT License (MIT)
# Copyright (c) 2022-present Nathan Todd-Stone
# https://en.wikipedia.org/wiki/MIT_License#License_terms
# colorful snitch logs
tail -f /tmp/tinysnitch.log \
| sed -ur 's:(tcp|udp) [^ ]+ \->:\1:' \
| grep --line-buffered -v -e :51820$ -e :53$ \
| color tcp:blue udp:cyan dns:magenta icmp:yellow allow:green deny:red \
| count-last
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment