Generated by GPT-5-mini| rc | |
|---|---|
| Name | rc |
| Author | Tom Duff |
| Developer | Plan 9 from Bell Labs contributors |
| Released | 1990s |
| Operating system | Plan 9, Unix-like |
| Genre | Command-line shell |
| License | Various (Plan 9 / BSD) |
rc
rc is a command-line shell originally developed for the Plan 9 from Bell Labs operating system. It was authored by Tom Duff and distributed with Plan 9 as part of a suite of tools designed to rethink traditional Unix utilities. rc emphasizes a simpler and more orthogonal syntax than historical shells, aiming to reduce quoting pitfalls and make shell programming more uniform across interactive and scripting use.
rc was created by Tom Duff during the development of Plan 9 from Bell Labs as a replacement for the Bourne shell influences present in predecessors such as the Thompson shell and the Bourne shell. It first appeared in the Plan 9 distribution and was associated with other efforts from Bell Labs researchers including work by Ken Thompson, Dennis Ritchie, and contributors to the Plan 9 project. As Plan 9 sought to rework foundational concepts voiced in Unix, rc reflected the project's philosophy of simplifying interfaces and reducing special-case syntax. Ports and reimplementations later emerged for Unix, Linux, and other BSD systems, influenced by discussions in communities around OpenBSD, NetBSD, and FreeBSD. Over time rc influenced alternative shells and shell libraries discussed in workshops and conferences such as USENIX and papers connected to researchers at AT&T Bell Laboratories.
rc's design centers on a minimal, consistent syntax with first-class lists and simpler quoting rules. The language model distinguishes between words and lists more explicitly than shells like the Bourne shell or Bash, avoiding many of the quoting pitfalls that appear in scripts written for those environments. Control structures and functions in rc take forms reminiscent of languages discussed in research from Bell Labs and designs compared to scripting languages such as Python and Perl. Variable expansion in rc is positional and straightforward; pipelines and redirections follow conventions that were rethought relative to sh and csh. rc's error handling, command substitution, and I/O model also align with Plan 9's philosophy as implemented across utilities like sam and acme.
The canonical implementation of rc came with the Plan 9 system and its distributions from Bell Labs. Several reimplementations and ports exist: Plan 9 from User Space provided binaries and sources for Unix-like systems; Aspell, BusyBox, and other small-system projects sometimes include compatible shells influenced by rc ideas. Implementations tailored for modern Linux distributions and the BSD variants enabled integration with system utilities and init scripts in OpenBSD and NetBSD packaging efforts. Some projects created enhanced variants adding features such as job control, additional builtins, or extensions to integrate with window systems like X Window System and Plan 9's rio. Academic and hobbyist implementations documented differences versus shells such as KornShell and Z shell in articles at USENIX sessions and in repositories maintained by contributors formerly associated with Lucent Technologies.
rc is used both interactively and for scripting. Typical constructs include defining functions, conditionals, and pipelines with a compact syntax favored by users who prefer an alternative to Bash or Zsh. Examples frequently contrast rc idioms with equivalent scripts in the Bourne shell and highlight reductions in quoting and concatenation complexity. In system administration contexts rc scripts appear in demonstrations alongside tools like make, awk, and sed when illustrating text-processing pipelines. rc has also been used in pedagogical materials comparing shell design choices in courses influenced by curricula developed at institutions such as University of California, Berkeley and Massachusetts Institute of Technology.
Configuration files and rc scripts follow plain-text conventions and are typically executable program files with rc's interpreter declared in a shebang line for portability on Unix-like systems. rc scripts are often stored in user home directories and system locations analogous to where shells keep startup files in other ecosystems; projects porting rc to Linux or BSD provided documentation about rc equivalents to initialization files used by shells like Bash's .bashrc. Packaging and distribution in software repositories for distributions such as Debian, Fedora, and Arch Linux included examples of rc init scripts and guidance for integrating rc with service management tools inspired by systems like systemd or traditional init implementations.
rc's influence extends into both practical tooling and theoretical discussion of shell language design. Its clean syntax inspired alternative shells and informed critiques of legacy shells such as Bourne shell and csh, contributing to the design of later shells and scripting environments. The philosophy behind rc resonated with developers at institutions that continued Plan 9 work, including Bell Labs alumni projects and community efforts such as Plan 9 from User Space and hobbyist ports. rc remains cited in discussions of minimalism and orthogonality in programming language design, alongside examples from Lisp family discussions and system research presented at venues like ACM SIGPLAN and USENIX.
Category:Shells