sh vs rc (shell)
When comparing sh vs rc (shell), the Slant community recommends rc (shell) for most people. In the question“What are the best Bash replacements?” rc (shell) is ranked 5th while sh is ranked 8th. The most important reason people chose rc (shell) is:
rc is a very simple and easy to learn shell.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Truely the most broadly available shell
It may not be the best if you want power, but if you want to write a POSIX script that will run everywhere, it's a pretty good choice.
Pro Most influential Unix shell alongside csh
Bourne shell introduced features such as piping, here documents, command substitution, variables, control structures for condition-testing and looping and filename wildcarding.
Pro Simple
rc is a very simple and easy to learn shell.
Pro C-like syntax
rc has very C-like syntax, which is very helpful for people who are used to C-like programming languages and will find rc's syntax very enjoyable. For example:
for (i in `{seq 1 100}) {
echo $i
}
Pro Sane array handling
In rc $array
expands to the whole array and if one of the elements of the array has spaces in it, it's still considered one single element after the array variable expansion.
Cons
Con Not suitable for interactive use
The Bourne shell has always been criticized (most notably by Bill Joy, author of csh) as being unfriendly for interactive use.
It has no tilde (~) expansion. Limited file test operators. Limited math operators.
Con Lacks return statement
rc has no return
statement.
