Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!mcnc!akgua!gatech!seismo!harvard!talcott!panda!teddy!jpn From: jpn@teddy.UUCP Newsgroups: net.bugs.4bsd Subject: Re: - csh weirdness Message-ID: <2415@teddy.UUCP> Date: Thu, 3-Apr-86 08:17:46 EST Article-I.D.: teddy.2415 Posted: Thu Apr 3 08:17:46 1986 Date-Received: Wed, 9-Apr-86 07:17:55 EST References: <149@wdl1.UUCP> <132@qucis.UUCP> Reply-To: jpn@teddy.UUCP (John P. Nelson) Organization: GenRad, Inc., Concord, Mass. Lines: 55 In article <132@qucis.UUCP> promislo@qucis.UUCP (Eric Promislow) writes: > 1.) First, the Berekely people seem to have a propensity towards >documenting everything once. Exactly once. As Greg mentioned, I recall >reading somewhere that the shell won't do a history substitution on an >exclamation point if it is followed by white space or a newline. I >don't know where I read it (probably in the csh manual), but I know it >wasn't mentioned in the test (1) page. This is the sort of thing that >causes people to dump on Unix (and C) for overloading operators. Why SHOULD it be documented in "test(1)"?!? Conditionals in csh do NOT USE "test(1)". In fact, the syntax of csh conditionals is different than test(1). You must be thinking about sh scripts! However, it IS documented under "csh", where it ought to be. What is unfortunate is the overloading of '!' as the not operator and the history selector. I believe this is a historical problem, since history was added late in csh'es development. Anyway, it probably ought to be pointed out in a warning note near the description of conditional expressions. Thank GOD the berkeley people only document ONCE! I HATE the VMS manuals! A better documentation cross reference would be useful, though. > If anyone out there has compiled a short but complete guide to >effective C-shell programming and usage, we sure could use a copy >around here. I'm sure there are books. I never felt the need for them. See below. > As for my advice, I learned the history mechanism largely by >trial and error, appreciate the escape-key completion (documented >nowhere, as far as I can tell) and job-control features, and do all my >shell programming with the Bourne shell. Well, escape-key completion is NOT part of the standard C-shell, so I suspect that you are running a bastardized version of csh. Why not ask your system guru (the one who installed the bastardized version!?) Also, don't you have a copy of "An Introduction to the C shell" by William Joy? It is an online document in /usr/doc/csh on all Berkeley systems, and it is in our printed manuals too! I felt that it was an adequate introduction to all the csh features. An excerpt from the introduction: UNIX users who have read a general introduction to the system will find a valuable basic explanation of the shell here. Simple terminal interaction with _c_s_h is possible after reading just the first section of this document. The second section describes the shells capabilities which you can explore after you have begun to become acquainted with the shell. Later sections introduce features which are use- ful, but not necessary for all users of the shell. Back matter includes an appendix listing special char- acters of the shell and a glossary of terms and commands introduced in this manual.