#!/bin/bash arg1_test=( 2 -3 5 -7 -200 5 -1 -1 ) arg2_test=( 2 3 4 5 100 0 -1 -23 ) result=( 4 0 10 -2 -100 5 -2 -24 ) for i in ${!arg1_test[@]} do output=$(./summ ${arg1_test[$i]} ${arg2_test[$i]}) if [ $output -eq ${result[$i]} ]; then echo "PASS" else echo "FAIL" fi done