Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 1996 11:57:46 +0200 (MET DST)
From:      grog@lemis.de (Greg Lehey)
To:        randyd@nconnect.net (Randy DuCharme)
Cc:        questions@FreeBSD.org
Subject:   Re: Shells shells shells?
Message-ID:  <199609200957.LAA18618@allegro.lemis.de>
In-Reply-To: <324031EB.41C67EA6@nconnect.net> from "Randy DuCharme" at Sep 18, 96 12:31:23 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Randy DuCharme writes:
>
> Greetings,
> I just downloaded and read one person's opinion of the C shell.  I
> understand that a question like this can lead to a potential war as
> there's probably a great deal of 'personal opinion' surrounding the
> responses, but I'm wondering...what's the "BEST" shell to use for a
> person new to UNIX.  (by new I'm implying that I'm unaccustomed to
> any particular shell and will be learning whatever shell from the
> ground up)  I've been using tcsh up until now as I like one of its
> features... namely the 'up arrow' recalling the previously typed
> commands.  I also chose tcsh thinking that my knowledge of C would
> possibly be of some benefit.  However, now that I'm beginning the
> journey of learning scripting, and based on what I just read, I'm
> wondering if there's not a better choice???
>
> Opinions?

IMO the C shell is used mainly because years ago it had better command
line editing than the Bourne shell (sh), the only other one available.
By modern standards, both are outdated, but modern versions of csh are
much better.  The main disadvantage of csh is that almost nobody uses
it for shell scripts (they use sh instead), which means that you need
to understand sh anyway if you want to modify existing shell scripts.
These include things like the system startup scripts, so you probably
will want to modify them at some point.  As a result, I'd recommend a
Bourne shell compatible.

The following sh-compatibles are available:

sh - the original, but not genuine.  For copyright reasons, FreeBSD
     may not use the Bourne shell I think the one we have is based on
     ash, and I've heard of minor incompatibilities.  It does now have
     some kind of command line editing, though I haven't examined it
     thoroughly.

ksh - again, a clone.  The main advantage I had with ksh was that it
      had command line editing.  It also has a kind of kludgy file
      name completion (type in a partial file name, hit ESC twice, and
      it'll fill in any remaining characters as long as they're not
      ambiguous).  It also has better job-control constructs.

bash - This time, the original and genuine, from the Free Software
       Foundation.  To quote Peter Collinson, formerly of BSDI: "I
       don't think any shell should be larger than the kernel".  Well,
       it isn't any more, but it's quite big.  I think it has the best
       command line editing and file name completion of any shell I've
       used, and so it's the one I use.  It's missing a couple of the
       ksh job-control constructs, but I haven't missed them.

zsh - Yet another one.  I've heard indefinite good things about it,
       but I've never had enough time to play with it.

Greg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609200957.LAA18618>