#!/bin/bash correct=true program_out=$(./program) solution_out=$(./solution) if [ "$program_out" == "$solution_out" ] then echo "PASS " $program_out " equals " $solution_out else echo "FAIL " $program_out " DOES NOT EQUAL " $solution_out correct=false fi if [ "$correct" = true ] then echo "PASS"; else echo "FAIL"; fi