C shell

C shell
Original author(s)Bill Joy
Initial release1978 (1978)
Stable release
6.20.00 / 24 November 2016 (2016-11-24)[1]
Repository
Written inC
Operating systemBSD, UNIX, UNOS, Linux, macOS
TypeUnix shell
LicenseBSD license
C Shell running on Windows Services for UNIX

The C shell (csh or the improved version, tcsh) is a Unix shell created by Bill Joy while he was a graduate student at University of California, Berkeley in the late 1970s. It has been widely distributed, beginning with the 2BSD release of the Berkeley Software Distribution (BSD) which Joy first distributed in 1978.[2][3] Other early contributors to the ideas or the code were Michael Ubell, Eric Allman, Mike O'Brien and Jim Kulp.[4]

The C shell is a command processor which is typically run in a text window, allowing the user to type and execute 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 macOS 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. The original csh source code and binary are part of NetBSD.

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[5][6] and the latter is the improved tcsh.[7][8]

tcsh added filename and command completion and command line editing concepts borrowed from the Tenex system, which is the source of the "t".[9] Because it only added functionality and did not change what already existed, tcsh remained backward compatible[10] 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.[11]

  1. ^ Zoulas, Christos (24 November 2016). "tcsh-6.20.00 is now available!". mx.gw.com. Archived from the original on 25 November 2016. Retrieved 24 November 2016.
  2. ^ Harley Hahn, Harley Hahn's Guide to Unix and Linux Archived 24 August 2019 at the Wayback Machine.
  3. ^ Berkeley Engineering Lab Notes, Volume 1, Issue 2, October 2001 Archived 9 July 2010 at the Wayback Machine.
  4. ^ An Introduction to the C shell Archived 13 July 2018 at the Wayback Machine by Bill Joy.
  5. ^ Ubuntu - Details of package csh. Packages.ubuntu.com.
  6. ^ Debian - Details of package csh. Packages.debian.org.
  7. ^ Ubuntu - Details of package tcsh. Packages.ubuntu.com.
  8. ^ Debian - Details of package tcsh. Packages.debian.org.
  9. ^ Ken Greer (3 October 1983). "C shell with command and filename recognition/completion". Newsgroupnet.sources. Retrieved 29 December 2010.
  10. ^ tcsh(1) man page. tcsh.
  11. ^ Fixes file in tcsh-17 June 2000.