DCS grading programs

Sorting options

Many of the grading programs allow you to re-order the student records in a grades file before processing them. This applies not only to the actual sorting command, gsort, but also to others such as the output command gpr.

(However, gsort is the only one that actually re-orders the student records in the file. For the other commands, it might be more appropriate to call these "indexing" options rather than "sorting" options.)

You state your sorting requirements by means of command-line options, and this page describes the options that are available.

General form

Here are the available command-line options:

-k sortkey
The -k option specifies the key to use in sorting. The key must have one of these values:

-r
Sort in reverse order. This option is ignored if the -k option is not present -- except in the case of gsort, which assumes you want to sort by student name if you omit -k.

Changes since the previous version

The sorting options in the new version of the grading programs are the same as in the old version, though they are accepted by more of the programs than formerly.