misc/compare
author Christian Urban <urbanc@in.tum.de>
Wed, 30 Oct 2019 11:28:44 +0000
changeset 284 9a04eb6a2291
parent 229 marking1/compare@5549016ab10f
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