SVR4 /bin/sh BUG

Frank J. Edwards crash at ckctpa.UUCP
Sun Jun 16 00:16:09 AEST 1991


In article <1991Jun15.014909.1562 at menudo.uh.edu> jet at karazm.math.uh.edu (J Eric Townsend) writes:
>
>Just another guy with csh in his /etc/passwd entry,

Hmmm.  Perhaps this should be carried on through email since it isn't
specifically related to comp.unix.amiga, but I suppose if I get any
flames I can move it later ;-)

Why do *you* use csh?  What are the advantages (please be specific and
objective) of csh over ksh?

As an instructor (I teach Korn shell programming, Bourne shell programming,
other programming courses and some introductory user classes) I am most
interested in a "real world" opinion.

My story describes the path I took...

I first worked on an AT&T 3B2 which had only the Bourne shell, although
it did have the function ability.  I remember using variables all over
the place as shortcuts to typing (and retyping) long command lines.  I
also used shl, but that really is not an interactive command processor...

On the IBM RT that we got later the C shell was available, so I experimented
with it and found that it had numerous advantages, among them command
history, directory stacks, variables could be referenced as arrays, and
the {} characters as low-level string replacement wildcards.  I tried
to get the other programmers in my shop to switch over also, but they
were a little more entrenched in their ways (boy, I hope they're not
reading this! ;-)

Anyway, when ksh came out (on the RS/6000) that was my first taste.  There
is one thing that I miss from the C shell (the {} wildcards) but otherwise
the Korn shell seems much superior:  command history is "batch" as it
was in the C shell ("r vi" is the same as "!vi") except that an interactive
command history makes it much easier to visualize the command you're
constructing.  Directory stacks are emulated using functions, variables
can be created and accessed as arrays, the new wildcards @(), *(), +(),
?(), and !() are not quite as useful as {} but they come close.

A friend of mine once complained that ksh doesn't have any way of doing
the !$ feature of csh.  Not so; in "vi" mode, type <ESC>_ to insert
the last parameter or <ESC>3_ to insert the third parameter.

>--
>J. Eric Townsend - jet at uh.edu - bitnet: jet at UHOU - vox: (713) 749-2126
>Skate UNIX! (curb fault: skater dumped)
>
>   --  If you're hacking PowerGloves and Amigas, drop me a line. --

Sorry, I didn't mean it to be quite so long...  Again, if anyone is
interested in providing their views via email instead of posting, please
do so.  Thanks!
-- 
Frank J. Edwards		|  "I did make up my own mind -- there
2677 Arjay Court		|   simply WASN'T ANY OTHER choice!"
Palm Harbor, FL  34684-4504	|		-- Me
Phone (813) 786-3675 (voice)	|    Only Amiga Makes It Possible...



More information about the Comp.unix.amiga mailing list