1#! /bin/sh 2 3if [ "$#" -lt 4 ]; then 4 echo "usage: script.sh <bc> <test_output1> <test_output2> <script>" 5 exit 1 6fi 7 8set -e 9 10bc="$1" 11shift 12 13out1="$1" 14shift 15 16out2="$1" 17shift 18 19script="$1" 20 21echo "quit" | bc -lq "$script" > "$out1" 22echo "quit" | "$bc" -lq "$script" > "$out2" 23 24diff "$out1" "$out2" 25