#! /bin/bash # Last edited on 2024-03-30 18:17:15 by stolfi # Usage: $0 # Collects all ".checked-good", ".checked-bad", and ".checked-dunno" word lists # that result from splitting the given , producing the # consolidated files .good, .dunno, .bad, # and their unions .bad+good, .bad+dunno+good. # The should be given in order of decreasing authority. # Each file .checked-good is compared against the union of the preceding # .checked-bad lists and the current .checked-bad; any conflicts are saved # in the file .good-bugs. Each file .checked-bad is compared against # the .checked-good lists. processing stops after the first checkfile # with conflicts. if [[ $# -ne 2 ]]; then echo "** usage: $0 " 1>&2 exit 1 fi inprefix="$1" outprefix="$2" for f in good bad dunno; do 1>&2 echo '==============' "$f" '==============' 1>&2 wc ${inprefix}*.$f 1>&2 echo ' ' 1>&2 cat ${inprefix}*.$f | sort -T . | uniq > ${outprefix}.$f done cat ${outprefix}.{good,bad,dunno} | sort | uniq > ${outprefix}.bdg echo ' ' 1>&2 wc ${outprefix}.{bad,dunno,good,bdg} dicio_list_dups_in_bad_dunno_good ${outprefix}