misc/compare
author Christian Urban <christian.urban@kcl.ac.uk>
Wed, 02 Dec 2020 01:15:14 +0000
changeset 382 1bd800376e0c
parent 284 9a04eb6a2291
child 386 e2170c91a9f2
permissions -rwxr-xr-x
updated
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
5549016ab10f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
files=${1:-assignment20187-*}
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
5549016ab10f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
  #cp output output1
5549016ab10f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
  cmp -s output output1 > /dev/null
5549016ab10f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
  if [ $? -eq 1 ]; then
5549016ab10f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
      echo $sd + "is different"
5549016ab10f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
  fi
5549016ab10f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
  cd ..
5549016ab10f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
done
5549016ab10f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
5549016ab10f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18