Run commands
   HOME

TheInfoList



OR:

RUNCOM is a CTSS macro command (script) processor.


History

Louis Pouzin Louis Pouzin (April 20, 1931 in Chantenay-Saint-Imbert, Nièvre, France) is a French computer scientist. He designed an early packet communications network, CYCLADES. This network was the first actual implementation of the pure datagram model, ...
created RUNCOM for CTSS circa 1963. He wrote a paper in 1965 describing a design for the
Multics Multics ("Multiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of ...
shell which includes a brief description of RUNCOM followed by a second paper he wrote five days later describing a design for RUNCOM that added commands for
control flow In computer science, control flow (or flow of control) is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an '' ...
, conditional branching and looping. In the context of Unix-like systems, the term ''rc'' stands for the phrase "run commands". It is used for any file that contains startup information for a command. From
Brian Kernighan Brian Wilson Kernighan (; born 1942) is a Canadian computer scientist. He worked at Bell Labs and contributed to the development of Unix alongside Unix creators Ken Thompson and Dennis Ritchie. Kernighan's name became widely known through co- ...
and
Dennis Ritchie Dennis MacAlistair Ritchie (September 9, 1941 – October 12, 2011) was an American computer scientist. He is most well-known for creating the C (programming language), C programming language and, with long-time colleague Ken Thompson, the Unix ...
:
Tom Van Vleck Tom Van Vleck is an American computer software engineer. Life and work Van Vleck graduated from MIT in 1965 with a BS in Mathematics. He worked on CTSS at MIT, and co-authored its first email program with Noel Morris. In 1965, he joined Proje ...
, a
Multics Multics ("Multiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of ...
engineer, has also reminisced about the extension rc: "The idea of having the command processing shell be an ordinary slave program came from the Multics design, and a predecessor program on CTSS by
Louis Pouzin Louis Pouzin (April 20, 1931 in Chantenay-Saint-Imbert, Nièvre, France) is a French computer scientist. He designed an early packet communications network, CYCLADES. This network was the first actual implementation of the pure datagram model, ...
called RUNCOM, the source of the '.rc' suffix on some Unix configuration files." This is also the origin of the name of the
Plan 9 from Bell Labs Plan 9 from Bell Labs is a distributed operating system which originated from the Computing Science Research Center (CSRC) at Bell Labs in the mid-1980s and built on UNIX concepts first developed there in the late 1960s. Since 2000, Plan 9 has be ...
shell by
Tom Duff Tom or TOM may refer to: * Tom (given name), a diminutive of Thomas or Tomás or an independent Aramaic given name (and a list of people with the name) Characters * Tom Anderson, a character in '' Beavis and Butt-Head'' * Tom Beck, a character ...
, the
rc shell R&C, RC, R/C, Rc, or rc may refer to: Science and technology Computing * rc, the default Command line interface in Version 10 Unix and Plan 9 from Bell Labs * .rc (for "run commands"), a filename extension for configuration files in UNIX-like ...
. It is called "rc" because the main job of a shell is to "run commands". While not historically precise, rc may also be expanded as "run control", because an rc file controls how a program runs. For instance, the editor Vim looks for and reads the contents of the .vimrc file to determine its initial configuration. In ''
The Art of Unix Programming ''The Art of Unix Programming'' by Eric S. Raymond is a book about the history and culture of Unix programming from its earliest days in 1969 to 2003 when it was published, covering both genetic derivations such as BSD and conceptual ones such ...
'',
Eric S. Raymond Eric Steven Raymond (born December 4, 1957), often referred to as ESR, is an American software developer, open-source software advocate, and author of the 1997 essay and 1999 book ''The Cathedral and the Bazaar''. He wrote a guidebook for the ...
consistently refers to rc files as "run-control" files.


Usage

Background RUNCOM is not a shell in the sense of the UNIX shell. When you type commands into CTSS they go to the supervisor (kernel), not any UNIX-shell-like program. You cannot type commands into RUNCOM, it processes disk files. CTSS files have first name and a second name separated by spaces, e.g. FOO BCD. Description of RUNCOM RUNCOM command chains also known as macro-commands (both terms mean scripts) are files with a second name of either RUNCOM or BCD which contain zero or more lines. Lines in the script are either blank lines, comments, regular commands (the kind that could be entered on the supervisor's command line) or the pseudo-command (command built into RUNCOM only) CHAIN. Comments start with either $ or * as the first character of the line. Comments using $ are printed (including the $) when RUNCOM runs while ones with * are not printed at all. Parameter substitution does not occur in comments. When you invoke RUNCOM, the arguments (parameters) to it must first start with the first name of the file containing the script. If you invoke RUNCOM without any arguments it prints some instructions on how to use it and stops, returning you to the supervisor's (system's) command line. The remaining arguments, if any, are either command names, values to be used as arguments in the script or the strings (NIL) or (END) including the parenthesis. In the script, CHAIN give names to arguments which were used on the command line when RUNCOM was called, e.g. putting CHAIN LALA FAFA in the script and invoking RUNCOM XYZZY 3 will cause LALA in the script to be substituted into a 3 when it is used in any lines that come after CHAIN while FAFA will remain FAFA as RUNCOM was invoked without specifying anything for it. If an argument to RUNCOM is (NIL), a positional parameter denoted as an argument to CHAIN in the script will be expand into nothing, e.g. CHAIN ALPHA BETA GAMMA combined with RUNCOM A (NIL) B will cause ALPHA to be substituted with A and GAMMA to B while BETA will be removed from any command that follows CHAIN in the script. If a RUNCOM argument is (END) the corresponding CHAIN argument will be treated as (NIL) and all subsequent arguments will also be treated as (NIL). Any parameter to CHAIN can be used as a command name in the script, i.e. can come first before any arguments. An example would be RUNCOM SCRIPT LISTF combined with CHAIN CMD followed by CMD at the start of a following line. CMD will be substituted into LISTF which will list the files in the directory (like the Unix ls command). Once the substitutions have been completed, RUNCOM sends the commands to the SCHAIN library subroutine which is available to other programs as well.


See also

*
Configuration file In computing, configuration files (commonly known simply as config files) are files used to configure the parameters and initial settings for some computer programs. They are used for user applications, server processes and operating system ...
{{reflist History of computing in France Unix software