Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!tut.cis.ohio-state.edu!mandrill!hal!ncoast!allbery
From: allbery@ncoast.UUCP (Brandon S. Allbery)
Newsgroups: comp.unix.wizards
Subject: Re: Ksh use (was Re: Should ``csh be part of ...)
Message-ID: <7855@ncoast.UUCP>
Date: 2 Jun 88 20:40:23 GMT
References: <14528@brl-adm.ARPA>
Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery)
Followup-To: comp.unix.wizards
Organization: Cleveland Public Access UN*X, Cleveland, Oh
Lines: 31

As quoted from <14528@brl-adm.ARPA> by rbj@icst-cmr.arpa (Root Boy Jim):
+---------------
| Bourne shell (and I assume ksh) use {} to denote a list of commands,
| similar to a subshell, but executed in the same shell. Thus, I doubt
| that the pattern generation will ever be implemented unless they can
| find some free meta-characters. A pity, as I am attached to this feature
| as well. I do `mv foo.c{,.old}' etc all the time.
+---------------

But "{" is legal only if the next token is newline or ";" -- try it!  "{"
immediately followed by a non-space which is not newline or tab could be
recognized as a pattern construct.  (I daresay the code would be ugly,
though.)

+---------------
|    Agreed.  Only lunatics *prefer* 'csh' for scripts.  I just want a Bourne
|    shell with shell functions and history.  Does that exist? :-)
| 
| Disagreed. Unless your script is trivial, you need features that sh
| provides, or you want to make your scripts portable, coding in csh
| is more intuitive. Sh command syntax is braindamaged.
+---------------

I find nothing braindamaged about it:  it's quite straightforward and
logical.  Which is more than I can say for csh, which deludes you into
thinking it's C and then hits you with its variant syntax and general
stupidity when you least expect it.
-- 
	      Brandon S. Allbery, moderator of comp.sources.misc
	{well!hoptoad,uunet!marque,cbosgd,sun!mandrill}!ncoast!allbery
Delphi: ALLBERY						     MCI Mail: BALLBERY