#!/bin/bash
if [[ $# != 3 ]] ; then
  echo syntax: `basename $0` F1 F2 TEST will create a file where the contents are F2 if TEST is set. > /dev/stderr
  exit 0
fi
cp $1 /tmp/file.$$
diff /tmp/file.$$ $2 > /tmp/diff.$$
patch -x15 -D$3 /tmp/file.$$ < /tmp/diff.$$ > /dev/null 2> /dev/null
cat /tmp/file.$$
rm -rf /tmp/file.$$ /tmp/diff.$$
echo compile -D$3 to get the contents of $2 > /dev/stderr
