#!/bin/sh
# the only optional parameter is the list of the files to break 

SPLITDIR=src
BINDIR=../bin

if test "${1}set" = set ; then
echo "Please specify files to join!"
exit 1
fi

GROUPED=$*
echo $GROUPED
for words in $GROUPED ; do 
    _words=`basename ${words} .koi`
    mv -f $words $words.old
    cat $SPLITDIR/${_words}.*.koi | $BINDIR/sortkoi8u -f | uniq > $words
done
