The Bourne shell script: if [ hello = "$1" ]; 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 '{ a 2>&1 >&3 3>&- | b; } 3>&1' in
Bourne shell'' a <{b} <{c}
# becomes a {named pipe with standard output of b} {named pipe with standard output of c}, # better known as "process substitution" ==References==