#!/bin/sh echo "Testting ${1}" D=`swipl -q -s ${1} -t start_test` RESULT=$? echo $RESULT if [ $RESULT -eq 0 ] ; then echo "OK" else echo "There was errors!" E=`less log.txt | grep "ERROR:"` echo $E fi