Error Messages and Error Checking, NOT! 31 and alias (where did those long names come from?), are examples of com- mands that live in a shell and therefore have no man pages of their own. A novice told to use “man command” to get the documentation on a com- mand rapidly gets confused as she sees some commands documented, and others not. And if she’s been set up with a shell different from the ones documented in third-party books, there’s no hope of enlightenment without consulting a guru. Error Messages and Error Checking, NOT! Novices are bound to make errors, to use the wrong command, or use the right command but the wrong options or arguments. Computer systems must detect these errors and report them back to the user. Unfortunately, Unix programs seldom bother. To the contrary, Unix seems to go out of its way to make errors compound each other so that they yield fatal results. In the last section, we showed how easy it is to accidentally delete a file with rm. But you probably wouldn’t realize how easy it is to delete a file without even using the rm command. To Delete Your File, Try the Compiler Some versions of cc frequently bite undergraduates by deleting previous output files before checking for obvious input problems. Date: Thu, 26 Nov 1992 16:01:55 GMT From: tk@dcs.ed.ac.uk (Tommy Kelly) Subject: HELP! Newsgroups: cs.questions9 Organization: Lab for the Foundations of Computer Science, Edinburgh UK I just did: 8We are careful to say “a shell” rather than “the shell.” There is no standard shell in Unix. 9Forwarded to UNIX-HATERS by Paul Dourish, who adds “I suppose we should take it as a good sign that first-year undergraduates are being exposed so early in their career to the canonical examples of bad design practice.”
32 Welcome, New User! % cc -o doit.c doit instead of: % cc -o doit doit.c Needless to say I have lost doit.c Is there anyway I can get it back? (It has been extensively modified since this morning). :-( Other programs show similar behavior: From: Daniel Weise daniel@dolores.stanford.edu To: UNIX-HATERS Date: Thu, 1 July 1993 09:10:50 -0700 Subject: tarred and feathered So, after several attempts, I finally manage to get this 3.2MB file ftp’d through a flaky link from Europe. Time to untar it. I type: % tar -cf thesis.tar …and get no response. Whoops. Is that a “c” rather than an “x”? Yes. Did tar give an error message because no files were specified? No. Did tar even notice a problem? No. Did tar really tar up no files at all? Yes. Did tar overwrite the tar file with garbage? Of course, this is Unix.
Previous Page Next Page