#!/bin/sh

export FILE=$1
export EV=$2

awk -v EV=${EV} '($1=="got" && $3==EV){print $5" "$3" "$4" "$1} ($1=="notify" && $3==EV){print $5" "$3" "$4" "$1} ($1=="delete" && $3==EV){print $5" "$3" "$4" "$1} ($1=="update" && $3==EV){print $5" "$3" "$4" "$1} ($1==EV){if($4!=$3)printf("   ");print $4" "$1" "$2" received "$3" "$5}' ${FILE}