Where's the beef?
David Korn
dgk at ulysses.UUCP
Tue Jun 12 00:58:46 AEST 1984
Since there has been so much description about the Korn shell, Ksh,
on the net recently I thought that I would clear up several points.
What is Ksh?
Ksh was presented at last summers Toronto USENIX meeting and
a paper describing it has been published in the proceedings of
the meeting. It is essentially an enhanced version of the
System V version of the Bourne shell. It adds new features
such as arithmetic, shell functions and aliases, a history
mechanism, in-line editing facilities that model both emacs
and vi editors, and BSD style job control for systems that
support it. In addition, there are lots of minor enhancements.
It runs on many version of UNIX including System III,
BSD 4.1, BSD 4.2, 8th Edition, and Apollo AUX. It runs on
16 bit machines such as the PDP 11/70 and the ONYX. A lot
of changes have been made to improve performance.
Who uses Ksh?
Ksh in currently installed on several hundred machines at AT&T
Bell Laboratories and at other AT&T locations. In addition,
the Bell phone companies have access to Ksh since it was written
prior to the break up of the Bell system. Even though Ksh has
no official internal support there are several thousand users
at present. Several sites have installed Ksh as /bin/sh.
Ksh has not been released outside of AT&T.
What about performance?
Several changes have been make to improve Ksh performance.
In addition to more built-in commands, fewer processes are
created in some circumstances, and the parser/evaluator has
been substantially improved. A mechanism to remember path names
of executed commands has been added to reduce path searching
time. (Some of these performance enhancements have been added
to the System V Release 2 shell). The addition of the new
features has increased the size of the text for the shell, but
the size of the data area has not grown appreciably. Using the
new features can adversely effect the performance of the shell,
but the shell has been designed so that you don't pay for the
feature if you don't use it. For example, the emacs editing
mode requires that the shell read from the terminal in raw mode.
However, the emacs editing mode is an option, so that if you
don't use the option, you won't pay for it. (The vi mode only
uses raw mode after you hit the ESC key). The history mechanism
does not require an edit mode to make use of it. Most scripts
run faster with Ksh. Measurements made on several VAXes at our
computer center did not show any degradation of system performance
after Ksh was installed as /bin/sh. Response time for users was
noticeably better in some cases.
Will it be released?
I haven't the foggiest idea. I do not work for the part of the
company responsible for the UNIX operating system. I would guess
that if there is sufficient market demand for Ksh that it will
be released. There will likely be official internal support for
Ksh with System V Release 2.
What are the incompatibilities?
I will post a set of known incompatibilities between /bin/sh on
System V Release 2 and Ksh as a separate article.
I tried ksh and don't like it.
If anyone finds a problem with Ksh, functionality or performance,
please let me know. Also I am interested in knowing about bugs
you find with the Bourne shell. The present version of Ksh
fixes all the reported Bourne shell bugs that I am aware of.
if unix # David Korn
then ksh # ulysses!dgk
fi
More information about the Comp.unix
mailing list