Hamilton C shell is a clone of the Unix C shell and utilities for Microsoft Windows created by Nicole Hamilton at Hamilton Laboratories as a completely original work, not based on any prior code. It was first released on OS/2 on December 12, 1988 and on Windows NT in July 1992. The OS/2 version was discontinued in 2003, but the Windows version continues to be actively supported.
History
Hamilton C shell was originally developed by Nicole Hamilton (then Douglas A. Hamilton) and first released for OS/2 on December 12, 1988. A Windows NT version followed in July 1992. The OS/2 version was discontinued in 2003. As of 2026, Hamilton Laboratories reported they are working on an update to support UTF-8 characters everywhere internally, followed by a planned port to Linux.
Design
Hamilton C shell differs from the original Unix C shell in several key respects:
Parser
The original Unix C shell uses an ad hoc parser, which imposes limitations on command complexity — for example, it is not possible to pipe the output of a foreach statement into grep. Hamilton C shell uses a top-down recursive descent parser that compiles statements to an internal form before running them, allowing statements to be nested or piped arbitrarily. The language has been extended with built-in and user-defined procedures, local variables, floating-point arithmetic, and additional expression, editing, and wildcarding operators — including an "indefinite directory" wildcard construct written as ... that matches zero or more directory levels.
Threads
Because Windows lacks a fork() system call, Hamilton C shell uses Windows thread facilities instead. When a new thread is created, it runs within the same process space and shares all process state. Threads cooperate to share resources using locks to recreate the isolation normally provided by separate processes.
Windows Conventions
Hamilton C shell directly supports Windows conventions for drive letters, filename slashes (\ and /), escape characters, and other Windows-specific behaviors, unlike Unix shells that have been ported to Windows.
Features
Hamilton C shell includes a complete suite of Unix utilities rewritten from scratch for Windows, including mv, cp, rm, more, grep, fgrep, head, tail, diff, sed, cron, tar, chown, and su (super user), along with a sudo alias for running commands elevated. It supports command history, command and filename completion, and C-like scripting syntax.
Release Information
| Attribute | Details |
|---|---|
| Original author | Nicole Hamilton |
| Initial release | December 12, 1988 (OS/2) |
| Stable release | 5.2.g / March 5, 2017 |
| Written in | C |
| Operating system | Windows (historically OS/2) |
| Type | Unix shell for Windows |
| License | Commercial proprietary software |
| Website | hamiltonlabs.com/Cshell.htm |
References
- Early Hamilton C shell Quick Reference (PDF). Hamilton Laboratories, Wayland, MA. July 10, 1990.
- Faught, Danny (August 31, 1996). "The shell game". Software QA Magazine.
- Sussman, Ann. "Hamilton C Shell Speeds Development Of OS/2 Applications". PC Week (Dec 26, 1988 – Jan 2, 1989): 37.
- Richman, Scott (January 1991). "Examining the Hamilton C Shell". Dr. Dobb's Journal.
- Yager, Tom. "OS/2, Unix Style". BYTE Magazine (February 1990).
- Hamilton C shell for Windows Release Notes 4.0.