If you're unsure what a "command-line program" is, please refer to the last section of this page, What's a command-line program?.
Common options
Some options are shared by all or most of the command-line programs.
- -?
-
Displays abbreviated information on the program, listing
essentially just the available options and arguments accepted
or required.
This option is not mentioned in the descriptions of the individual programs, because all programs accept it and it would always have the same explanation.
- -9
-
If the program modifies its file arguments, the -9 option
tells it to use old-style nine-digit student numbers on
output. If that would cause significant digits to be lost, the
program gives an error message and does not produce a modified
file.
Not all programs do modify their file arguments. For example, gpr prints its arguments in a more readable form, leaving the original file unchanged. Such programs do not accept a -9 option.
- Selection options
- These allow the effects of a program to be applied only to a subset of the student records in a grades file. The selection options are standard and are described in their own web page, linked from each relevant program's description.
- Sorting options
- These allow the effects of a program to be applied to student records in an order other than the order of their appearance in a grades file, without necessarily changing the order of the contents of the file. The sorting options, like the selection options, are standard and are described in their own web page, linked from each relevant program's description.
The programs
Here is a list of the command-line programs. Each is linked to its own descriptive page, which are also linked from the navigation bar. They are in the style of Unix man pages, but are less tersely technical — or rather, the technicalities are about marks rather than Unix.
- garchive — format marks in a style suitable for long-term archival storage, as by the Undergraduate Office.
- gclear — clear the contents of all students' entries for a mark.
- gcopy — copy a mark from one grades file to another.
- gdelete — delete all entries for a mark, either clearing the contents or completely removing the entire column of marks; this command is specialized by gclear and gremove.
- gdiff — look for differences between two grades files.
- gdisplay — format marks in a style suitable for public display.
- gen — calculate the values of marks derived from the marks directly earned by the students.
- ghidenames — replace the names in a grades file with a fixed string, so as to protect students' privacy in a minimal way.
- glint — check grades files for problems, in format or (to some extent) in values.
- gpadnames — lengthen the names in a grades file so that it's easier to work on in an editor.
- gpr — print grades files in a generalized form (which is specialized by garchive, gdisplay, gpubreport, greport and gstats).
- gpubreport — display the marks of one student in a style suitable for public display.
- grecol — rearrange the marks for all students in a somewhat unconstrained way.
- gremove — completely remove a column of marks from a grades file.
- greport — display the marks of one student in a form that includes all available information.
- gselect — echo a grades file, omitting student records that were not selected.
- gsort — sort the student records stored in grades files.
- gstats — display statistics on student marks.
- gsub — "submit the marks" for a course; that is, copy marks from a grades file into a file of the form used for official final-grades submission.
- gswap — interchange the values for two marks.
- gupdatedrops — update the course-dropped status of all students by referring to a class list.
What's a command-line program?
The "command-line programs" all expect to be used in a Unix-like command-line environment. In this environment, you log in to a "terminal", and you and the computer (really, the "shell" program) exchange messages. First, the computer types its "prompt", sometimes just a single character such as '$' but often more complicated. Then you type one line of response, ending your input by pressing the return or enter key. It's possible to give quite a long explanation of what's going on, but really, you can find out the basics by having someone show you once. Honest!
Here's an example in which you get the (imaginary) command-line program gwhiz to do its work by typing something like this after the '$' prompt:
$ gwhiz -r -9 -p 5 gradesfile1 gradesfile2
Here "gwhiz" of course is the name of the program, and the rest of the line consists of a list of command-line "arguments". There are two kinds of these arguments.
-
options. In this case, the options are:
-r -9 -p 5
Each option consists of a minus sign or hyphen followed by a letter or digit (without an intervening space), and then perhaps a piece of data such as a number or a mark name. Here, the '5' is data belonging to the 'p' option. Some options are not actually optional, but most can be left out unless there's a reason to include them.
You can combine the options, like this:
$ gwhiz -r9p5 gradesfile1 gradesfile2
-
file arguments. These are the names of files that
the program will operate on. Most of the grading
programs are happy to
work with the redirected standard input instead of
explicitly named files.
In the example, the file names are "gradesfile1" and "gradesfile2".
Compact syntax specifications
If you make a mistake with gwhiz, or (since it's a grading program) call it with the -? option, it will tell you how to call it, something like this cryptic message:
Usage: gwhiz [-?] [-9] [-r] [-p pdata] [-t] files
The square brackets mean the item enclosed is optional. Clearly, our example did in fact specify all the options except -t, and for the -p option it gave "pdata" a value of 5. Since "files" is not enclosed in brackets, you are required to list the file operands; in this case, it's not clear how many are required, so one should be enough.
If you get a "usage" message when you weren't expecting it, the program is telling you that you made a mistake.