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
# pys: https://gist.github.com/nathants/741b066af9faa15f3ed50ed6cf677d67
# color: https://gist.github.com/nathants/336bc5e501ad174aeeb7986f2b0633e4
# colorful snitch logs
tail -f /tmp/tinysnitchd.log \
| grep --line-buffered -e allow -e deny \
| grep --line-buffered -v 1.1.1.1:53 \
| pys 'i.split("INFO")[-1]' \
| stdbuf -oL sed -E 's:\|.+>::' \
| stdbuf -oL uniq \
| color tcp:blue udp:cyan \
| ljust=5 color allow:green deny:red
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.