DASH vs rc (shell)
When comparing DASH vs rc (shell), the Slant community recommends rc (shell) for most people. In the question“What are the best UNIX shells?” rc (shell) is ranked 6th while DASH 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 Fast startup
Dash has a very fast startup, this happens because the shell is started a lot of times during boot and dash minimizes the work it does during this process.
Pro Low memory usage, which matters a lot in embedded
It is designed to be very lightweight and has no support for shell specific extensions that are not POSIX.
Pro Default shell on Debian systems
DASH is the default shell for Debian based systems due to it speed, full POSIX compliance and low overhead.
Pro Full POSIX support
It's fully POSIX compatible, so if your script runs on dash it will probably run on all other shells.
Pro A perfect clone
It's a clone of the original System V4 Bourne shell.
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 Doesn't support all bash features
Dash does not support all bash features, sometimes called 'bashisms' unless explicitly pointed at /bin/sh
.
Con Lacks return statement
rc has no return
statement.