Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Hamilton C shell
Clone of the Unix C shell and utilities for Microsoft Windows

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.

Related Image Collections Add Image
We don't have any YouTube videos related to Hamilton C shell yet.
We don't have any PDF documents related to Hamilton C shell yet.
We don't have any Books related to Hamilton C shell yet.
We don't have any archived web articles related to Hamilton C shell yet.

Design

Hamilton C shell differs from the Unix C shell in several respects. These include its compiler architecture, its use of threads, and the decision to follow Windows rather than Unix conventions.1314

Parser

The original C shell uses an ad hoc parser. This has led to complaints about its limitations. It works well enough for the kinds of things users type interactively but not very well for the more complex commands a user might take time to write in a script. It is not possible, for example, to pipe the output of a foreach statement into grep. There was a limit to how complex a command it could handle.15

By contrast, Hamilton uses a top-down recursive descent parser that allows it to compile statements to an internal form before running them.1617 As a result, statements can be nested or piped arbitrarily.18 The language has also been extended with built-in and user-defined procedures, local variables, floating point and additional expression, editing and wildcarding operators, including an "indefinite directory" wildcard construct written as "..." that matches zero or more directory levels as required to make the rest of the pattern match.19

Threads

Lacking fork or a high performance way to recreate that functionality, Hamilton uses the Windows threads facilities instead.2021 When a new thread is created, it runs within the same process space and it shares all of the process state. If one thread changes the current directory or the contents of memory, it's changed for all the threads. It's much cheaper to create a thread than a process but there's no isolation between them. To recreate the missing isolation of separate processes, the threads cooperate to share resources using locks.22

Windows conventions

Hamilton differs from other Unix shells in that it also directly supports Windows conventions for drive letters, filename slashes, escape characters, etc.23

References

  1. Early Hamilton C shell Quick Reference (PDF). Hamilton Laboratories, Wayland, MA. Jul 10, 1990. Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/1990-07-10-Hamilton-C-shell-Quick-Reference.pdf

  2. Faught, Danny (Aug 31, 1996). "The shell game". Software QA Magazine. 3 (4). Archived from the original on March 1, 2012. Retrieved Apr 8, 2013. https://web.archive.org/web/20120301104503/http://tejasconsulting.com/sqamag/shell.html

  3. The author has discussed her transition from Douglas Hamilton on a panel discussion at Stanford, beginning at 29:37. Nicole Hamilton, Carl Ingram, Liz Kennedy Myers, Tom Mills, John Ordway, Scott Thatcher, Kirstie Wilde (Moderator) (Nov 28, 2007). Class of 1972 Panel Discussion: Hell No We Won't Go (Quietly Into the Night)!. Stanford Alumni Association, iTunes U. Retrieved March 30, 2025. https://nicolehamilton.com/ClassOf1972PanelDiscussion.m4a

  4. Machlis, Sharon. "Wayland writer for IBM" (PDF). Middlesex News (Dec 18 1988): 2E. Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/Wayland-writer-for-IBM-Sharon-Machlis-Middlesex-News-Dec-18-1988.pdf

  5. Sussman, Ann. "Hamilton C Shell Speeds Development Of OS/2 Applications" (PDF). PC Week (Dec 26 1988 – Jan 2 1989): 37. Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/Hamilton-C-Shell-Speeds-Development-of-OS-2-Applications-Ann-Sussman-PC-Week-Dec-26-1988.pdf

  6. Hamilton, Douglas A. "Hamilton C shell Announcement" (PDF). IBM Personal Systems Developer (Summer 1989): 119–121. Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/Hamilton-C-Shell-Announcement-Douglas-A-Hamilton-IBM-Personal-Systems-Developer-Summer-1989.pdf

  7. Richman, Scott (Jan 1991). "Examining the Hamilton C Shell" (PDF). Dr. Dobb's Journal. Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/Examining-the-Hamilton-C-Shell-Scott-Richman-Dr-Dobbs-Journal-Jan-1991.pdf

  8. Goutal, Kenneth G. "The Hamilton C shell" (PDF). MIPS Magazine (Sep 1989). Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/The-Hamilton-C-shell-Kenneth-G-Goutal-MIPS-Magazine-Sep-1989.pdf

  9. Yager, Tom. "OS/2, Unix Style" (PDF). BYTE Magazine (Feb 1990). Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/OS-2-Unix-Style-Tom-Yager-BYTE-Magazine-Feb-1990.pdf

  10. Hamilton C shell for Windows Release Notes 4.0, retrieved July 28, 2016. https://hamiltonlabs.com/ReleaseNotes.htm

  11. Hamilton, Doug (Jul 27, 1995). "Looking for C-Shell on NT". Newsgroup: comp.os.ms-windows.nt.misc. Usenet: [email protected]. Retrieved Oct 8, 2010. https://groups.google.com/group/comp.os.ms-windows.nt.misc/msg/66c8c99074f5b29a?hl=en

  12. Deignan, Michael P. (March 31, 1998). "Hamilton C Shell". Windows IT Pro. Retrieved September 22, 2019. https://www.itprotoday.com/windows-78/hamilton-c-shell

  13. Goutal, Kenneth G. "The Hamilton C shell" (PDF). MIPS Magazine (Sep 1989). Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/The-Hamilton-C-shell-Kenneth-G-Goutal-MIPS-Magazine-Sep-1989.pdf

  14. Yager, Tom. "OS/2, Unix Style" (PDF). BYTE Magazine (Feb 1990). Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/OS-2-Unix-Style-Tom-Yager-BYTE-Magazine-Feb-1990.pdf

  15. Csh Programming Considered Harmful by Tom Christiansen http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

  16. Early Hamilton C shell Quick Reference (PDF). Hamilton Laboratories, Wayland, MA. Jul 10, 1990. Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/1990-07-10-Hamilton-C-shell-Quick-Reference.pdf

  17. Goutal, Kenneth G. "The Hamilton C shell" (PDF). MIPS Magazine (Sep 1989). Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/The-Hamilton-C-shell-Kenneth-G-Goutal-MIPS-Magazine-Sep-1989.pdf

  18. Hamilton, Douglas A. "Hamilton C shell Announcement" (PDF). IBM Personal Systems Developer (Summer 1989): 119–121. Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/Hamilton-C-Shell-Announcement-Douglas-A-Hamilton-IBM-Personal-Systems-Developer-Summer-1989.pdf

  19. "Wildcarding and pattern matching". Hamilton Laboratories. Retrieved August 13, 2018. https://hamiltonlabs.com/UserGuide/31-Wildcarding.htm

  20. Hamilton, Douglas A. "Hamilton C shell Announcement" (PDF). IBM Personal Systems Developer (Summer 1989): 119–121. Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/Hamilton-C-Shell-Announcement-Douglas-A-Hamilton-IBM-Personal-Systems-Developer-Summer-1989.pdf

  21. Goutal, Kenneth G. "The Hamilton C shell" (PDF). MIPS Magazine (Sep 1989). Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/The-Hamilton-C-shell-Kenneth-G-Goutal-MIPS-Magazine-Sep-1989.pdf

  22. Hamilton, Doug (Apr 21, 1995). "Suggestions for multiple-reader/single-writer lock?". Newsgroup: comp.os.ms-windows.nt.misc. Usenet: [email protected]. Retrieved July 28, 2016. https://groups.google.com/group/comp.os.ms-windows.programmer.win32/msg/77533bcc6197c627?hl=en

  23. Yager, Tom. "OS/2, Unix Style" (PDF). BYTE Magazine (Feb 1990). Retrieved July 28, 2016. https://hamiltonlabs.com/Archives/OS-2-Unix-Style-Tom-Yager-BYTE-Magazine-Feb-1990.pdf