#!/bin/bash
#
# USAGE: compare_methods <filename1> <method1> <filename2> <method2>
#
# can be used on output of errorbounds5 (invoked with brief==0)
# to create a scatter plot of method1 and method2
#
TMPFILE1=`mktemp /tmp/compare.XXXXXX`; trap 'rm -f $TMPFILE1' 0 1 15
TMPFILE2=`mktemp /tmp/compare.XXXXXX`; trap 'rm -f $TMPFILE2' 0 1 15

awk "/$2 / {print \$4}" $1 > $TMPFILE1
awk "/$4 / {print \$4}" $3 > $TMPFILE2
./merge $TMPFILE1 $TMPFILE2

rm -f $TMPFILE1
rm -f $TMPFILE2
