Полезная информация

Learning the Korn Shell

Learning the Korn ShellSearch this book
Previous: A.5 bashAppendix A
Related Shells
Next: A.7 The Future of the Korn Shell
 

A.6 Workalikes on PC Platforms

The proliferation of the Korn shell has not stopped at the boundaries of UNIX-dom. Many programmers who got their initial experience on UNIX systems and subsequently crossed over into the PC world wished for a nice UNIX-like environment (especially when faced with the horrors of the MS-DOS command line!), so it's not surprising that several UNIX shell-style interfaces to small-computer operating systems have appeared, Korn shell emulations among them.

Shells that are called "Korn shell" exist for the Minix and Coherent operating systems, both of which are small, inexpensive UNIX-like systems for IBM PC-type machines. These shells are not very compatible with the 1988 UNIX Korn shell; they only have the most important Korn shell features, such as emacs and vi editing modes and shell functions.

Somewhat better is a version of pdksh for OS/2, which you can get in binary form (i.e., the executable, not the source code) from the USENET newsgroup comp.binaries.os2.

But far better than that is the MKS Toolkit, available from Mortice Kern Systems, Inc. The Toolkit is actually a complete UNIX-like environment for MS-DOS (version 2.0 and later) and OS/2 (version 1.2 and later). In addition to its shell, it comes with a vi editor and many UNIX-style utilities, including major ones like awk, uucp, and make.

The MKS shell itself is very much compatible with the 1988 UNIX Korn shell, and it has a well-written manual. Its only real syntactic difference is that it doesn't support the Korn shell's condition test syntax; you must use the old Bourne shell syntax instead.

The few other differences are due to limitations in the underlying operating systems rather than the shell itself. Most importantly, MS-DOS does not support multitasking or file permissions, so the MS-DOS version supports none of the relevant Korn shell features. The OS/2 version doesn't support file permissions either.

Specifically, the MKS shell for MS-DOS does not support the following:

The MKS shells for both MS-DOS and OS/2 do not support the following:

The MKS shell also supports a few features of its own. It uses $[...] (a la bash) as an alternative syntax for arithmetic expressions, and it includes a few invocation and set options that are related to the underlying operating system.

Many UNIX users who have moved to DOS PCs swear by the MKS Toolkit; it's inexpensive ($299 at this writing), and it makes MS-DOS into a reasonable environment for advanced users and software developers. The Toolkit is available through most dealers that sell software tools, or through MKS itself. For more information, contact MKS, 35 King St. North, Waterloo, Ontario, Canada N2J 2W9, or electronically as follows:
Telephone(800) 265-2797 (US & Canada)
Fax(519) 884 8861
Internettoolkit@mks.com
CompuServe73260,1043
BIXmks


Previous: A.5 bashLearning the Korn ShellNext: A.7 The Future of the Korn Shell
A.5 bashBook IndexA.7 The Future of the Korn Shell

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System