RUNCOM

RUNCOMDeveloper(s)| Louis Pouzin

|

Initial release| 1963; 63 years ago (1963)
Written in| Template:Data missing
Operating system| CTSS
Platform| IBM 7090, IBM 7094
Available in| English
Type| Command processor
License| Template:Data missing

RUNCOM is a CTSS macro command (script) processor.[1]

## Contents

* 1 History
* 2 Usage
* 3 See also
* 4 References

## History

Louis Pouzin created RUNCOM for CTSS circa 1963.[2] He released a paper in 1965 describing a design for the Multics shell which includes a brief description of RUNCOM[3] followed by a second paper he released five days later describing a design for RUNCOM that added commands for control flow, conditional branching and looping.[4]

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 and Dennis Ritchie:[5][6]

> There was a facility that would execute a bunch of commands stored in a file; it was called runcom for "run commands", and the file began to be called "a runcom". rc in Unix is a fossil from that usage.

Tom Van Vleck, a Multics 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 called RUNCOM, the source of the '.rc' suffix on some Unix configuration files."[7]

This is also the origin of the name of the Plan 9 from Bell Labs shell by Tom Duff, the rc shell. 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, Eric S. Raymond consistently refers to rc files as "run-control" files.

## Usage

Background

RUNCOM is not a shell in the sense of the UNIX shell. When a user type commands into CTSS they go to the supervisor (kernel), not any UNIX-shell-like program. Users 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, similar to CMS.

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 a user invoke RUNCOM, the arguments (parameters) to it must first start with the first name of the file containing the script. If a user invoke RUNCOM without any arguments it prints some instructions on how to use it and stops, returning the user 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.[1]

## See also

* Configuration file

## References

1. ↑ 1.0 1.1 Grisman, P.A., ed (1969). The Compatible Time-Sharing System - A Programmer's Guide, 2nd Ed.. Boston: The MIT Press. p. 525. https://archive.org/details/bitsavers_mitctssCTSc69_26767392/page/n525/mode/2up?q=runcom.
2. ↑ Pouzin, Louis (25 November 2000). "The Origin of the Shell" (in en). http://multicians.org/shell.html.
3. ↑ Pouzin, Louis (April 2, 1965). ﻿The SHELL: A Global Tool for Calling and Chaining Procedures in the System﻿ (Report). Massachusetts Project Institute of Technology Project MAC. MDN-4. https://people.csail.mit.edu/saltzer/Multics/Multics-Documents/MDN/MDN-4.pdf. Retrieved April 9, 2022.
4. ↑ Pouzin, Louis (April 7, 1965). ﻿RUNCOM - A Macro-Procedure Processor for the 636 System﻿ (Report). Massachusetts Project Institute of Technology Project MAC. MDN-4. https://people.csail.mit.edu/saltzer/Multics/Multics-Documents/MDN/MDN-5.pdf. Retrieved April 9, 2022.
5. ↑ "In Unix, what do some obscurely named commands stand for?". Indiana University. http://kb.iu.edu/data/abnd.html.
6. ↑ https://www.oreilly.com/pub/au/2933 O'Reilly, Bio for Vicki Brown
7. ↑ "Unix and Multics". http://www.multicians.org/unix.html.

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/RUNCOM. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:RUNCOM&oldid=4220010"