marking5/tails
author Christian Urban <urbanc@in.tum.de>
Wed, 16 Jan 2019 12:20:34 +0000
changeset 253 ec7a12806c3f
permissions -rwxr-xr-x
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
253
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
#!/bin/sh
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
###set -e
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
trap "exit" INT
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
files=${1:-assignment201810-*}
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
for sd in $files; do
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
  cd $sd
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
  #echo $sd
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
  marksone=$(( `tail -1 output` ))
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
  markstwo=$(( `tail -1 output1` ))
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
  if [ "$marksone" != "$markstwo" ]; then
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
      echo $sd + "is different"
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
  fi
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
  cd ..
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
done
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
ec7a12806c3f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19