"Deleting a mark" can mean either removing just the data for that mark, or removing all the evidence that you ever thought of having the mark in the grades file. If you are just removing the data, then the mark definitions in the header stay the same, and each student record, while losing the characters representing that student's mark, still has the appropriate mark delimiters (tab characters, usually) showing where the mark was. If you are removing all evidence of the mark, then both the definition of the mark in the header and the mark delimiter for the mark must vanish. Both kinds of operations are frightening, because they destroy data and perhaps the design of the data.
Gclear deletes just the data: it clears the mark but does not destroy its definition. Gremove deletes the definition; it will clear the data too, but only if you explicitly tell it to. Gdelete can do either kind of deletion, but you have to tell it which you want.
Usage
gclear [-?] [-9] [-m marklist] [selection options] [files]
gremove [-?] [-9] [-c] [-m marklist] [files]
gdelete [-?] [-9] [-C|R] [-c] [-m marklist] [selection options] [files]
Details
Here are the options allowed by these three programs.
-9 |
Use nine-digit student numbers in the output files, if possible. |
-C |
[Upper-case C] (gdelete only) Tell gdelete to clear rather than remove the marks. |
-R |
(gdelete only) Tell gdelete to remove rather than clear the marks. |
-c |
[Lower-case c] (gdelete and gremove) Clear any non-empty marks before removing. |
-m marklist |
Clear or remove the marks named in marklist, which must be a quoted string if it contains more than one mark name. |
If you omit the -m option, all three programs query you to find out which marks to clear or remove; however, that is only possible if you are working with named files rather than the standard input.
The -c (lower-case!) option tells gremove to clear any non-empty marks before removal. If the -c option is omitted and there are non-empty marks, gremove asks you what to do, but only if it is not reading its grades-file input from the standard input; if it is reading the standard input, it fails with an error message. We need your authorization before destroying your data.
Gremove does not accept selection options, because you can't remove a mark definition for just some of your students.
Gremove removes the mark definitions of removed marks from the grades-file header, but it leaves the entire header as it was before the removal in place but commented out, because you may need it for reference when fixing up the new header. Please do inspect the header to see if it might need further repairs.
Gdelete behaves like gclear if you give it the -C (upper-case!) option, and like gremove if you give it the -R option. If input is from the standard input, you must give either the -C or the -R option.