Submitting your assignments


First of all, it's a good idea to have a separate directory for each assignment (as well as for every lab) as discussed in class. (Don't forget to modify opening comments when you copy files from an earlier directory.)

There are a couple of utilities that you should use for submitting your assignments.

The first of these is the Linux/Unix command script. It is a program that will record an entire computer session from the moment it is started and until you terminate it (by typing exit). You should use this utility to record what is shown on screen both when you compile your programs as well as when running them.

Here's an example of using script:


Warning!!! DO NOT USE A DOT-C NAME FOR YOUR SCRIPT! The command script asst1.c will DESTROY (override) your program.


After going through the above steps you will note that a file named subm1.txt will be created in your current working directory. It contains a full recording of everything you did during the script session. Note, however, that if you hit the backspace key at all during your script session, then the script file will look a bit odd ... it would be helpful to go back and re-do the script session again, this time being careful when you type.

The next thing to do is to get a nice printout of your programs and the scripted files. Here you use the a2ps utility. What this utility does is collect several text files together into a single postscript file, which you can then print. It also has the added feature of reformatting things so that you end up printing fewer pages than you would otherwise.

If, for example, you had a program source (asst1.c) and a script (subm1.txt), you could bundle them all together as follows:

	a2ps -M Letter  asst1.c subm1.txt -o assign1.ps
This creates a new file named assign1.ps that has both your program and the script nicely packaged for printing, on standard letter-size paper. You can preview this file by using the command (gv is an abbr.of ghostview, a popular free postscript viewer)
	gv assign1.ps
To print this postscript file use the command
	lpr -P[printer-name] assign1.ps
where [printer-name] is a valid printer name, such as mpljet (in HH-3030), labljet5 (in C-2003), or linuxlj (in EN-2036).

Lastly, you may be required to submit your programs electronically. For information on the electronic submission of your files, consult this page.