Course Links

Exercises

Resources

External

For some assignments, you will be required to submit a typescript file -- i.e., a file containing the exact text of your interaction with the program that you wrote. This is easy to create: the script command will begin capturing in a file everything typed or output to the system terminal. To end the capture, use the exit command.

The point of submitting a typescript of your work is to provide a clean presentation of your program in action. To that end, there are a few things you should avoid during a logged session because they create unattractive or garbled results. Use of arrow and/or delete keys during the recorded session will be captured as unattractive escape-sequences in the log file. If you accidentally use these keys, please delete the typescript and make a clean one. Also, you should avoid the use of emacs.

The captured log will be in a file called typescript by default. To use a different filename, simply provide it to script as a command-line argument:

script myscript

Of course, you can also rename typescript after the fact.

On Aurora

The best place to create the typescript is on one of our Unix hosts (aurora.smith.edu or one of the lab computers running Linux) right before you submit the assignment. This will demonstrate that your program compiles and runs under the same system I will use to grade it. You can do it from the same command prompt you use to submit.

Short video showing the creation of a typescript file on aurora.

On Windows

If you are working on a Windows machine and want to make a typescript there, you will need to install the Cygwin package, which gives you access to a Unix-like shell terminal window. During installation make sure you select the util-linux package, under the Utilities category.

On Mac

Since Mac offers a unix-style command line via its Terminal program, you should be able to prepare a typescript by running it and then following the instructions above.