That's strictly true only for a restricted meaning of all, of course; there's no
ksh equivalent to CPAN, which supplies all Perl's add-on functionality in Web service, database management, and other specific areas. ksh93 also doesn't support programming in the large with the namespaces, object orientation, and exception handling of other advanced scripting languages. However, anyone accustomed to shell programming who needs to manage networks, build GUI control panels, integrate C-coded modules, and write maintainable applications should look into ksh93.
ksh is nearly unique, of course, in offering all this power from a processor that is also usable as a login shell.
ksh93 is freely available for essentially all Unixes, and also, with light license restrictions, for Windows and MVS. A handful of vendors support ksh93 commercially. Korn's team at AT&T plans to upgrade a future release of KornShell with a combination of object inheritance, support for binary objects, and namespaces. Also for that release, Korn writes, "Multithreading is a possibility, but less likely than the others."
Korn has even made much of the contents of his authoritative reference book on ksh available for download. Here's an example fragment, which gives an idea of ksh's syntax and functionality:
# Set SECONDS to number of seconds since midnight. export SECONDS="$(date '+3600*%H+60*%M+%S')" # The following variables store hours and minutes. typeset -Z2 _h _m # Two columns, leading zeros. # The following expression reformats SECONDS. _time='$((_h=(SECONDS/3600)%24)):$((_m=(SECONDS/60)%60))' # Use _time within PS1 to get the time of day. PS1="($_time)"'!$ ' # Note that $_time gets replaced by above expression. # Expression gets evaluated when PS1 is displayed.
This example is particularly interesting as an example of language evolution. In 1999, after the book was published,
printf operation was augmented to include new time capabilities. A consequence is that all the code above can now be abbreviated to the single line:
PS1='$(printf "(%(%H:%M)T)!$ " now)'
Our mention last month of several distinct models for handling threading detailed the specifics for only a few scripting languages. Ruby fans felt left out. Here's Ruby's story: