I’m not old, or even particularly crotchety—honest. It’s just that I cut my teeth on Unix timesharing systems. (Of course, I was weaned on a Univac that sported a row of eight lighted switches and a large one labeled “LOAD.”) Unix was built by programmers for programmers, and the toolset they built up shows it. I got very comfy in that environment.
When I moved to DOS boxes for development, I wasn’t a fish out of water—it was more like a fish chucked into orbit. Certainly, my blood boiled. Witnesses heard the strangled cry—“Where’s grep? There’s no GREP?”—just before I exploded. Fortunately, someone had acquired Mortice Kern Systems’ Toolkit, and installing it mellowed me considerably. I had my grep, my find, even rlogin—and could return to editing with vi.
Fast forward a few years, and a company called MKS is known mainly for high-end configuration management systems—but the Toolkit lives. Its primary goal remains the same: Developers and administrators working on Microsoft operating systems access should root through the same bulging toolbox toted by their Unix brethren. Even if you’re not already Unix-compatible, you owe it to yourself to see what we shell-heads are always going on about.
A note on the term Unix: I’m probably going to get Darl McBride on my case here (not that SCO actually owns the trademark, but on the form to date, I doubt that’ll stop him). But in this review, I’ll use Unix fairly loosely, meaning “that entire family of more or less Posix-compatible operating systems, including Linux, HP-UX, AIX, Solaris and BSD that support the tools we’re talking about.” See The Open Group’s website (which does own the trademark) for the Unix scoop: what it is, where it came from, what flavors came when and more.
The Toolkit’s core is a collection of 400-plus command-line utilities—Windows EXE files adding up sufficiently close to the whole Unix ball of wax that most shell scripts should run without hair-pulling. Toss in a few value-added GUI tools and a docs set, and you’ve got the Toolkit for Developers. (MKS also sells a Toolkit for Professional Developers that adds GUI libraries to mimic the Unix APIs, letting you port nongraphical programs from Unix to Windows; the Toolkit for Interoperability that adds an X server so that ported X Window programs can run on your Windows box; and the Toolkit for Enterprise Developers tacks on the libraries necessary for GUI programming.)
The Nuts and Bolts
At the risk of inducing a coma in programmers already familiar with the Unix environment, I’ll give you a taste of what it’s like to work there; without attempting to replicate the manuals or even list all 400 programs, here’s a fast highlights reel of the kinds of tools included and what they’re good for. (You can peruse the entire list at the MKS website).
If you’re accustomed to working in complex integrated development environments
like Visual Studio or JBuilder, the Unix tool philosophy will seem paradoxical,
even primitive. The environment is a naked command line, and in place of one
program offering every conceivable feature, there are 300 to 400 single-purpose
programs. In practice, this turns out to be an incredibly powerful way to work—as
long as you manage to remember what most of the tools do. For example, suppose
you were building a test script and needed to insert into your source code
a list of all the DAT files in a folder containing today’s date. It’s
a one-liner with Unix tools; the line you type into the vi editor
:r !grep “`date +\%D`” *.DAT.
A command-line environment obviously requires a command line—MKS provides four of the most popular interpreters. Every Unix system worthy of the name offers a shell compatible with the Bourne shell, and the Toolkit follows that lead with the Bourne Again (bash) shell beloved of Linux-heads. The venerable C shell is also available, as well as the somewhat newer Korn shell. Given a choice, most of us would rather work in bash, but since every shell tends to spawn a universe of scripts, it’s important to support even those that aren’t as popular. The fourth shell is tclsh, which is even more specifically aimed at scripting rather than interactive use. The Tool Command Language supports general-purpose programming and can be combined with the TK library and an X server (neither of which, sadly, are shipped with this edition of Toolkit) to add GUIs to your scripts.
[click for larger image]
MKS Toolkit’s Visual Difference tool lets you find and merge differences between files.
Programming tools per se include a front end to the Microsoft C compiler cl.exe that lets it masquerade as a Unix-style cc; the ctags tool builds a database from source code that lets text editors like vi function as a primitive version of today’s source-code browsers. The Toolkit includes the ex line-oriented programming editor, as well as its slightly more modern buddies vi (a full-screen editor that can run in a command-line terminal window), vim (Vi IMproved) and a GUI version of viw.
For archiving and backup, there are utilities to munch directory structures into file streams suitable for storing or dumping to tape (tar, cpio, pax) and a tape-drive control program (mt), as well as compression/decompression utilities for Lempel-Ziv, ZIP or Burrows-Wheeler block-sorting formats (bzip, compress, gzip). You can schedule such backups (or any other job, for that matter), using MKS’s front end to the Windows task scheduler (see “The Front End”), or in the traditional Unix edit-the-config-file style with crontab. There’s also an at command to set up a single command for delayed execution.
Of course, Unix and networking have been synonymous for years, and MKS doesn’t leave you isolated. They include the old-style remote-shell (rsh) tools; these days, though, you should use them strictly for backward compatibility. Use secure-shell tools (ssh, scp, sftp) instead, since they provide convenient no-password login from machine to machine without the security exposures of rsh, rlogin and rcp. A goodly complement of SNMP tools is also provided, along with tools to fetch and read mail from both POP3 and IMAP servers.
[click for larger image]
The Front End
You can schedule such backups (or any other job), using MKS’s front end to the Windows task scheduler.
Installing the Toolkit is simple, though surprisingly enough for such a mature product, there are rough edges. For example, trying to run the secure-shell utilities generates an error message that a .ssh directory could not be created. Was I the first to encounter this problem? The installation also sets up the rlogin and telnet servers to run without so much as a confirmation box, leaving you with open ports on your machine (although the servers don’t appear to allow anything heinous like unrestricted logins). And if you attempt to run the terminal emulator installed on the Start menu, it exits with an error message comprehensible only to X Windows aficionados. Of course, this product is aimed primarily at developers already familiar with Unix, but what of nonmigrants who merely wish to exploit the fabled power of Unix? Just because the tools hail from Unix ancestors doesn’t mean the package needs to drag along Unix’s stereotypical baggage of cryptic UIs to which only real gurus need apply.
What About Cygwin?
Now let me speak to that vocal crowd in the back row who’ve been hollering, “What about Cygwin?” What about it, indeed. Back in the mid-’80s, MKS was about the only game in town for Unix-heads working in (I almost said “stuck in”) DOS. In the early ’90s, however, programmers at a company called Cygnus began work on an open source alternative. Today, the Cygwin tools are available for free download at http://cygwin.com, and you’ll recognize nearly the same cast of characters: awk, csh, grep, find, ssh and hundreds more.
So what does the MKS Toolkit give you for the money? The Enterprise and Professional products enable you to port commercial code from Windows to Unix, free of the free-software encumbrances of the GNU license.
[click for larger image]
Cygwin is easy to install, but it gives the user perhaps too much control—you can easily find yourself swimming among hundreds of packages, looking for the ones you need.
Some of the Windows-specific tools like registry aren’t in the Cygwin toolkit, nor are MKS’s SNMP tools, nor the GUI utilities: the task scheduler, visual difference, arbitrary-precision calculator, process-status display, grep front end, free-disk-space display or pax backup GUI.
MKS also provides a documentation set for the command-line tools navigable via your choice of the venerable man interface or a Windows help file. In either case, the content is essentially the same—if you hate man pages, you won’t like the help files much. One significant advantage? The various cross-references and “See Also” items are live hyperlinks.
Cygwin is relatively easy to install, but in contrast to MKS’s slap-in-a-CD process, Cygwin gives the user perhaps too much control—the newbie can easily find himself swimming among hundreds of packages, looking for the ones he might need (see “Cygwin Setup”). But once past that hurdle, the Cygwin downloader winds up with a Unix toolbox for no money down. It took me about 45 minutes to download and install everything over a 768Kb per second DSL line. If counting EXEs is your bag, know that Cygwin provides over 1,400 programs, and some of those are pretty significant: the complete Gnu Compiler Collection (including C, C++, Fortran and Java), an X Window server and a host of clients for it, and the Emacs programming editor.
The full Cygwin install furnishes its own documentation set in HTML, libraries for creating Windows command-line or GUI applications, and the source code for the whole ball of wax. Red Hat will also sell you a commercial, supported version of the utilities starting at $2,679 for 10 desktops. As stated previously, pricing for deploying a commercially licensed (that is, non-GPL) application linked against the Cygwin libraries starts at $25,000 per year.
Whether the MKS Toolkit is worth the money depends on your situation. If you’re administering servers and have both Windows and Unix-type machines in the mix, the Windows-specific tools clearly justify buying the product. If you’re primarily doing development, don’t need support, and just need the utilities, save your money: Cygwin brings you a lot closer to the full Unix command set, and they throw in the source code for free.
|MKS Toolkit for Developers 8.6|
| MKS Inc.
410 Albert St.
Waterloo, ON Canada N2L 3V3
Tel: (800) 637-8034
Fax: (703) 803-3344
|Rating: 3 stars||The Rate Sheet|
Rick Wayne has way too much fun with Web-enabled ecosystem management software for the University of Wisconsin. E-mail him at firstname.lastname@example.org.