Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
various system shells
[go: Go Back, main page]

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


Various system shells

From the viewpoint of history, portability and diversity.

I created the list according to my own experiences, with the exception of UnixWare and OpenUnix (Thanks to Gunnar Ritter), MAC OS X (Thanks to Masaaki Hirose), Unicos/mk 2.0.6 (Thanks to Ralf Wildenhues) and Reliant Unix 5.43 (Thanks to Dietrich Schaffer). Additions are welcome.


Take a closer look at the traditional Bourne shell family concerning the various original Bourne shell variants listed below.

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

Concerning the Korn shell variants ksh88 and ksh93, see the ksh end note.
Keep in mind, that the exact version of a ksh88 might not be sufficient, as vendors repeatedly have slightly modified their version.

The system shell "/bin/sh" on each system is emphasized in boldface.



Endnotes:

[ksh]

About ksh versions on this page:
  • the short term "[M-]ksh88[x]" actually means "Version [M-]11/16/88[x]".
  • the short term "[M-]ksh93[x]" actually means "Version [M-]12/28/93[x]".
  • the short term "[M-]dtksh93[x]" actually means "Version [M-]12/28/93[x]".
  • The M- prefix in a ksh version string means multi-byte support (behaviour according to locale settings).

A list of some ksh88 and ksh93 versions in the wild, sorted by release date. For a quick glance on which system to find a specific version.

The ksh88 changelog ("RELEASEa" in the ksh88 package), for all modifications up to ksh88i.
The differences between ksh88 and ksh93 (RELEASE88 in the ksh93 package).
The ksh93 changelog (RELEASE in the ksh93 package).

[domain] 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.


The above also illustrates that a soft link from /bin to /usr/bin is a universal convention on commercial unix flavours from "these days" (except for OpenServer and Unicos). On free unix flavours in turn, /usr/bin/shell is a rare exception.


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

2001-09-04 - 2006-07-07, Sven Mascheck