misc/compare
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 04 Nov 2021 12:20:12 +0000
changeset 395 e0a82c9f1d21
parent 386 69f36c98808b
permissions -rwxr-xr-x
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
229
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
#!/bin/sh
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
###set -e
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
trap "exit" INT
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
386
69f36c98808b added marking
Christian Urban <christian.urban@kcl.ac.uk>
parents: 284
diff changeset
     6
files=${1:-*/pre3}
229
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
for sd in $files; do
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
  cd $sd
386
69f36c98808b added marking
Christian Urban <christian.urban@kcl.ac.uk>
parents: 284
diff changeset
    10
  #echo $sd
69f36c98808b added marking
Christian Urban <christian.urban@kcl.ac.uk>
parents: 284
diff changeset
    11
  echo `tail -n 1 output` > x1
69f36c98808b added marking
Christian Urban <christian.urban@kcl.ac.uk>
parents: 284
diff changeset
    12
  echo `tail -n 1 output-2` > x2
69f36c98808b added marking
Christian Urban <christian.urban@kcl.ac.uk>
parents: 284
diff changeset
    13
  cmp -s x1 x2 > /dev/null
229
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
  if [ $? -eq 1 ]; then
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
      echo $sd + "is different"
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
  fi
386
69f36c98808b added marking
Christian Urban <christian.urban@kcl.ac.uk>
parents: 284
diff changeset
    17
  rm x1 x2
69f36c98808b added marking
Christian Urban <christian.urban@kcl.ac.uk>
parents: 284
diff changeset
    18
  cd ..
229
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
  cd ..
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
done
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
cfcaf4a5e5b4 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22