misc/compare
changeset 386 e2170c91a9f2
parent 284 9a04eb6a2291
--- a/misc/compare	Fri Jan 15 02:47:51 2021 +0000
+++ b/misc/compare	Mon Jan 18 22:12:39 2021 +0000
@@ -3,15 +3,19 @@
 
 trap "exit" INT
 
-files=${1:-assignment20187-*}
+files=${1:-*/pre3}
 
 for sd in $files; do
   cd $sd
-  #cp output output1
-  cmp -s output output1 > /dev/null
+  #echo $sd
+  echo `tail -n 1 output` > x1
+  echo `tail -n 1 output-2` > x2
+  cmp -s x1 x2 > /dev/null
   if [ $? -eq 1 ]; then
       echo $sd + "is different"
   fi
+  rm x1 x2
+  cd ..
   cd ..
 done