Skip to content

Instantly share code, notes, and snippets.

@J-Gras
Last active May 9, 2018 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save J-Gras/75d53a084584a2cd42a2131cd8afc645 to your computer and use it in GitHub Desktop.
Save J-Gras/75d53a084584a2cd42a2131cd8afc645 to your computer and use it in GitHub Desktop.
Small script to view Bro log files.
#!/bin/sh
if echo "$1" | grep -q ".log.gz$"; then
CAT="zcat"
else
CAT="cat"
fi
$CAT $1 | bro-cut -dc $2 | sed -e 's/^#fields\t/#fields:/; s/^#types\t/#types:/' | column -t -s $'\t' | less -S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment