Makeallgrade Script
For creating a shell script
to send grade email to a class
Bill Bynum
Fall, 1999



Creating a shell script to send grade email to a class

The purpose of the makeallgrade Bourne shell script is to create a Bourne shell script (default name allgrade) that you can use to send a grade email message to each member of your class. The makeallgrade script uses the namelist file required by the submit program to create the allgrade shell script. The allgrade script preserves student privacy, since each student receives only her or his own grade information. Only the student's email address appears in the To: line of the message.

Usage Information

Usage:  makeallgrade [ -f scriptname ] name_list_file
    'scriptname' is the name of the script to be produced
         default is  "allgrade"
    'name_list_file' is a file containing student e-mail addresses and
         names, one per line.  Each line is expected to be of the form
    login_id   email_address     Name
    turing     aturing@erols.com  Alan Mathison Turing
    Everything after the e-mail address is treated as the last name
    The first line of the namelist file is used for the class title

Script source

Mailgrades script called by the allgrade script

The mailgrades script greps the ASCII version of the grades spreadsheet to assemble the grade message sent. The mailgrades script keys on the GRADEFILE environment variable. If it is set, then that is the name of the grade file that will be grepped. Otherwise, the default name grade.sc.asc (created by the Wsc spreadsheet) is used.

Sample allgrade script produced
Sample namelist file used
Sample grade email

Sendgrades script

The Sendgrades script is used to send the latest grade information to a single student. The Sendgrades script greps the allgrade script for some fragment of the student's name to find the student's line of the mailgrades file, then executes that line.

Usage Information
Usage:   sendgrades [options] "fragment of a student's name"
   sends grade mail to one student by grep-ing for the name
   fragment in the gradescript file allgrade, then
   executing the matching line.  The grep will find the
   FIRST occurrence of the name fragment
Options:
   -d             debug, don't actually send the grade mail
   -s scriptname  use 'scriptname' instead of allgrade
   -m msgfname    insert 'msgfname' into the grade message

Script source

Showgrades script

The showgrades script greps the GRADEFILE file just like sendgrades does, but directs the output to the terminal screen instead of sending email.

Script source


submit       makeroll       makegrsc       makeallmsg       fdsplit       Tool List