Last active
May 9, 2018 08:47
-
-
Save J-Gras/75d53a084584a2cd42a2131cd8afc645 to your computer and use it in GitHub Desktop.
Small script to view Bro log files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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