Bourne | Ash |  #!  | find | ARG_MAX | Shells | whatshell | portability | permissions | UUOC | ancient | - | ../Various | HOME
"$@" | echo/printf | set -e | test | tty defs | tty chars | $() vs ) | IFS | using siginfo | nanosleep | line charset | locale


Various system shells

2001-09-04 .. 2023-08-14 (see recent changes)

I created the list out of curiosity and from the viewpoint of history, portability and diversity; according to my own experiences, and with support from others (then as noted below). Additions are welcome.

See the traditional Bourne shell family concerning the various Bourne shells listed below.

See the end notes (bottom of page) for several system specific details.

Concerning the Korn shell variants ksh88 and ksh93, there's a ksh end note.
The exact version of a ksh88 might not be sufficient, as some vendors have slightly modified their version.
A list of some ksh88 and ksh93 versions in the wilderness is on a separate page.

The default system shell, that is, /bin/sh (not to confuse with default login shells) on each flavour is emphasized in boldface.


    Content:

Endnotes:

[ksh] About ksh versions on this page:
  • the short term "[M-]ksh88[x]" actually means "Version [M-]11/16/88[x]", and later versions are abbreviated in the same way.
  • The M- prefix in a ksh version string means multi-byte support (behaviour according to locale settings).

Here is a list of some ksh88 and ksh93 versions in the wilderness.

See ksh88 bugfixes ("RELEASEa" in the ksh88 package) for all modifications up to ksh88i (local copy)

[aix-ksh] AIX 5.3: The shell and its command and library environment becomes completely POSIX compliant by setting XPG_SUS_ENV=ON.
Setting OCTAL_CONST=ON causes just the recognition of octal constants to be POSIX compliant.

[domain-os] DomainOS 10.4 offers two socalled universes: "bsd4.3" and "sys5.3". These provide bourne shells from 4.3BSD and SVR3, respectively.

[hp-posix] /bin/sh (at least) on HP-UX 11 comes with the undocumented flag "Q", which disables reading of $ENV at startup.

[hp-ksh] Although the version string in the HP-UX ksh reports "Version 11/16/88", it seems to be a ksh88c.
It's missing fixes from ksh88d; some examples:
  • "a=b set" doesn't output anything but should behave like "set"
  • "$ for i in a b; do echo ${i[@]};done" still gives the error "i: subscript out of range"
but it comes with fixes from earlier releases:
  • set -o emacs; trap : 1 ; (sleep 2; kill -1 $$) & read a 2>/dev/null # dumped core before ksh88-c
  • echo ${x-"{a}"b} - correctly expands to {a}b when x is unset, fixed in ksh88b
  • "$(name=value) ; foobar() ;" both statements dumped core, fixed in ksh88a
  • "set -A" correctly produces error message since ksh88a
  • "echo $OPTIND" was 0 instead of 1 before ksh88a

[irix-sh] The Bourne shell on IRIX knows about "echo -n" and contains some SVR4.2 extensions, which are disabled, though; it seems to have been derived from between SVR4.0 and SVR4.2.

[irix-ksh] ksh88f on IRIX 6.4 (and following versions), when called as "sh" (and if $_XPG is not set to something greater 0), disables several of its korn shell extensions, like $() and $(()) (command substitution, arithmetic expansion) and falls back to Bourne about the behaviour of several built-ins. ksh integer variables are also affected. It's not intended as a complete Bourne shell emulation, but apparently just should ease the move from Bourne to Korn shell as new system shell ("/bin/sh") from this version on.

[mac-osx] Strictly speaking, a shell must not be required on MAC OS X.
See developer.apple.com, "Responsibilities of Porting to Mac OS X":
"A Mac OS X user should never have to resort to the command line to perform any task in an application with a graphical user interface. This is especially important to remember since the BSD user environment may not even be installed on a users system. The libraries and kernel environment are of course there by default, but the tools may not be."
However, it is said, that the installation of shells de-facto can be safely assumed.

[osf-sh] On OSF/1 you can decide at runtime which shell is forked off, when calling /bin/sh. Depending on the value of the environment variable BIN_SH, you get the POSIX compliant shell ("xpg4"), the SVR4-like shell ("svr4") or the Bourne shell (BIN_SH unset).

[sinix] SINIX 5.20 offers three socalled universes: "ucb", "sie"(mens) and "xopen" (aka "att"). These provide shells from 4.2BSD, System III and SVR3, respectively. See some notes about the sinix universes if you are curious.

[ultrix-ksh] The version string in the Ultrix 4.0 ksh reports "Version 11/16/88", and it's the first release, because it's missing fixes from ksh88a, like
  • echo $! without a former job prints 0 instead of nothing
  • echo $(name=value) still dumps core



<http://www.in-ulm.de/~mascheck/various/shells/>