#!/bin/bash # Exclude examples 7 and 11 as they use random number generator not compatible across platforms for i in 1 2 3 4 5 6 8 9 10 12 13; do echo Computing the diff for example b"$i". cd b"$i" if [ `diff -b -B -I '[0-9*.0-9*].*second.*' -I "time for" -I "A PICTURE RECONSTRUCTION" -I "snark14Experimenter" b"$i"r.out b"$i".out | wc -l` == 0 ] then echo "No differences found." else echo "Some differences were found, you can examine them below." echo " " diff -b -B -I '[0-9*.0-9*].*second.*' -I "time for" -I "A PICTURE RECONSTRUCTION" -I "snark14Experimenter" b"$i"r.out b"$i".out | more fi cd .. done