======================================================================= Subject: Using ph A few people asked about the part of the 2nd assignment that involves looking up the phone number of the CS department administrator by using: ph malloy (malloy being his last name). You asked whether the index_id that ph displays for him is his phone number....The answer is no. Note that when you do `ph malloy' the ph program tells you: E-mail addresses and telephone numbers are only displayed when a query matches one individual. To obtain additional information on a particular individual, inquire again with the index_id. I.e., since `malloy' matched more than one person, you get no telephone number. What the above message also tells you is that the index_id it displays for our administrator can be used to get his phone number. That is all the hints I want to give you on this problem, I leave it to you to figure out how to then get his phone number. The moral of this story is that it is important to read the output of a program carefully when things don't go as you expect; the output often gives you clues that will help you achieve your goal. These are the types of skills that will allow you to adapt to new computers and computer applications even after you have left CS101. Rob ======================================================================= Subject: webster Someone asked: > I don't know how to use the webster command to find the 13-letter words > of the english language. Hint: There are two special characters that you can use with webster. The '%' (percent) character stands for any single character. For example, "c%t" will match "cat" and "cot" and "cut".... The character '*' (asterisk) matches any number of characters (including no characters). For example, "t*o" matches "to" and "tattoo" and "two". If you need more assistance, please come to office hours. Rob ======================================================================= Subject: Emacs Someone asked: > After I do Ctrl-x Ctrl-c to exit Emacs, the computer puts up a SAVE > question at the bottom. Do I say yes, no or what? Right now I am > saying YES to the saving question just to be on the safe side. When you exit Emacs AND you have not saved your most recent changes to a document, Emacs asks you if you want to save them to disk. So, unless you respond `y' to this question when Emacs asks you, it will not get saved to disk. Of course, if you save your document on your own with the C-x s command then Emacs will not prompt you when exiting since the file is already saved. ...or stated another way... When you use Ctrl-x Ctrl-c to exit Emacs and you have not saved your work, it asks you if you want to save your work. For example, if I was editing "letter" and decided to exit before I saved "letter", Emacs would say something like: Save file /home/course/cs101b1/mylogin/letter (y, n, !, ., q, C-r or C-h) If you type 'y' it will save it and exit Emacs; if you type 'n' (because you don't want to save it), then it will make sure by asking: Modified buffers exist; exit anyway? (yes or no) It is just reminding you that you changed what you were editing. IF YOU REALLY STILL want to exit with saving changes then you type in 'yes' (you must type in the whole word) and press the key. Rob ======================================================================= Subject: Re: homework2, problem5 Someone asked: > Rob, I am trying to copy my file "foo" into my new directory. I can do that > much but I can't figure out how to rename the file. Briefly, when you tell it to copy (cp) it to a new directory you can give it a new name. For example, if I copy a file `abc' from my current directory to a subdirectory called `mysubdir', I could do: cp abc mysubdir This command will make a _copy_ of `abc' in the subdirectory mydir. The copy is also named `abc'. So the copy's relative path is: mysubdir/abc ^^^ directory relative to where I am BUT, you can also give a filename to copy to in the cp command, so: cp abc mysubdir/def would make a copy of `abc' in `mysubdir', but with the filename `def'. Another way, is to copy `abc' to the subdirectory and then rename it using the mv command. Essentially, you use: mv oldname newname where you substitute the real filenames for `oldname' and `newname'. Class, if you need detailed help ask questions in discussion or come to my office hours. Good Luck. Rob