|
If you wish to be happy for one hour, get drunk.
If you wish to be happy for three days, get married.
If you wish to be happy for a month, kill your pig and eat it.
If you wish to be happy forever, learn to fish.
- Chinese Proverb
-
The Unix shell is most people's main access to the Unix operating
system and as such any improvement to it can result in considerably
more effective use of the system, and may even allow you to do things
you couldn't do before. The primary improvement most of the new
generation shells give you is increased speed. They require fewer key
strokes to get the same results due to their completion features, they
give you more information.
In the near beginning there was the Bourne shell
(/bin/sh) written by S. R. Bourne.
It had (and still does) a very
strong powerful syntactical language built into it, with all the features
that are commonly considered to produce structured programs; it has
particularly strong provisions for controlling input and output and in
its shell expression matching functionalities.
But no matter how strong its input
language is, it had one major drawback; it made nearly no concessions
to the interactive user (the only real concession being the use of
shell functions and these were only added later) and so there was a
gap for something better.
Along came the people from UCB (University of California, Berkeley)
and the C shell
(/bin/csh) was born. Into
this shell they put several concepts which were new, (the majority of
these being job control and aliasing) and managed to produce a shell
that was much better for interactive use. But as well as improving the
shell for interactive use they also threw out the baby with the bath
water and went for a different input language.
The theory behind the change was fairly good, the new input language
was to resemble C, the language in which Unix itself was written, but
they made a complete mess of implementing it. Out went the good
control of input and output and in came the bugs. The new shell was
simply too buggy to produce robust shell scripts and so everybody
stayed with the Bourne shell for that, but it was considerably better
for interactive use so changed to the C shell, this resulted in the
stupid situation where people use a different shell for interactive
work than for non-interactive, a situation which a large number of
people still find themselves in today.
After csh was let loose on an unsuspecting world various people
decided that the bugs really should get fixed, and while they where at
it they might as well add some extra features. In came command line
editing and several other features - Tc shell
(/usr/local/bin/tcsh). Out went most of
the bugs, but did the various Unix operating system manufacturers
start shipping tcsh instead of csh? No, most of them stuck with
the standard C Shell, adding non-standard features as they went along.
Eventually David Korn from AT&T had the bright idea to sort out this
mess and the Korn shell
(/bin/ksh) made
its appearance. This quite sensibly junked the C shells language
and reverted back to the bourne shell language, but it also added
in the many features that made the C shell good for interactive work
(you could say it was the best of both worlds), on top of this, it
also added a some features from others. The Korn shell became part
of System V but had one major problem; unlike the rest of the Unix
shells it wasn't free, you had to pay AT&T for it.
It was at about this time that the first attempts to standardize Unix
started in the form of the POSIX [Portable Operating System - Unix]
standard. POSIX specified more or less the System V Bourne Shell
[by this time the BSD (Berkeley Software Distribution) and System V
versions had got slightly different]. Later the standard is upgraded,
and somehow the new standard managed to look very much like ksh.
Also at about this time the GNU project was underway and they decided
that they needed a free shell, they also decided that they wanted to
make this new shell POSIX compatible, thus the Bourne again shell (/usr/local/bin/bash) was born. Like the Korn shell, bash was
based upon the Bourne shells language and like the Korn shell, it also
pinched features from the C shell and other operating systems (in my
opinion it put them together better; guess which shell I use), but
unlike the Korn shell it is free. Bash was quickly adopted for Linux
(where it can be configured to perform just like the Bourne shell), and
is the most popular of the free new generation shells. Bash was
originally written by Brian Fox of the Free Software Foundation. The
current developer and maintainer is Chet Ramey of Case Western Reserve
University.
Meanwhile Tom Duff faced with the problem of porting the Bourne shell
to Plan 9, revolts and writes
rc instead,
he publishes a paper on it, and Byron Rakitzis reimplements it under
Unix. With the benefit of a clean start Rc ended up smalled, simpler,
more regular and in most peoples opinion a much cleaner shell.
The search for the perfect shell still goes on and the latest entry
into this arena is Z shell
(/usr/local/bin/zsh).
Zsh was written by Paul Falstad while he was a student a Princeton
and suffers from slight case of feeping creaturism. It is based
roughly on the bourne shell (although there are some minor but
important differences) and has so many additional features that
I don't even think the author even knows all of them.
Additionally rc has been enhanced to produced es,
this shell adds the ability for the user to redefine low level kernel functions.
|