DCS grading programs

gdiff

Gdiff looks for differences between two grades files.

Usage

gdiff [selection options] file1 file2

Details

Gdiff compares the headers of its two file arguments by a simple-minded textual comparison process that avoids being stupid only in the most trivial cases, such as insertion or deletion of a single line.

Then it compares the lists of student records. First it looks through file1; for each selected student record, it checks for a record with the same student number in file2. If there is, any contents that differ are displayed. If there is no corresponding record in file2, the entire record from file1 is displayed.

When student records that differ are displayed, the marks that are the same are omitted, so that the differences are easier to see.

Lastly, the process is reversed: any selected records from file2 that have not already been checked are examined.

It is possible to devise combinations of selection options and repeated student numbers that will cause gdiff to examine student records that are not actually selected, but if that happens, there is something wrong with at least one of the files.

If two student records differ only in the name, and the names differ past the (reasonably long) prefix that gdiff displays, no difference will be visible, and you will be confused for a while.

Changes since the previous version

These are the noticeable changes: