#!/bin/sh if [ $# -lt 3 ] ; then echo "Usage: $0 NUMTEMPS OUTPUT COMPARE..." >&2 exit 1 fi num="$1" shift out="$1" shift d="`mktemp -d`" for i in `seq "$num"` ; do ./shuffle >"$d/$i" done best="`./compare-nm $d/* -- "$@" | ./selectbest `" ./choose $best $out rm -r "$d"