#!/bin/sh
for f in *.sgf
do
cat "$f" | tr ']' '\n' | egrep "PW|PB" | sort | tr '\n' ']' | sed 's,PB.\(.*\).PW.\(.*\).,(White) \2 - (Black) \1,' | xargs echo "$f : "
done