Actions

::C shell

::concepts

Shell::command    Source::language    Means::first    Control::shell    Which::commands    Title::hamilton

{{ safesubst:#invoke:Unsubst||$N=Use dmy dates |date=__DATE__ |$B= }} {{ safesubst:#invoke:Unsubst||$N=Refimprove |date=__DATE__ |$B= {{#invoke:Message box|ambox}} }} {{#invoke:Infobox|infobox}}

The C shell (csh or the improved version, tcsh, on most machines) is a Unix shell that was created by Bill Joy while he was a graduate student at University of California, Berkeley in the late 1970s. It has been distributed widely, beginning with the 2BSD release of the BSD Unix system that Joy began distributing in 1978.<ref>Harley Hahn, Harley Hahn's Guide to Unix and Linux.</ref><ref>Berkeley Engineering Lab Notes, Volume 1, Issue 2, October 2001.</ref> Other early contributors to the ideas or the code were Michael Ubell, Eric Allman, Mike O'Brien and Jim Kulp.<ref>An Introduction to the C shell by Bill Joy.</ref>

The C shell is a command processor typically run in a text window, allowing the user to type commands. The C shell can also read commands from a file, called a script. Like all Unix shells, it supports filename wildcarding, piping, here documents, command substitution, variables and control structures for condition-testing and iteration. What differentiated the C shell from others, especially in the 1980s, were its interactive features and overall style. Its new features made it easier and faster to use. The overall style of the language looked more like C and was seen as more readable.

On many systems, such as Mac OS X and Red Hat Linux, csh is actually tcsh, an improved version of csh. Often one of the two files is either a hard link or a symbolic link to the other, so that either name refers to the same improved version of the C shell.

On Debian and some derivatives (including Ubuntu), there are two different packages: csh and tcsh. The former is based on the original BSD version of csh<ref>Ubuntu - Details of package csh in oneiric. Packages.ubuntu.com.</ref><ref>Debian - Details of package csh in squeeze. Packages.debian.org.</ref> and the latter is the improved tcsh.<ref>Ubuntu - Details of package tcsh in oneiric. Packages.ubuntu.com.</ref><ref>Debian - Details of package tcsh in squeeze. Packages.debian.org.</ref>

tcsh added filename and command completion and command line editing concepts borrowed from the Tenex system, which is the source of the "t".<ref name=Greer> {{#invoke:citation/CS1|citation |CitationClass=newsgroup }}</ref> Because it only added functionality and did not change what was there, tcsh remained backward compatible<ref>tcsh(1) man page. tcsh.</ref> with the original C shell. Though it started as a side branch from the original source tree Joy had created, tcsh is now the main branch for ongoing development. tcsh is very stable but new releases continue to appear roughly once a year, consisting mostly of minor bug fixes.<ref>Fixes file in tcsh-17 June 2000.</ref>


C shell sections
Intro   Design objectives and features    Overview of the language    Criticism    Influence    See also    References    Further reading    External links   

PREVIOUS: IntroNEXT: Design objectives and features
<<>>