Content deleted Content added
m →es: punctuation |
Artoria2e5 (talk | contribs) cite the paper |
||
Line 21:
| operating_system = [[Cross-platform]] ([[Version 10 Unix]], [[Plan 9 from Bell Labs|Plan 9]], [[Plan 9 from User Space]])
| license =
| website =
}}
[[File:Plan 9 from Bell Labs (process management).png|thumb|An rc session]]
'''rc''' (for "[[run commands]]") is the [[command line interpreter]] for [[Version 10 Unix]] and [[Plan 9 from Bell Labs]] [[operating system]]s. It resembles the [[Bourne shell]], but its syntax is somewhat simpler. It was created by [[Tom Duff]], who is better known for an unusual [[C (programming language)|C programming language]] construct ("[[Duff's device]]").<ref name=RCTD>{{cite book |last1=Duff |first1=Tom |title=Rc — The Plan 9 Shell |url=http://doc.cat-v.org/plan_9/4th_edition/papers/rc}} ([https://www.scs.stanford.edu/nyu/04fa/sched/readings/rc.pdf PDF])</ref>
A port of the original rc to Unix is part of [[Plan 9 from User Space]]. A rewrite of rc for [[Unix-like]] operating systems by Byron Rakitzis is also available but includes some incompatible changes.
Rc uses C-like control structures instead of the original Bourne shell's [[ALGOL]]-like structures, except that it uses an <code>if not</code> construct instead of <code>else</code>, and has a Bourne-like <code>for</code> loop to iterate over lists. In rc, all variables are lists of strings, which eliminates the need for constructs like "<code>[[$@]]</code>". The syntax is described in Duff's paper.<ref name=RCTD/>
==Influences== <!--Anchor from redirected [
===es===
Line 74:
</source>
Rc also supports more dynamic piping:
a |[2] b ''# pipe only [[standard error stream|standard error]] of a to b — equivalent to '3>&2 2>&1 >&3 | b' in [[Bourne shell]]''<ref name=RCTD/>{{rp|at=Advanced I/O Redirection}}
a <
a <{b} <{c} ''# becomes a {standard output of b} {standard output of c}. Better known as "[[process substitution]]"''<ref name=RCTD/>{{rp|at=Pipeline Branching}}
==References==
|