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