Ksh use (was Re: Should ``csh be part of ...)

Brandon S. Allbery allbery at ncoast.UUCP
Fri Jun 3 06:40:23 AEST 1988


As quoted from <14528 at brl-adm.ARPA> by rbj at 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



More information about the Comp.unix.wizards mailing list