#!/bin/sh if [ $# -lt 3 ] ; then echo "multicompare -- run compare on multiple candidates" >&2 echo "Usage: multicompare CANDIDATE... -- COMPARISONS..." >&2 echo "Bugs: Don't run on files names containing whitespace." >&2 exit 1 fi all="$@" first="${all%%--*}" rest="${all##*--}" for i in $first ; do coll=`./compare-1n $i $rest` printf "%d\t%s\n" "$coll" "$i" done | sort -n