rc - a shell
I maintain the rc shell. This is a reimplementation for Unix, by Byron Rakitzis, of the Plan 9 shell.
The original rc was designed and implemented by Tom Duff at Bell Labs. It has a small feature set similar to a traditional Bourne shell, but with a much cleaner and simpler syntax. Among other things, this makes rc much better than Bourne-compatible shells at handling filenames which contain spaces. Thus, writing rc scripts is less error-prone than writing sh scripts.
This reimplementation of rc can be linked with GNU readline, BSD libedit, or similar line editing libraries, to make a pleasant interactive shell.
The latest release is rc-1.7.4.
rc releases are also available from the University of Toronto FTP server, (awaiting upload of the latest).
8294f6e2c30ca327e9fe83d2f8b27ca5043ab146ee0aac7da4b68f5ee4849e75 rc-1.7.4.tar 5ed26334dd0c1a616248b15ad7c90ca678ae3066fa02c5ddd0e6936f9af9bfd8 rc-1.7.4.tar.gz 008bab5e4acdcfb5eff0d52034f96bbdc3132f81221ac4de0e790d70d0723086 rc-1.7.3.tar d7bfdb534d4bb3096f0f7da93499ee9d2757862eba8d7b816dff8e0112d88405 rc-1.7.3.tar.gz
rc is available pre-built for Debian: sudo apt-get install rc and soon Fedora, plus RHEL and CentOS via the EPEL repositories: sudo yum install rc.
If you are interested in developing for rc, please see the github repository
Tom Duff's papers
The author of the original rc, Tom Duff, presented a paper about it to the UKUUG (United Kingdom Unix Users' Group). He has kindly given permission for us to reproduce the PostScript version of this paper.
An updated HTML version is also available.
The rc mailing list was firstname.lastname@example.org but this seems to be defunct at present. I hope to create a new rc and es community around this web site.
(Subscription requests should be sent to email@example.com.)
Libraries for command line editing
rc can be linked against a number of libraries which provide Emacs style command line editing and history.
rc uses a set of printing routines originally written by Paul Haahr. Scott Schwartz has developed this as a separate package which is available from comp.sources.unix v29i017.
There are a number of other programs which, like rc, implementations of Plan 9 tools for Unix + X windows:
(Many of these links are now out of date. Watch this space!)
- sam, probably the world's finest editor, by Rob Pike;
- wily, a reimplementation of the Plan 9 acme (a minimalist "integrated development environment") by Gary Capell;
- 9term, an X windows terminal emulator by James Matthew Farrow;
- 9wm, an X window manager by David Hogan;
- 9menu (allows you to create X menus from the shell, where each menu item will run a command: it meshes well with 9wm).
Plan 9 itself, including Duff's original rc, is now available (and there's a rather splendid easy-to-install port of all this to Unix, but I don't have the link handy right now: watch this space!)
There's an rc mode for vim available.
The notion of software configuration via patches seems really pretty quaint in the 21st century. Still, this particular patch has been following rc around for a long time. I think I'm desperately unlikely to make it a compile-time or run-time option any-time soon, so if you really want this behaviour, here it is.
- The ctrl-D patch prevents an interactive rc from exiting when it sees end of file on standard input, achieving much the same effect as setting the special variable IGNOREEOF in bash, or ignoreeof in tcsh
I've started making notes as I hack on rc. Anyone who is, or would like to be, familiar with the internals of rc is encouraged to look at them.
(Although my notes are currently in a flat file, they really should consitute a blog. Did blogs exist in 2001? I can't remember. But even if so, I didn't have an easy way to create one. At some point, this document will be converted into a real blog; or possible just merged into my own blog.)
In the dim and distant past, before the phrase vanity googling had been coined, I was searching on AltaVista (anyone remember it?) for rc shell. I came across this page, which seems to be about something else...
This is the official dish of rc, to be served at all conventions and other gatherings of rc users.