Skip to content

Instantly share code, notes, and snippets.

@mzcu
Last active July 22, 2017 20:37
Show Gist options
  • Save mzcu/1f81d658f4af72126bf39434de3b7d44 to your computer and use it in GitHub Desktop.
Save mzcu/1f81d658f4af72126bf39434de3b7d44 to your computer and use it in GitHub Desktop.
Removes join/part messages and colorizes WeeChat IRC log
# cleans up and colorizes WeeChat IRC log
# usage ./irc-log-viewer.sh path-to-irc-weechatlog
awk '!/has joined #|has quit|has left #| is now known as /\
{ date=$1 " " $2; nick=$3; $1=$2=$3=""; $0=$0; gsub(/^ /,"\t"); \
print "\x1b[31m" date "\x1b[0m \x1b[33m" nick "\x1b[0m" $0}' $1 \
| less -R -x20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment