title: Is there a batch equivalent to Linux's "sdiff -s" command?
body: <p>The computer science class that I'm taking uses a bash script to grade our assignments. However, since many students use Windows, I'm trying to write an equivalent batch file that they can run on their devices to grade their lab.</p>
  
  <p>A really important part of the bash script is
  "sdiff -s key_$f out_$f >> details.txt"</p>
  
  <p>It compares the key file and the output file and prints the differences in the details file.</p>
  
  <p>I haven't used bash before and its been a while since I used batch files, so I'm pretty lost.</p>
  
  <p>Bash script:</p>
  
  <pre><code>echo ""
  echo "Running Diff"
  echo "--------"
  rm turnin.txt
  rm details.txt
  for f in file*.txt;
  do
      f=${f#tests/}
      cat out_$f &gt;&gt; turnin.txt
      echo "out_$f"&gt;&gt; details.txt
      sdiff -s key_$f out_$f &gt;&gt; details.txt
      if [ ${PIPESTATUS[0]} -eq 0 ];
      then
          echo "key_$f and out_$f are identical"
      else
          echo "key_$f and out_$f differ :: check details.txt for details"
      fi
  done
  echo "--------"
  </code></pre>
  
  <p>Example of details.txt when files are the same:</p>
  
  <pre><code>out_file1.txt
  out_file2.txt
  out_file3.txt
  out_file4.txt
  out_file5.txt
  </code></pre>
  
  <p>Example of details.txt when some lines of the files are different:</p>
  
  <pre><code>out_file1.txt
  isBalanced { ( [ ] } ) False                      | isBalanced { ( [ ] } ) True
  isBalanced { { ( ) [ { } ] ( [ ] ) } } True       | isBalanced { { ( ) [ { } ] ( [ ] ) } } False
  out_file2.txt
  out_file3.txt
  out_file4.txt
    40 2 4 + 2 2 + - * 4 5 / 6 / -                  |   402 4 + 2 2 + - * 4 5 / 6 / -
    48 36 7 % + 2 -                                 |   48 36 7 2 -
  out_file5.txt
  </code></pre>
  
  <p>Any advice is appreciated!</p>