#!/bin/sh
aspell --list < $1 | sort | uniq | while read misspelling; do
    if fgrep -x $misspelling good_words.utf8 > /dev/null; then
	continue
    else
	echo $misspelling
    fi
done > misspellings.utf8
if [ -s misspellings.utf8 ]; then
    echo "Warning: see misspellings.utf8 for a list of possibly misspelt words"
fi
