misc/compare
author Christian Urban <christian.urban@kcl.ac.uk>
Tue, 01 Nov 2022 15:03:48 +0000
changeset 425 6e990ae2c6a3
parent 386 69f36c98808b
permissions -rwxr-xr-x
updated solutions and templates

#!/bin/sh
###set -e

trap "exit" INT

files=${1:-*/pre3}

for sd in $files; do
  cd $sd
  #echo $sd
  echo `tail -n 1 output` > x1
  echo `tail -n 1 output-2` > x2
  cmp -s x1 x2 > /dev/null
  if [ $? -eq 1 ]; then
      echo $sd + "is different"
  fi
  rm x1 x2
  cd ..
  cd ..
done