/siːˈʃɛl/

noun … “a Unix shell with C-like syntax designed for interactive use and scripting.”

csh, short for C shell, is a Unix command-line interpreter developed by Bill Joy in the late 1970s. It introduced a syntax and command structure inspired by the C programming language, making it more familiar to programmers accustomed to C. csh enhanced interactive usability with features such as history substitution, aliases, job control, and built-in arithmetic, while also supporting scripting for automation of system tasks.

The core capabilities of csh include command parsing, process control, environment management, and conditional execution. Unlike sh, csh allows users to define aliases for commands, maintain a command history with recall, and perform arithmetic operations directly in the shell. Its scripting constructs, including if, switch, foreach, and while, allow automation of repetitive tasks and system administration workflows.

csh is often used in combination with Unix utilities such as grep, sed, and awk, enabling powerful pipelines and text processing. While it was widely adopted for interactive sessions, it is generally considered less robust for complex scripting compared to Bash or ksh, due to limitations in error handling and portability.

In practice, csh has been employed for user shell sessions, startup scripts, and educational environments where C-like syntax aids learning. Its influence persists in shells like tcsh, which extends csh with additional features such as command-line editing and improved history management.

An example of a simple csh script:

#!/bin/csh
# Print the names and sizes of all .txt files
foreach file (*.txt)
    echo "$file has `wc -l < $file` lines"
end

The intuition anchor is that csh acts like a “C-flavored command interpreter”: it combines programming familiarity with interactive convenience, giving Unix users a shell that feels like a natural extension of the C programming language while enabling automation and control over system operations.