Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Rc (Unix shell)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Examples== The Bourne shell script: <syntaxhighlight lang="bash"> 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 </syntaxhighlight> is expressed in rc as: <syntaxhighlight lang="text"> 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 } </syntaxhighlight> 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 <>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]]"''<ref name=RCTD/>{{rp|at=Pipeline Branching}}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Rc (Unix shell)
(section)
Add topic