#!/bin/sed -f s/\t/ /g # skip over irregular lines /^[0-9]\+ [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [a-zA-Z]\+ [a-zA-Z]\+:/!d # remove the timestamp and the IP s/^\(PREV: \|OLD: \|\)[0-9]\+ [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [a-zA-Z]\+ [a-zA-Z]\+: [0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+ /\1/ s/ info server:// s/""/"/g /^<[a-zA-Z0-9_-]\+ .*>$\|^<[a-zA-Z0-9_-]\+>\|^[0-9]\+ [0-2][0-9]:[0-5][0-9]:[0-5][0-9] \(\|Statistics:\) \|^[a-zA-Z0-9_-]\+ \(\(started\( reloaded\|\)\|advanced\|ended\) game: \|ended game: .* and disconnected.\)/!d