equal
  deleted
  inserted
  replaced
  
    
    
|      1 #!/bin/sh |      1 #!/bin/sh | 
|      2 ###set -e |      2 ###set -e | 
|      3  |      3  | 
|      4 trap "exit" INT |      4 trap "exit" INT | 
|      5  |      5  | 
|      6 files=${1:-assignment20187-*} |      6 files=${1:-*/pre3} | 
|      7  |      7  | 
|      8 for sd in $files; do |      8 for sd in $files; do | 
|      9   cd $sd |      9   cd $sd | 
|     10   #cp output output1 |     10   #echo $sd | 
|     11   cmp -s output output1 > /dev/null |     11   echo `tail -n 1 output` > x1 | 
|         |     12   echo `tail -n 1 output-2` > x2 | 
|         |     13   cmp -s x1 x2 > /dev/null | 
|     12   if [ $? -eq 1 ]; then |     14   if [ $? -eq 1 ]; then | 
|     13       echo $sd + "is different" |     15       echo $sd + "is different" | 
|     14   fi |     16   fi | 
|         |     17   rm x1 x2 | 
|         |     18   cd .. | 
|     15   cd .. |     19   cd .. | 
|     16 done |     20 done | 
|     17  |     21  | 
|     18  |     22  |