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

Root Boy Jim rbj at icst-cmr.arpa
Wed May 25 03:24:22 AEST 1988


   In article <2199 at quacky.mips.COM> dce at mips.COM (David Elliott) writes:
   >   Does ksh have anything like {}?  (In case you don't know, "-r1.{2,4}"
   >   expands to "-r1.2 -r1.4".)

   NB - this happens regardless of whether any files exist with names like
   this.  There's lots of ways to generate names of files in sh & csh, but
   not enough to just manufacture arbitrary patterns, in my opinion; this
   feature bucks that trend.

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.

   >Of course, I'm not completely insane, since I often go into sh to run
   >loops, and I write on sh scripts, never csh scripts.

   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.

    ------------------------------------------------------------------------
   "There was something fishy about the butler.  I think he was a Pisces, |
   probably working for scale."   - Nick Danger                           |

You want some more cotton candy, Danger?

			   uunet-----\                                    |
   Robert Thurlow                     !van-bc!rthurlow                    |
			   ubc-cs----/                                    |
    ------------------------------------------------------------------------

	(Root Boy) Jim Cottrell	<rbj at icst-cmr.arpa>
	National Bureau of Standards
	Flamer's Hotline: (301) 975-5688
	The opinions expressed are solely my own
	and do not reflect NBS policy or agreement
	My name is in /usr/dict/words. Is yours?



More information about the Comp.unix.wizards mailing list