ksh keeps up

By Cameron Laird and Kathryn Soraiz, Unix Insider |  Development

You're a shell programmer, right? Do you know how far that can take you?


If you use ksh93, you can travel roughly as far as you could with any other scripting language.


You already know it

Most Unix workers have done at least simple command-line scripting with login shells such as sh, bash, tcsh, and so on. Perhaps you've needed the names of the 10 files in a particular directory that were most recently changed, and you wrote:


      ls -1td $DIRECTORY | head -10
   


If you know that much about programming the shell, then you're ready to do complicated arithmetic, network applications, and even GUIs. That's the promise that ksh93 fulfills.


ksh is the Korn shell, named after AT&T Labs researcher David Korn. Korn has been working on ksh for almost 20 years. ksh is upward-compatible with the Bourne shell (sh), it has essentially all the capabilities of other popular login shells, it was a standard for SysVr4 Unix, and it was the reference for the POSIX and ISO shell definitions. It's also faster than other shells, sometimes as much as by an order of magnitude, and it has functionality that makes it a full-fledged language, on a par with Perl, Tcl, and other newcomer languages.


What was the holdup?

So why aren't you already using ksh for everything you do? Probably not for technical reasons. ksh has always been owned by AT&T and other companies (various combinations of Lucent and Novell, mostly). Its license was onerous, compared with those of Perl, Tcl, and Bash. This hindered its adoption in many cases.


Last year, however, Korn succeeded in opening up the source code, and now ksh93 is available in both source and binary forms under a liberal AT&T license. This promotes Korn's positioning of KornShell (the language that ksh93 implements) as a peer of Perl, Python, and so on. "We don't write anything in Perl anymore, because [ksh93] has all the functionality built-in," Korn claims.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

DevelopmentWhite Papers & Webcasts

See more White Papers | Webcasts

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question