marking1/compare
author Christian Urban <urbanc@in.tum.de>
Thu, 06 Dec 2018 13:15:28 +0000
changeset 229 5549016ab10f
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