fbpx
Wikipedia

rc

rc (for "run commands") is the command line interpreter for Version 10 Unix and Plan 9 from Bell Labs operating systems. 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 construct ("Duff's device").[1]

rc
Paradigmimperative, pipeline
Designed byTom Duff
DeveloperBell Labs
First appeared1989; 35 years ago (1989)
Typing disciplineweak
OSCross-platform (Version 10 Unix, Plan 9, Plan 9 from User Space)
Websitedoc.cat-v.org/plan_9/4th_edition/papers/rc
Dialects
Byron's rc
Influenced by
Bourne shell
Influenced
es, The Inferno shell.
An rc session

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 if not construct instead of else, and has a Bourne-like for loop to iterate over lists. In rc, all variables are lists of strings, which eliminates the need for constructs like "$@". Variables are not re-split when expanded. The language is described in Duff's paper.[1]

Influences edit

es edit

es (for "extensible shell") is an open source, command line interpreter developed by Rakitzis and Paul Haahr[2] that uses a scripting language syntax influenced by the rc shell.[3][4] It was originally based on code from Byron Rakitzis's clone of rc for Unix.[5][6]

Extensible shell is intended to provide a fully functional programming language as a Unix shell.[7] It does so by introducing "program fragments" in braces as a new datatype, lexical scoping via let, and some more minor improvements. The bulk of es development occurred in the early 1990s, after the shell was introduced at the Winter 1993 USENIX conference in San Diego,[8] Official releases appear to have ceased after 0.9-beta-1 in 1997,[9] and es lacks features as compared to more popular shells, such as zsh and bash.[10] A public domain fork of es is active as of 2019.[11]

Examples edit

The Bourne shell script:

if [ "$1" = "hello" ]; then  echo hello, world else  case "$2" in  1) echo $# 'hey' "jude's"$3;;  2) echo `date` :$*: :"$@":;;  *) echo why not 1>&2  esac  for i in a b c; do  echo $i  done fi 

is expressed in rc as:

if(~ $1 hello) echo hello, world if not { switch($2) { case 1 echo $#* 'hey' 'jude''s'^$3 case 2 echo `{date} :$"*: :$*: case * echo why not >[1=2] } for(i in a b c) echo $i } 

Rc also supports more dynamic piping:

a |[2] b # pipe only standard error of a to b — equivalent to '3>&2 2>&1 >&3 | b' in Bourne shell[1]: Advanced I/O Redirection  a <>b # opens file b as a's standard input and standard output a <{b} <{c} # becomes a {standard output of b} {standard output of c}, # better known as "process substitution"[1]: Pipeline Branching 

References edit

  1. ^ a b c d Duff, Tom (1990). ""Rc — The Plan 9 Shell"". cat-v. Retrieved 2024-01-26.
  2. ^ Fischer, Manfred M. (13 December 1996). Spatial Analytical Perspectives on GIS. CRC Press. ISBN 9780748403400.
  3. ^ . Manpages.ubuntu.com. 1992-03-05. Archived from the original on 2014-02-24. Retrieved 2012-08-24.
  4. ^ "Extensible Shell". FOLDOC. Retrieved 2012-08-24.
  5. ^ "Shells Available for Linux". LUV. Retrieved 2012-08-24.
  6. ^ Jones, Tim. "Evolution of shells in Linux". IBM. Retrieved 14 March 2014.
  7. ^ . Archived from the original on 2013-01-17. Retrieved 2012-08-24.
  8. ^ Es: A shell with higher-order functions by Byron Rakitzis, NetApp, Inc, and Paul Haahr, Adobe Systems Incorporated; Archived at .
  9. ^ [1]
  10. ^ "UNIX shell differences". Faqs.org. Retrieved 2012-08-24.
  11. ^ Haggerty, James (13 March 2020). "wryun/es-shell: a shell with higher-order functions". GitHub.

External links edit

  • rc(1) - Plan 9 manual page.
  • Plan 9 from User Space - Includes rc and other Plan 9 tools for Linux, Mac OS X and other Unix-like systems.
  • Byron Rakitzis' rewrite for Unix (article 2013-10-05 at the Wayback Machine)
  • es Official website

this, article, about, shell, other, uses, disambiguation, this, article, needs, additional, citations, verification, please, help, improve, this, article, adding, citations, reliable, soues, unsoued, material, challenged, removed, find, soues, news, newspapers. This article is about the shell For other uses see RC disambiguation This article needs additional citations for verification Please help improve this article by adding citations to reliable sources Unsourced material may be challenged and removed Find sources Rc news newspapers books scholar JSTOR March 2014 Learn how and when to remove this template message rc for run commands is the command line interpreter for Version 10 Unix and Plan 9 from Bell Labs operating systems 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 construct Duff s device 1 rcParadigmimperative pipelineDesigned byTom DuffDeveloperBell LabsFirst appeared1989 35 years ago 1989 Typing disciplineweakOSCross platform Version 10 Unix Plan 9 Plan 9 from User Space Websitedoc wbr cat v wbr org wbr plan wbr 9 wbr 4th wbr edition wbr papers wbr rcDialectsByron s rcInfluenced byBourne shellInfluencedes The Inferno shell An rc sessionA 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 if not construct instead of else and has a Bourne like for loop to iterate over lists In rc all variables are lists of strings which eliminates the need for constructs like a href 24 html class mw redirect title a Variables are not re split when expanded The language is described in Duff s paper 1 Contents 1 Influences 1 1 es 2 Examples 3 References 4 External linksInfluences edites edit es for extensible shell is an open source command line interpreter developed by Rakitzis and Paul Haahr 2 that uses a scripting language syntax influenced by the rc shell 3 4 It was originally based on code from Byron Rakitzis s clone of rc for Unix 5 6 Extensible shell is intended to provide a fully functional programming language as a Unix shell 7 It does so by introducing program fragments in braces as a new datatype lexical scoping via let and some more minor improvements The bulk of es development occurred in the early 1990s after the shell was introduced at the Winter 1993 USENIX conference in San Diego 8 Official releases appear to have ceased after 0 9 beta 1 in 1997 9 and es lacks features as compared to more popular shells such as zsh and bash 10 A public domain fork of es is active as of 2019 11 Examples editThe Bourne shell script if 1 hello then echo hello world else case 2 in 1 echo hey jude s 3 2 echo date echo why not 1 gt amp 2 esac for i in a b c do echo i done fi is expressed in rc as if 1 hello echo hello world if not switch 2 case 1 echo hey jude s 3 case 2 echo date case echo why not gt 1 2 for i in a b c echo i Rc also supports more dynamic piping a 2 b pipe only standard error of a to b equivalent to 3 gt amp 2 2 gt amp 1 gt amp 3 b in Bourne shell 1 Advanced I O Redirection a lt gt b opens file b as a s standard input and standard output a lt b lt c becomes a standard output of b standard output of c better known as process substitution 1 Pipeline Branching References edit a b c d Duff Tom 1990 Rc The Plan 9 Shell cat v Retrieved 2024 01 26 Fischer Manfred M 13 December 1996 Spatial Analytical Perspectives on GIS CRC Press ISBN 9780748403400 Ubuntu Manpage es extensible shell Manpages ubuntu com 1992 03 05 Archived from the original on 2014 02 24 Retrieved 2012 08 24 Extensible Shell FOLDOC Retrieved 2012 08 24 Shells Available for Linux LUV Retrieved 2012 08 24 Jones Tim Evolution of shells in Linux IBM Retrieved 14 March 2014 Linux Journal 12 What s GNU Archived from the original on 2013 01 17 Retrieved 2012 08 24 Es A shell with higher order functions by Byron Rakitzis NetApp Inc and Paul Haahr Adobe Systems Incorporated Archived at Archive Org 1 UNIX shell differences Faqs org Retrieved 2012 08 24 Haggerty James 13 March 2020 wryun es shell a shell with higher order functions GitHub External links editrc 1 Plan 9 manual page Plan 9 from User Space Includes rc and other Plan 9 tools for Linux Mac OS X and other Unix like systems Byron Rakitzis rewrite for Unix article Archived 2013 10 05 at the Wayback Machine es Official website Retrieved from https en wikipedia org w index php title Rc amp oldid 1199226866 es, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.