This list aims at documenting relationships. Thus, characteristic changes
or bugfixes are listed, chosen somewhat arbitrarily.
For the variants without any changelogs (traditional BSDs and Minix)
this log tries to be complete. For the other variants this was certainly
not the goal.
It was written by Kenneth Almquist as replacement to the
"System V Release 4" Bourne shell
due to the license war between AT&T and Berkeley.
Berkeley distributed it first with "BSD 4.3-Net/2".
It was posted to comp.sources.unix,
"A reimplementation of the System V shell".
See <1745@fig.bbn.com>
ff., 30-05-1989.
Some differences to the SVR4 shell (which were never changed later):
implements "$(...)" command substitution
accepts "export VAR=value"
Some details, where the original ash resembles the SVR4
shell, but which were changed in the modern variants:
no command line editing and history (by intention)
As summary in advance: some details which are only found
in the original (and early traditional BSD) variants.
doesn't accept nested back-ticks (accidentally)
undocumented: no "type" built-in (accidentally)
flag "v" not implemented
"for i do" not accepted
reads SHINIT at start
(except if a login shell or called with "sh file")
"trap" doesn't accept symbolic signal names
SEGV on "${var=`cmd`}"
rejecting "case x in (x)"
[1]
also might fit here, but NetBSD and Minix behave as well.
negation of patternmatching with "!!pattern"
flag z (don't leave pattern after redirection unchanged if it doesn't match)
[1]
No ash variant needs "case x in (x)" because the
parser is robust about case constructs in $(...) command substitution.
However, several other shells are not robust and they have to
work around it this way. So this is a portability issue.
For some more differences to the SVR4 shell,
see DIFFERENCES from the
distribution.
Naturally, nothing from the list of
Bourne specific features
is implemented.
jobcontrol: flag j renamed to m (like SVR4 shell),
flags C (noclobber), a (allexport),
b (notify asynchronous jobs), u (error on unset) added,
flag z removed
warning "You have stopped jobs."
"shift" built-in knows "can't shift that many"
warning "running as root with dot in PATH" in case
negation of patternmatching with "!!pattern" removed
manual rewritten
4.4BSD-Lite ('94)
Apparently, the 386BSD cluster patch went into this release or was inspired by it:
accepts nested back-ticks
accepts "for i do"
redirections may precede non-simple commands
do not redirect STDIN of background commands to /dev/null
if it has been redirected previously
backquoted commands set $?
"wait" yields an exit status
"fc" knows "missing history argument"
handles the empty command like other simple commands, allows "if ; [...]"
This Linux port started as a fork from a late NetBSD variant,
"current 19970715", with a release number "0.3.1" and,
among numerous fixes, later repeatedly re-synced with NetBSD
(02/98, 03/00, 07/00, 03/01 : 0.3.8-1).
It was renamed to "dash" (influenced by debian) with
release 0.4.1, 09/02. Since 0.4.26-1 it's not a debian
native package anymore but maintained independently.
accepts "case x in (x)" since 08/99, 0.3.5-4
substituted the embedded pmatch() with fnmatch(3) as of 0.3.7-1,
then switched several times and kept pmatch() since 0.4.26-1
(problems due to several bugs in some glibc versions).
todo: change of ${x-a b c}
Home of dash,
Debian package.
For the changelogs, see ./Changelog and the older ./debian/changelog
in the distribution.
7.) BusyBox ash ('01-)
The BusyBox distribution
is aiming for small implementations. It incorporated the
debian ash 0.3.8-5 with release 0.52 (07/01).
compile time options to deactivate jobcontrol and several
built-ins (alias, type, getopts, command, true, false, chdir).
undocumented: calls fnmatch(3) instead of the embedded pmatch(),
which is problematic due to bugs in some glibc versions.
This also introduces [^...] as synonym for [!...].
8.) Minix sh ('01)
On Minix 2.0.3, an ash variant replaced the "minix shell" as /bin/sh.
Derived from 4.3BSD-Net/2, according to the SCCS-IDs,
apparently with the
386bsd cluster patch applied.
Additionally:
knows tilde expansion
"-" is also end of options
getopts fixed (OPTIND correct after an
"option requires an argument")
accepts empty command, e.g. "if ; [...]"
"false" built-in added (true was always a synonym for the colon command)
Command line editing and history added by means of Minix readline()