CSE 271: Homework 1

Assigned: 16 January
Due: 18 January

Now that you have email conquered, copy my emacs initialization file, create the subdirectory cse271.131/hw1, change the protection of the cse271.131 directory (if needed), and within it, create the files as specified below. Finally, when complete, do a touch DONE in the cse271.131/hw1 directory. Spelling and case counts!

Do the work described below, then

Using emacs, create a file called lafayette.txt with the following contents:

Apparently, someone took the Lehigh Alma Mater and tried to mix it up. Fortunately, with emacs, you can easily repair it. (Feel free to try out some additional emacs macros in the process.) First, save this file again, this time as lehigh.txt. Then use the emacs search and replace macro to replace Lafayette with Lehigh. Now use the emacs spell-checking facility to correct the one typo in the original (and any others you may have contributed). Then move your cursor to the first character of each line (starting with "Mater") and use the transpose word command to fix the word ordering. Finally, move your cursor to the top line, and use the shortcut "M-s" to center the words Alma Mater at the top. Save your corrected file and submit both lafayette.txt and lehigh.txt within the hw1 directory.

Note that the above has given instructions for emacs users. Non-emacs users should be able to manage, and in fact could probably do the same thing with vi (or any other suitably capable editor).

Future homeworks and projects will also use a specific name within the cse271.131 directory. A shell script will collect the assignment when it is due, and copy it elsewhere so that it can be automatically compiled and run (when appropriate).


Last revised: 14 January 2013.