CSE 271: Homework 1

Assigned: 17 January 2007
Due: 19 January 2007

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

cd $HOME
cp ~brian/cse271/dot-emacs .emacs
mkdir cse271.071 cse271.071/hw1
chmod go-rwx cse271.071
cd cse271.071/hw1
touch DONE
ls -la

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.

Future homeworks and projects will also use a specific name within the cse271.071 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: 18 January 2007.