#!/bin/sh if [ -z "$TEST_PROGRAM" ]; then TEST_PROGRAM=../demo/demo fi EXPECT=$(cat out$1) GET=$("$TEST_PROGRAM" < in$1 | awk '{SUM += $1} END {print SUM}') echo "expect $EXPECT ones, but actually get $GET ones"